SlideShare a Scribd company logo
1 of 57
Search Algorithms for Discrete
Optimization
Chp13- book: Introduction to Parallel
Computing, Second Edition
eng.sallysalem@gmail.com, 2013
Agenda
• Definitions
• Sequential Search Algorithms
– Depth-First Search
– Best-First Search
– Example to DFS
• Parallel Search Algorithms
– Depth-First Search
– Best-First Search
– Example
Definitions (cont)
• A discrete optimization problem can be expressed as a
tuple (S, f). The set S is a finite or countably infinite set of
all solutions that satisfy specified constraints.
• The function f is the cost function that maps each element
in set S onto the set of real numbers R.
• The objective of a DOP is to find a feasible solution xopt,
such that f(xopt) ≤ f(x) for all x  S.
Rsf :
Discrete Optimization: Example
• The 8-puzzle problem consists of a 3×3 grid containing eight
tiles, numbered one through eight.
• One of the grid segments (called the ``blank'') is empty. A tile can
be moved into the blank position from a position adjacent to it,
thus creating a blank in the tile's original position.
• The goal is to move from a given initial position to the final
position in a minimum number of moves.
Discrete Optimization: Example
initial
configuration
final
configuration
a sequence of moves
leading from the
initial to the final
configuration.
Discrete Optimization: Example
The set S for this
problem is the set of all
sequences of moves that
lead from the initial to
the final configurations.
Discrete Optimization: Example
The cost function f of an
element in S is defined as
the number of moves in
the sequence.
Discrete Optimization Basics
• heuristic estimate h(x) : the cost to reach the goal state
from an intermediate state
• heuristic function: h
Sequential Search Algorithms
Depth-First Search Algorithms
• Applies to search spaces that are trees.
• DFS begins by expanding the initial node and generating its
successors. In each subsequent step, DFS expands one of
the most recently generated nodes.
• If there exists no success, DFS backtracks to the parent and
explores an alternate child.
• Often, successors of a node are ordered based on their
likelihood of reaching a solution. This is called directed DFS.
• The main advantage of DFS is that its storage requirement is
linear in the depth of the state space being searched.
States resulting from the first three steps of depth-first search
applied to an instance of the 8-puzzle.
Depth-First Search Algorithms
Depth-First Search Algorithms
• 1-Simple Backtracking
start ?
?
dead end
dead end
?
?
dead end
dead end
?
success!
dead end
Depth-First Search Algorithms
1-Simple Backtracking
• Simple backtracking performs DFS until it finds the first
feasible solution and terminates.
• Not guaranteed to find a minimum-cost solution.
Depth-First Search Algorithms
2-Depth-First Branch-and-Bound (DFBB)
• Exhaustively searches the state space, that is,
• It continues to search even after finding a solution path.
• Whenever it finds a new solution path, it updates the
current best solution path
Depth-First Search Algorithms
3- Iterative deepening depth-first search (ID-DFS):
Select depth = 0
F is not the goal
then back and
increase the
depth
Depth-First Search Algorithms
3- Iterative deepening depth-first search (ID-DFS):
Select depth = 1
B is not the goal
the move to G
F is not the goal
then back and
increase the
depth
….. and so on
until get the
goal
Depth-First Search Algorithms
3- Iterative deepening depth-first search (ID-DFS):
• Used for trees of deep search space, we impose a bound on
the depth to which the DFS algorithm searches.
• If a solution is not found, then the entire state space is
searched again using a larger depth bound.
Representing a DFS tree: (a) the DFS tree; Successor nodes shown with dashed lines
have already been explored; (b) the stack storing untried alternatives only; and (c)
the stack storing untried alternatives along with their parent. The shaded blocks
represent the parent state and the block to the right represents successor states that
have not been explored.
Depth-First Search Algorithms
Best-First Search Algorithms
• We have total weight and weight to each step, depend on the
weight we select next node
First only have F no weight , so
expand the F
W5
W4W3W2
W1
W0
If W0 and W1 not the goal and
both weights < total weight
then expand the B, G
Calculate
W0 + W2 < total weight
If ( W0 + W 3 ) < Total Weight
Then
Move to I ..
Calculate
W0 + W3 > total weight ,
Then remove D
Best-First Search Algorithms
• Can search both graphs and trees
• BFS algorithms use a heuristic to guide search.
• BFS maintains two lists: open and closed.
• At the beginning, the initial node is placed on the open list.
• This list is sorted according to a heuristic evaluation function
• In each step of the search, the most promising node from the
open list is removed.
• If this node is a goal node, then the algorithm terminates.
• Otherwise, the node is expanded. The expanded node is placed
on the closed list.
Search Overhead Factor
• The search overhead factor of the parallel system is defined as the
ratio of the work done by the parallel formulation to that done by the
sequential formulation
Wp/ W
• Where W be the amount of work done by a single processor and Wp be
the total amount of work done by p processors
• Upper bound on speedup is p x (W/ Wp)
– Speedup may be less due to other parallel processing overhead.
Example for DFS
Parallel Search Algorithms
Parallel Depth-First Search
• The critical issue in parallel depth-first search algorithms is the distribution of
the search space among the processors.
In Case use 2 processors (A , B) :
one processor is idle for a significant
amount of time, reducing efficiency.
In Case Large number of processors add C,
D, E, F :
The static partitioning of unstructured trees
yields poor performance
Parallel Depth-First Search
• Dynamic load balancing: when a processor runs out of
work, it gets more work from another processor that has
work.
Parallel Depth-First Search:
Dynamic Load Balancing
A generic scheme for dynamic load balancing.
Parallel Depth-First Search:
Dynamic Load Balancing
• Steps
– each processor can be in one of two states: active or idle.
– In message passing architectures, an idle processor selects a donor
processor and sends it a work request.
– If the idle processor receives work (part of the state space to be searched)
from the donor processor, it becomes active.
– If it receives a reject message (because the donor has no work), it selects
another donor and sends a work request to that donor.
– This process repeats until the processor gets work or all the processors
become idle.
Important Parameters of Parallel DFS
• Two characteristics of parallel DFS are critical to
determining its performance
1. The method for splitting work at a processor
2. The scheme to determine the donor processor when a processor
becomes idle.
Splitting the DFS tree: the two subtrees along with their stack representations are
shown in (a) and (b).
Parameters in Parallel DFS:
Work Splitting
Parameters in Parallel DFS:
Work Splitting
• Work is split by splitting the stack into two
• If too little work is sent, the recipient quickly becomes idle
• if too much, the donor becomes idle
• Ideally, we do not want either of the split pieces to be small
• Using a half-split the stack is split into two equal pieces
• Cutoff depth: To avoid sending very small amounts of work, nodes beyond a
specified stack depth are not given away
Parameters in Parallel DFS:
Load-Balancing Schemes
1. Asynchronous round robin
2. Global round robin
3. Random polling
• Each of these schemes can be coded for message passing
as well as shared address space machines.
Parameters in Parallel DFS:
Load-Balancing Schemes
• Asynchronous round robin (ARR): Each processor maintains a
counter and makes requests in a round-robin fashion.
• Global round robin (GRR): The system maintains a global
counter and requests are made in a round-robin fashion,
globally.
• Random polling: Request a randomly selected processor for
work.
A General Framework for Analysis of
Parallel DFS
• For each load balancing strategy, we define V(P) as the total number of work requests
after which each processor receives at least one work request (note that V(p) ≥ p).
• Assume that the largest piece of work at any point is W.
• After V(p) requests, the maximum work remaining at any processor is less than (1 - α)W;
after 2V(p) requests, it is less than (1 - α)2 W.
• After (log1/1(1- α )(W/ε))V(p) requests, the maximum work remaining at any processor is
below a threshold value ε.
• The total number of work requests is O(V(p)log W).
A General Framework for Analysis of
Parallel DFS
• If tcomm is the time required to communicate a piece of work, then the
communication overhead To is given by
T0 = tcommV(p)log W
The corresponding efficiency E is given by
A General Framework for Analysis of
Parallel DFS
• To depends on two values: tcomm and V(p). The value of tcomm is determined by
the underlying architecture, and the function V(p) is determined by the load-
balancing scheme.
• So lets Computation of V(p) for Various Load-Balancing Schemes
A General Framework for Analysis of
Parallel DFS
• Asynchronous Round Robin: when all processors issue work requests at the
same time to the same processor.
V(p) = O(p2) in the worst case.
• Global Round Robin: all processors receive requests in sequence V(p) = p.
• Random Polling: Worst case V(p) is unbounded V (p) = O (p log p).
• Asynchronous round robin has poor performance because it makes a
large number of work requests.
• Global round robin has poor performance because of contention at
counter, although it makes the least number of requests.
• Random polling strikes a desirable compromise.
Analysis of Load-Balancing Schemes:
Conclusions
Termination Detection
• How do you know when everyone's done?
• A number of algorithms have been proposed.
• Techniques
1. Dijkstra's Token Termination Detection
2. Tree-Based Termination Detection
Dijkstra's Token Termination Detection
P0 goes idle, it colors
itself green and
initiates a green token.
If pi is ideal Move to
next p
The algorithm
terminates when
processor P0 receives a
green token and is
itself idle.
Dijkstra's Token Termination Detection
• Now, let us do away with the restriction on work transfers.
• When processor P0 goes idle, it colors itself green and initiates a green token.
• If processor Pj sends work to processor Pi and j > i then processor Pj becomes red.
• If processor Pi has the token and Pi is idle, it passes the token to Pi+1. If Pi is red, then the color
of the token is set to red before it is sent to Pi+1. If Pi is green, the token is passed unchanged.
• After Pi passes the token to Pi+1, Pi becomes green .
• The algorithm terminates when processor P0 receives a green token and is itself idle.
Tree-Based Termination Detection
• Associate weights with individual workpieces. Initially, processor P0 has all the
work and a weight of one.
• Whenever work is partitioned, the weight is split into half and sent with the
work.
• When a processor gets done with its work, it sends its parent the weight back.
• Termination is signaled when the weight at processor P0 becomes 1 again.
• Note that underflow and finite precision are important factors associated with
this scheme.
Tree-Based Termination Detection
Tree-based termination detection. Steps 1-6 illustrate the weights at various
processors after each work transfer
Parallel Best-First Search
• The core data structure is the Open list (typically implemented as a priority
queue).
• Each processor locks this queue, extracts the best node, unlocks it.
• Successors of the node are generated, their heuristic functions estimated, and
the nodes inserted into the open list as necessary after appropriate locking.
• Termination signaled when we find a solution whose cost is better than the
best heuristic value in the open list.
• Since we expand more than one node at a time, we may expand nodes that
would not be expanded by a sequential algorithm.
Parallel Best-First Search
A general schematic for parallel best-first search using a centralized
strategy. The locking operation is used here to serialize queue access
by various processors.
Parallel Best-First tree Search
Three strategies for tree search:
1. Random communication strategy
2. Ring communication
3. Blackboard communication.
Parallel Best-First tree Search
1. Random communication strategy
• each processor periodically sends some of its best nodes to the
open list of a randomly selected processor.
• This strategy ensures that, if a processor stores a good part of
the search space, the others get part of it.
• The cost of communication determines the node transfer
frequency.
Parallel Best-First tree Search
2. Ring communication strategy
• In the ring communication strategy, the processors are mapped in a virtual
ring.
• Each processor periodically exchanges some of its best nodes with the open
lists of its neighbors in the ring.
• This strategy can be implemented on message passing as well as shared
address space machines with the processors organized into a logical ring.
• The cost of communication determines the node transfer frequency.
Parallel Best-First tree Search
2. Ring communication strategy
A message-passing implementation of parallel best-first search using the
ring communication strategy.
Parallel Best-First tree Search
3. Blackboard communication
• there is a shared blackboard through which nodes are switched among processors as follows.
• After selecting the best node from its local open list, a processor expands the node only if its value is
within a tolerable limit of the best node on the blackboard.
• If the selected node is much better than the best node on the blackboard, the processor sends some of
its best nodes to the blackboard before expanding the current node.
• If the selected node is much worse than the best node on the blackboard, the processor retrieves
some good nodes from the blackboard and reselects a node for expansion.
• The blackboard strategy is suited only to shared-address-space computers, because the value of the
best node in the blackboard has to be checked after each node expansion.
Parallel Best-First tree Search
3. Blackboard communication
An implementation of parallel best-first search using the blackboard
communication strategy.
Speedup Anomalies in Parallel Search
• Since the search space explored by processors is determined
dynamically at runtime, the actual work might vary significantly.
• Executions yielding speedups greater than p by using p processors are
referred to as acceleration anomalies. Speedups of less than p using p
processors are called deceleration anomalies.
• Speedup anomalies also manifest themselves in best-first search
algorithms.
• If the heuristic function is good, the work done in parallel best-first
search is typically more than that in its serial counterpart.
Speedup Anomalies in Parallel Search
The difference in number of nodes searched by sequential and parallel formulations of DFS.
For this example, parallel DFS reaches a goal node after searching fewer nodes than
sequential DFS.
Speedup Anomalies in Parallel Search
A parallel DFS formulation that searches more nodes than its sequential counterpart
Example
Questions
Questions
1. How calculate Search Overhead Factor? Ans: Page 21
2. What is Termination Detection Techniques? Ans: Page 38, 39, 40, 41, 42
3. Descript the effect of the Speedup Anomalies in Parallel Search with
examples? Ans: Page 59, 60, 61
4. Write sequential for search programs? Ans: Page 22
5. Write parallel for search programs? Ans: Page 54
Thank you

More Related Content

What's hot

I. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMI. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMvikas dhakane
 
Automata presentation turing machine programming techniques
Automata presentation turing machine programming techniquesAutomata presentation turing machine programming techniques
Automata presentation turing machine programming techniquesBasit Hussain
 
daa-unit-3-greedy method
daa-unit-3-greedy methoddaa-unit-3-greedy method
daa-unit-3-greedy methodhodcsencet
 
Different types of Shoring Algorithms with Animation
Different types of Shoring Algorithms with AnimationDifferent types of Shoring Algorithms with Animation
Different types of Shoring Algorithms with AnimationZakaria Hossain
 
Hill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligenceHill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligencesandeep54552
 
Learning rule of first order rules
Learning rule of first order rulesLearning rule of first order rules
Learning rule of first order rulesswapnac12
 
Distribution transparency and Distributed transaction
Distribution transparency and Distributed transactionDistribution transparency and Distributed transaction
Distribution transparency and Distributed transactionshraddha mane
 
Query Decomposition and data localization
Query Decomposition and data localization Query Decomposition and data localization
Query Decomposition and data localization Hafiz faiz
 
5.1 mining data streams
5.1 mining data streams5.1 mining data streams
5.1 mining data streamsKrish_ver2
 
Matching techniques
Matching techniquesMatching techniques
Matching techniquesNagpalkirti
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial IntelligenceJay Nagar
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithmsswapnac12
 
Association rule mining
Association rule miningAssociation rule mining
Association rule miningAcad
 
2. forward chaining and backward chaining
2. forward chaining and backward chaining2. forward chaining and backward chaining
2. forward chaining and backward chainingmonircse2
 
Data cube computation
Data cube computationData cube computation
Data cube computationRashmi Sheikh
 
8 queens problem using back tracking
8 queens problem using back tracking8 queens problem using back tracking
8 queens problem using back trackingTech_MX
 
Back propagation
Back propagationBack propagation
Back propagationNagarajan
 

What's hot (20)

Apriori algorithm
Apriori algorithmApriori algorithm
Apriori algorithm
 
I. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMI. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHM
 
Automata presentation turing machine programming techniques
Automata presentation turing machine programming techniquesAutomata presentation turing machine programming techniques
Automata presentation turing machine programming techniques
 
Bagging.pptx
Bagging.pptxBagging.pptx
Bagging.pptx
 
daa-unit-3-greedy method
daa-unit-3-greedy methoddaa-unit-3-greedy method
daa-unit-3-greedy method
 
Different types of Shoring Algorithms with Animation
Different types of Shoring Algorithms with AnimationDifferent types of Shoring Algorithms with Animation
Different types of Shoring Algorithms with Animation
 
Hill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligenceHill climbing algorithm in artificial intelligence
Hill climbing algorithm in artificial intelligence
 
Learning rule of first order rules
Learning rule of first order rulesLearning rule of first order rules
Learning rule of first order rules
 
Distribution transparency and Distributed transaction
Distribution transparency and Distributed transactionDistribution transparency and Distributed transaction
Distribution transparency and Distributed transaction
 
Query Decomposition and data localization
Query Decomposition and data localization Query Decomposition and data localization
Query Decomposition and data localization
 
5.1 mining data streams
5.1 mining data streams5.1 mining data streams
5.1 mining data streams
 
Matching techniques
Matching techniquesMatching techniques
Matching techniques
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithms
 
Data reduction
Data reductionData reduction
Data reduction
 
Association rule mining
Association rule miningAssociation rule mining
Association rule mining
 
2. forward chaining and backward chaining
2. forward chaining and backward chaining2. forward chaining and backward chaining
2. forward chaining and backward chaining
 
Data cube computation
Data cube computationData cube computation
Data cube computation
 
8 queens problem using back tracking
8 queens problem using back tracking8 queens problem using back tracking
8 queens problem using back tracking
 
Back propagation
Back propagationBack propagation
Back propagation
 

Viewers also liked

Comparative Study of RBFS & ARBFS Algorithm
Comparative Study of RBFS & ARBFS AlgorithmComparative Study of RBFS & ARBFS Algorithm
Comparative Study of RBFS & ARBFS AlgorithmIOSR Journals
 
Solving problems by searching
Solving problems by searchingSolving problems by searching
Solving problems by searchingLuigi Ceccaroni
 
Plenary Speaker slides at the 2016 International Workshop on Biodesign Automa...
Plenary Speaker slides at the 2016 International Workshop on Biodesign Automa...Plenary Speaker slides at the 2016 International Workshop on Biodesign Automa...
Plenary Speaker slides at the 2016 International Workshop on Biodesign Automa...Natalio Krasnogor
 
Paper introduction to Combinatorial Optimization on Graphs of Bounded Treewidth
Paper introduction to Combinatorial Optimization on Graphs of Bounded TreewidthPaper introduction to Combinatorial Optimization on Graphs of Bounded Treewidth
Paper introduction to Combinatorial Optimization on Graphs of Bounded TreewidthYu Liu
 
Elementary Landscape Decomposition of Combinatorial Optimization Problems
Elementary Landscape Decomposition of Combinatorial Optimization ProblemsElementary Landscape Decomposition of Combinatorial Optimization Problems
Elementary Landscape Decomposition of Combinatorial Optimization Problemsjfrchicanog
 
DENSA:An effective negative selection algorithm with flexible boundaries for ...
DENSA:An effective negative selection algorithm with flexible boundaries for ...DENSA:An effective negative selection algorithm with flexible boundaries for ...
DENSA:An effective negative selection algorithm with flexible boundaries for ...Mario Pavone
 
Local search algorithms
Local search algorithmsLocal search algorithms
Local search algorithmsbambangsueb
 
Cycle Computing Record-breaking Petascale HPC Run
Cycle Computing Record-breaking Petascale HPC RunCycle Computing Record-breaking Petascale HPC Run
Cycle Computing Record-breaking Petascale HPC Runinside-BigData.com
 
SERC, IISc CRAY PetaFLOPS System
SERC, IISc CRAY PetaFLOPS SystemSERC, IISc CRAY PetaFLOPS System
SERC, IISc CRAY PetaFLOPS SystemAdarsh Patil
 
The Explosion of Petascale in the Race to Exascale
The Explosion of Petascale in the Race to ExascaleThe Explosion of Petascale in the Race to Exascale
The Explosion of Petascale in the Race to ExascaleIntel IT Center
 
Future of cloud storage
Future of cloud storageFuture of cloud storage
Future of cloud storageGlusterFS
 
Nanotechnology by sanchit sharma
Nanotechnology by sanchit sharmaNanotechnology by sanchit sharma
Nanotechnology by sanchit sharmaSanchit Sharma
 
09 heuristic search
09 heuristic search09 heuristic search
09 heuristic searchTianlu Wang
 
Informed and Uninformed search Strategies
Informed and Uninformed search StrategiesInformed and Uninformed search Strategies
Informed and Uninformed search StrategiesAmey Kerkar
 
2 lectures 16 17-informed search algorithms ch 4.3
2 lectures 16 17-informed search algorithms ch 4.32 lectures 16 17-informed search algorithms ch 4.3
2 lectures 16 17-informed search algorithms ch 4.3Ravi Balout
 
Optical Computing Technology
Optical Computing TechnologyOptical Computing Technology
Optical Computing TechnologyKanchan Shinde
 
Synchronization in distributed systems
Synchronization in distributed systems Synchronization in distributed systems
Synchronization in distributed systems SHATHAN
 

Viewers also liked (20)

Comparative Study of RBFS & ARBFS Algorithm
Comparative Study of RBFS & ARBFS AlgorithmComparative Study of RBFS & ARBFS Algorithm
Comparative Study of RBFS & ARBFS Algorithm
 
Solving problems by searching
Solving problems by searchingSolving problems by searching
Solving problems by searching
 
Plenary Speaker slides at the 2016 International Workshop on Biodesign Automa...
Plenary Speaker slides at the 2016 International Workshop on Biodesign Automa...Plenary Speaker slides at the 2016 International Workshop on Biodesign Automa...
Plenary Speaker slides at the 2016 International Workshop on Biodesign Automa...
 
Paper introduction to Combinatorial Optimization on Graphs of Bounded Treewidth
Paper introduction to Combinatorial Optimization on Graphs of Bounded TreewidthPaper introduction to Combinatorial Optimization on Graphs of Bounded Treewidth
Paper introduction to Combinatorial Optimization on Graphs of Bounded Treewidth
 
Elementary Landscape Decomposition of Combinatorial Optimization Problems
Elementary Landscape Decomposition of Combinatorial Optimization ProblemsElementary Landscape Decomposition of Combinatorial Optimization Problems
Elementary Landscape Decomposition of Combinatorial Optimization Problems
 
DENSA:An effective negative selection algorithm with flexible boundaries for ...
DENSA:An effective negative selection algorithm with flexible boundaries for ...DENSA:An effective negative selection algorithm with flexible boundaries for ...
DENSA:An effective negative selection algorithm with flexible boundaries for ...
 
Local search algorithms
Local search algorithmsLocal search algorithms
Local search algorithms
 
Search Algprithms
Search AlgprithmsSearch Algprithms
Search Algprithms
 
Cycle Computing Record-breaking Petascale HPC Run
Cycle Computing Record-breaking Petascale HPC RunCycle Computing Record-breaking Petascale HPC Run
Cycle Computing Record-breaking Petascale HPC Run
 
many-task computing
many-task computingmany-task computing
many-task computing
 
SERC, IISc CRAY PetaFLOPS System
SERC, IISc CRAY PetaFLOPS SystemSERC, IISc CRAY PetaFLOPS System
SERC, IISc CRAY PetaFLOPS System
 
The Explosion of Petascale in the Race to Exascale
The Explosion of Petascale in the Race to ExascaleThe Explosion of Petascale in the Race to Exascale
The Explosion of Petascale in the Race to Exascale
 
Future of cloud storage
Future of cloud storageFuture of cloud storage
Future of cloud storage
 
Nanotechnology by sanchit sharma
Nanotechnology by sanchit sharmaNanotechnology by sanchit sharma
Nanotechnology by sanchit sharma
 
Opticalcomputing final
Opticalcomputing finalOpticalcomputing final
Opticalcomputing final
 
09 heuristic search
09 heuristic search09 heuristic search
09 heuristic search
 
Informed and Uninformed search Strategies
Informed and Uninformed search StrategiesInformed and Uninformed search Strategies
Informed and Uninformed search Strategies
 
2 lectures 16 17-informed search algorithms ch 4.3
2 lectures 16 17-informed search algorithms ch 4.32 lectures 16 17-informed search algorithms ch 4.3
2 lectures 16 17-informed search algorithms ch 4.3
 
Optical Computing Technology
Optical Computing TechnologyOptical Computing Technology
Optical Computing Technology
 
Synchronization in distributed systems
Synchronization in distributed systems Synchronization in distributed systems
Synchronization in distributed systems
 

Similar to Search algorithms for discrete optimization

PPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptx
PPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptxPPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptx
PPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptxRaviKiranVarma4
 
A Lightweight Infrastructure for Graph Analytics
A Lightweight Infrastructure for Graph AnalyticsA Lightweight Infrastructure for Graph Analytics
A Lightweight Infrastructure for Graph AnalyticsDonald Nguyen
 
FIT5047 Semester 1, 2015 Problem Solving as SearchFIT5047 .docx
FIT5047 Semester 1, 2015 Problem Solving as SearchFIT5047 .docxFIT5047 Semester 1, 2015 Problem Solving as SearchFIT5047 .docx
FIT5047 Semester 1, 2015 Problem Solving as SearchFIT5047 .docxvoversbyobersby
 
Lecture 15 run timeenvironment_2
Lecture 15 run timeenvironment_2Lecture 15 run timeenvironment_2
Lecture 15 run timeenvironment_2Iffat Anjum
 
ARTIFICIAL INTELLIGENCE UNIT 2(2)
ARTIFICIAL INTELLIGENCE UNIT 2(2)ARTIFICIAL INTELLIGENCE UNIT 2(2)
ARTIFICIAL INTELLIGENCE UNIT 2(2)SURBHI SAROHA
 
On Extending MapReduce - Survey and Experiments
On Extending MapReduce - Survey and ExperimentsOn Extending MapReduce - Survey and Experiments
On Extending MapReduce - Survey and ExperimentsYu Liu
 
Dremel interactive analysis of web scale datasets
Dremel interactive analysis of web scale datasetsDremel interactive analysis of web scale datasets
Dremel interactive analysis of web scale datasetsCarl Lu
 
Galois: A System for Parallel Execution of Irregular Algorithms
Galois: A System for Parallel Execution of Irregular AlgorithmsGalois: A System for Parallel Execution of Irregular Algorithms
Galois: A System for Parallel Execution of Irregular AlgorithmsDonald Nguyen
 
uninformed search part 1.pptx
uninformed search part 1.pptxuninformed search part 1.pptx
uninformed search part 1.pptxMUZAMILALI48
 
uninformed search part 2.pptx
uninformed search part 2.pptxuninformed search part 2.pptx
uninformed search part 2.pptxMUZAMILALI48
 
Lecture 16 - Dijkstra's Algorithm.pdf
Lecture 16 - Dijkstra's Algorithm.pdfLecture 16 - Dijkstra's Algorithm.pdf
Lecture 16 - Dijkstra's Algorithm.pdfiftakhar8
 

Similar to Search algorithms for discrete optimization (20)

Chap11 slides
Chap11 slidesChap11 slides
Chap11 slides
 
PPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptx
PPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptxPPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptx
PPT ON INTRODUCTION TO AI- UNIT-1-PART-2.pptx
 
NEW-II.pptx
NEW-II.pptxNEW-II.pptx
NEW-II.pptx
 
Branch and Bound.pptx
Branch and Bound.pptxBranch and Bound.pptx
Branch and Bound.pptx
 
Queue (1)(1).ppt
Queue (1)(1).pptQueue (1)(1).ppt
Queue (1)(1).ppt
 
NEW-II.pptx
NEW-II.pptxNEW-II.pptx
NEW-II.pptx
 
A Lightweight Infrastructure for Graph Analytics
A Lightweight Infrastructure for Graph AnalyticsA Lightweight Infrastructure for Graph Analytics
A Lightweight Infrastructure for Graph Analytics
 
l2.pptx
l2.pptxl2.pptx
l2.pptx
 
FIT5047 Semester 1, 2015 Problem Solving as SearchFIT5047 .docx
FIT5047 Semester 1, 2015 Problem Solving as SearchFIT5047 .docxFIT5047 Semester 1, 2015 Problem Solving as SearchFIT5047 .docx
FIT5047 Semester 1, 2015 Problem Solving as SearchFIT5047 .docx
 
l2.pptx
l2.pptxl2.pptx
l2.pptx
 
Lecture 15 run timeenvironment_2
Lecture 15 run timeenvironment_2Lecture 15 run timeenvironment_2
Lecture 15 run timeenvironment_2
 
ARTIFICIAL INTELLIGENCE UNIT 2(2)
ARTIFICIAL INTELLIGENCE UNIT 2(2)ARTIFICIAL INTELLIGENCE UNIT 2(2)
ARTIFICIAL INTELLIGENCE UNIT 2(2)
 
On Extending MapReduce - Survey and Experiments
On Extending MapReduce - Survey and ExperimentsOn Extending MapReduce - Survey and Experiments
On Extending MapReduce - Survey and Experiments
 
Dremel interactive analysis of web scale datasets
Dremel interactive analysis of web scale datasetsDremel interactive analysis of web scale datasets
Dremel interactive analysis of web scale datasets
 
Galois: A System for Parallel Execution of Irregular Algorithms
Galois: A System for Parallel Execution of Irregular AlgorithmsGalois: A System for Parallel Execution of Irregular Algorithms
Galois: A System for Parallel Execution of Irregular Algorithms
 
Searching techniques
Searching techniquesSearching techniques
Searching techniques
 
uninformed search part 1.pptx
uninformed search part 1.pptxuninformed search part 1.pptx
uninformed search part 1.pptx
 
uninformed search part 2.pptx
uninformed search part 2.pptxuninformed search part 2.pptx
uninformed search part 2.pptx
 
Parallel databases
Parallel databasesParallel databases
Parallel databases
 
Lecture 16 - Dijkstra's Algorithm.pdf
Lecture 16 - Dijkstra's Algorithm.pdfLecture 16 - Dijkstra's Algorithm.pdf
Lecture 16 - Dijkstra's Algorithm.pdf
 

Recently uploaded

notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdfSuman Jyoti
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 

Recently uploaded (20)

notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 

Search algorithms for discrete optimization

  • 1. Search Algorithms for Discrete Optimization Chp13- book: Introduction to Parallel Computing, Second Edition eng.sallysalem@gmail.com, 2013
  • 2. Agenda • Definitions • Sequential Search Algorithms – Depth-First Search – Best-First Search – Example to DFS • Parallel Search Algorithms – Depth-First Search – Best-First Search – Example
  • 3. Definitions (cont) • A discrete optimization problem can be expressed as a tuple (S, f). The set S is a finite or countably infinite set of all solutions that satisfy specified constraints. • The function f is the cost function that maps each element in set S onto the set of real numbers R. • The objective of a DOP is to find a feasible solution xopt, such that f(xopt) ≤ f(x) for all x  S. Rsf :
  • 4. Discrete Optimization: Example • The 8-puzzle problem consists of a 3×3 grid containing eight tiles, numbered one through eight. • One of the grid segments (called the ``blank'') is empty. A tile can be moved into the blank position from a position adjacent to it, thus creating a blank in the tile's original position. • The goal is to move from a given initial position to the final position in a minimum number of moves.
  • 5. Discrete Optimization: Example initial configuration final configuration a sequence of moves leading from the initial to the final configuration.
  • 6. Discrete Optimization: Example The set S for this problem is the set of all sequences of moves that lead from the initial to the final configurations.
  • 7. Discrete Optimization: Example The cost function f of an element in S is defined as the number of moves in the sequence.
  • 8. Discrete Optimization Basics • heuristic estimate h(x) : the cost to reach the goal state from an intermediate state • heuristic function: h
  • 10. Depth-First Search Algorithms • Applies to search spaces that are trees. • DFS begins by expanding the initial node and generating its successors. In each subsequent step, DFS expands one of the most recently generated nodes. • If there exists no success, DFS backtracks to the parent and explores an alternate child. • Often, successors of a node are ordered based on their likelihood of reaching a solution. This is called directed DFS. • The main advantage of DFS is that its storage requirement is linear in the depth of the state space being searched.
  • 11. States resulting from the first three steps of depth-first search applied to an instance of the 8-puzzle. Depth-First Search Algorithms
  • 12. Depth-First Search Algorithms • 1-Simple Backtracking start ? ? dead end dead end ? ? dead end dead end ? success! dead end
  • 13. Depth-First Search Algorithms 1-Simple Backtracking • Simple backtracking performs DFS until it finds the first feasible solution and terminates. • Not guaranteed to find a minimum-cost solution.
  • 14. Depth-First Search Algorithms 2-Depth-First Branch-and-Bound (DFBB) • Exhaustively searches the state space, that is, • It continues to search even after finding a solution path. • Whenever it finds a new solution path, it updates the current best solution path
  • 15. Depth-First Search Algorithms 3- Iterative deepening depth-first search (ID-DFS): Select depth = 0 F is not the goal then back and increase the depth
  • 16. Depth-First Search Algorithms 3- Iterative deepening depth-first search (ID-DFS): Select depth = 1 B is not the goal the move to G F is not the goal then back and increase the depth ….. and so on until get the goal
  • 17. Depth-First Search Algorithms 3- Iterative deepening depth-first search (ID-DFS): • Used for trees of deep search space, we impose a bound on the depth to which the DFS algorithm searches. • If a solution is not found, then the entire state space is searched again using a larger depth bound.
  • 18. Representing a DFS tree: (a) the DFS tree; Successor nodes shown with dashed lines have already been explored; (b) the stack storing untried alternatives only; and (c) the stack storing untried alternatives along with their parent. The shaded blocks represent the parent state and the block to the right represents successor states that have not been explored. Depth-First Search Algorithms
  • 19. Best-First Search Algorithms • We have total weight and weight to each step, depend on the weight we select next node First only have F no weight , so expand the F W5 W4W3W2 W1 W0 If W0 and W1 not the goal and both weights < total weight then expand the B, G Calculate W0 + W2 < total weight If ( W0 + W 3 ) < Total Weight Then Move to I .. Calculate W0 + W3 > total weight , Then remove D
  • 20. Best-First Search Algorithms • Can search both graphs and trees • BFS algorithms use a heuristic to guide search. • BFS maintains two lists: open and closed. • At the beginning, the initial node is placed on the open list. • This list is sorted according to a heuristic evaluation function • In each step of the search, the most promising node from the open list is removed. • If this node is a goal node, then the algorithm terminates. • Otherwise, the node is expanded. The expanded node is placed on the closed list.
  • 21. Search Overhead Factor • The search overhead factor of the parallel system is defined as the ratio of the work done by the parallel formulation to that done by the sequential formulation Wp/ W • Where W be the amount of work done by a single processor and Wp be the total amount of work done by p processors • Upper bound on speedup is p x (W/ Wp) – Speedup may be less due to other parallel processing overhead.
  • 24. Parallel Depth-First Search • The critical issue in parallel depth-first search algorithms is the distribution of the search space among the processors. In Case use 2 processors (A , B) : one processor is idle for a significant amount of time, reducing efficiency. In Case Large number of processors add C, D, E, F : The static partitioning of unstructured trees yields poor performance
  • 25. Parallel Depth-First Search • Dynamic load balancing: when a processor runs out of work, it gets more work from another processor that has work.
  • 26. Parallel Depth-First Search: Dynamic Load Balancing A generic scheme for dynamic load balancing.
  • 27. Parallel Depth-First Search: Dynamic Load Balancing • Steps – each processor can be in one of two states: active or idle. – In message passing architectures, an idle processor selects a donor processor and sends it a work request. – If the idle processor receives work (part of the state space to be searched) from the donor processor, it becomes active. – If it receives a reject message (because the donor has no work), it selects another donor and sends a work request to that donor. – This process repeats until the processor gets work or all the processors become idle.
  • 28. Important Parameters of Parallel DFS • Two characteristics of parallel DFS are critical to determining its performance 1. The method for splitting work at a processor 2. The scheme to determine the donor processor when a processor becomes idle.
  • 29. Splitting the DFS tree: the two subtrees along with their stack representations are shown in (a) and (b). Parameters in Parallel DFS: Work Splitting
  • 30. Parameters in Parallel DFS: Work Splitting • Work is split by splitting the stack into two • If too little work is sent, the recipient quickly becomes idle • if too much, the donor becomes idle • Ideally, we do not want either of the split pieces to be small • Using a half-split the stack is split into two equal pieces • Cutoff depth: To avoid sending very small amounts of work, nodes beyond a specified stack depth are not given away
  • 31. Parameters in Parallel DFS: Load-Balancing Schemes 1. Asynchronous round robin 2. Global round robin 3. Random polling • Each of these schemes can be coded for message passing as well as shared address space machines.
  • 32. Parameters in Parallel DFS: Load-Balancing Schemes • Asynchronous round robin (ARR): Each processor maintains a counter and makes requests in a round-robin fashion. • Global round robin (GRR): The system maintains a global counter and requests are made in a round-robin fashion, globally. • Random polling: Request a randomly selected processor for work.
  • 33. A General Framework for Analysis of Parallel DFS • For each load balancing strategy, we define V(P) as the total number of work requests after which each processor receives at least one work request (note that V(p) ≥ p). • Assume that the largest piece of work at any point is W. • After V(p) requests, the maximum work remaining at any processor is less than (1 - α)W; after 2V(p) requests, it is less than (1 - α)2 W. • After (log1/1(1- α )(W/ε))V(p) requests, the maximum work remaining at any processor is below a threshold value ε. • The total number of work requests is O(V(p)log W).
  • 34. A General Framework for Analysis of Parallel DFS • If tcomm is the time required to communicate a piece of work, then the communication overhead To is given by T0 = tcommV(p)log W The corresponding efficiency E is given by
  • 35. A General Framework for Analysis of Parallel DFS • To depends on two values: tcomm and V(p). The value of tcomm is determined by the underlying architecture, and the function V(p) is determined by the load- balancing scheme. • So lets Computation of V(p) for Various Load-Balancing Schemes
  • 36. A General Framework for Analysis of Parallel DFS • Asynchronous Round Robin: when all processors issue work requests at the same time to the same processor. V(p) = O(p2) in the worst case. • Global Round Robin: all processors receive requests in sequence V(p) = p. • Random Polling: Worst case V(p) is unbounded V (p) = O (p log p).
  • 37. • Asynchronous round robin has poor performance because it makes a large number of work requests. • Global round robin has poor performance because of contention at counter, although it makes the least number of requests. • Random polling strikes a desirable compromise. Analysis of Load-Balancing Schemes: Conclusions
  • 38. Termination Detection • How do you know when everyone's done? • A number of algorithms have been proposed. • Techniques 1. Dijkstra's Token Termination Detection 2. Tree-Based Termination Detection
  • 39. Dijkstra's Token Termination Detection P0 goes idle, it colors itself green and initiates a green token. If pi is ideal Move to next p The algorithm terminates when processor P0 receives a green token and is itself idle.
  • 40. Dijkstra's Token Termination Detection • Now, let us do away with the restriction on work transfers. • When processor P0 goes idle, it colors itself green and initiates a green token. • If processor Pj sends work to processor Pi and j > i then processor Pj becomes red. • If processor Pi has the token and Pi is idle, it passes the token to Pi+1. If Pi is red, then the color of the token is set to red before it is sent to Pi+1. If Pi is green, the token is passed unchanged. • After Pi passes the token to Pi+1, Pi becomes green . • The algorithm terminates when processor P0 receives a green token and is itself idle.
  • 41. Tree-Based Termination Detection • Associate weights with individual workpieces. Initially, processor P0 has all the work and a weight of one. • Whenever work is partitioned, the weight is split into half and sent with the work. • When a processor gets done with its work, it sends its parent the weight back. • Termination is signaled when the weight at processor P0 becomes 1 again. • Note that underflow and finite precision are important factors associated with this scheme.
  • 42. Tree-Based Termination Detection Tree-based termination detection. Steps 1-6 illustrate the weights at various processors after each work transfer
  • 43. Parallel Best-First Search • The core data structure is the Open list (typically implemented as a priority queue). • Each processor locks this queue, extracts the best node, unlocks it. • Successors of the node are generated, their heuristic functions estimated, and the nodes inserted into the open list as necessary after appropriate locking. • Termination signaled when we find a solution whose cost is better than the best heuristic value in the open list. • Since we expand more than one node at a time, we may expand nodes that would not be expanded by a sequential algorithm.
  • 44. Parallel Best-First Search A general schematic for parallel best-first search using a centralized strategy. The locking operation is used here to serialize queue access by various processors.
  • 45. Parallel Best-First tree Search Three strategies for tree search: 1. Random communication strategy 2. Ring communication 3. Blackboard communication.
  • 46. Parallel Best-First tree Search 1. Random communication strategy • each processor periodically sends some of its best nodes to the open list of a randomly selected processor. • This strategy ensures that, if a processor stores a good part of the search space, the others get part of it. • The cost of communication determines the node transfer frequency.
  • 47. Parallel Best-First tree Search 2. Ring communication strategy • In the ring communication strategy, the processors are mapped in a virtual ring. • Each processor periodically exchanges some of its best nodes with the open lists of its neighbors in the ring. • This strategy can be implemented on message passing as well as shared address space machines with the processors organized into a logical ring. • The cost of communication determines the node transfer frequency.
  • 48. Parallel Best-First tree Search 2. Ring communication strategy A message-passing implementation of parallel best-first search using the ring communication strategy.
  • 49. Parallel Best-First tree Search 3. Blackboard communication • there is a shared blackboard through which nodes are switched among processors as follows. • After selecting the best node from its local open list, a processor expands the node only if its value is within a tolerable limit of the best node on the blackboard. • If the selected node is much better than the best node on the blackboard, the processor sends some of its best nodes to the blackboard before expanding the current node. • If the selected node is much worse than the best node on the blackboard, the processor retrieves some good nodes from the blackboard and reselects a node for expansion. • The blackboard strategy is suited only to shared-address-space computers, because the value of the best node in the blackboard has to be checked after each node expansion.
  • 50. Parallel Best-First tree Search 3. Blackboard communication An implementation of parallel best-first search using the blackboard communication strategy.
  • 51. Speedup Anomalies in Parallel Search • Since the search space explored by processors is determined dynamically at runtime, the actual work might vary significantly. • Executions yielding speedups greater than p by using p processors are referred to as acceleration anomalies. Speedups of less than p using p processors are called deceleration anomalies. • Speedup anomalies also manifest themselves in best-first search algorithms. • If the heuristic function is good, the work done in parallel best-first search is typically more than that in its serial counterpart.
  • 52. Speedup Anomalies in Parallel Search The difference in number of nodes searched by sequential and parallel formulations of DFS. For this example, parallel DFS reaches a goal node after searching fewer nodes than sequential DFS.
  • 53. Speedup Anomalies in Parallel Search A parallel DFS formulation that searches more nodes than its sequential counterpart
  • 56. Questions 1. How calculate Search Overhead Factor? Ans: Page 21 2. What is Termination Detection Techniques? Ans: Page 38, 39, 40, 41, 42 3. Descript the effect of the Speedup Anomalies in Parallel Search with examples? Ans: Page 59, 60, 61 4. Write sequential for search programs? Ans: Page 22 5. Write parallel for search programs? Ans: Page 54

Editor's Notes

  1. Sally Abdelghany – Msc 2013
  2. because of substantial variation in the size of partitions of the search space rooted at different nodes.