Professional Documents
Culture Documents
ISSAM ALHADID
1/4/2019
General Method.
Branch-and-Bound Examples.
Search Techniques.
Bounding Function.
Live node: A node which has been generated
and all of whose children have not yet been
generated is live node.
E-node: The live nodes whose children are
currently being generated is called E-node
(node being expanded)
The term branch-and-bound refers to all
state space search methods in which all
children of the E-node are generated before
any other live node can become the E-node.
Branch-and-Bound method of algorithm design
involves:
◦ Tree organization of the solution search
space.
◦ Solution space search techniques in which all
children of E-node are generated before any
other live node can become E-node.
◦ Use of bounding function to limit the search;
that is to help avoid the generation of sub-
trees that do not contain an answer node.
Examples using branch-and-bound method:
0/1 Knapsack Problem
Traveling Salesperson Problem
BFS and DFS Techniques
Least-Cost Search Technique.
BFS like and DFS search techniques are used
for storage of live nodes and selection of next
E-node among the live nodes
based on FIFO (queue) and LIFO (stack),
respectively.
Next we will show the 4-queens problem as
an example using FIFO branch-and-bound.
Example: FIFO branch-and-bound algorithm
would search the state space tree in Figure 1
for the 4-queens problem.
In backtracking solution we backtrack when
we hit a dead end. We track the solution
using Depth First Search (DFS)
In Branch and Bound solution, after building a
partial solution, we figure out that there is no
point going any deeper as we are going to hit
a dead end. We track the solution using
Breadth First Search (BFS)
Figure 2: Portion of 4-queens state space tree
generated by FIFO branch-and-bound.
Figure 3: Portion of tree of Figure 1; that is generated during
backtracking.
Example….
My Soln.
Least-Cost (LC) search is a generalization of
BFS and DFS search techniques.
LC search technique is intended to provide
for efficient search based on judicious
(intelligent) selection of next E-node from
among the live nodes.
Least-Cost (LC) search is a generalization of BFS or
DFS search techniques.
LC search technique is intended to provide for
efficient search based on judicious selection of next
E-node from among the live nodes.
The selection rule for the next E-node in FIFO or LIFO
Expanded-node (E-node): is the live node
with the best ĉ value
For a node X, the estimate of cost of search
associated with X, denoted ĉ(X), is given by:
◦ ĉ(X) = f(h(X)) + ĝ(X); where
h(X) is the cost of reaching node X from root node.
ĝ(X) is the estimate of cost to reach an answer node
from node X (in the sub-tree of node X).
Lowest-cost-first search finds the path with
the lowest cost to a goal node.
At each stage, it selects the path with the
lowest cost on the frontier.
The frontier is implemented as a priority
queue ordered by path cost.
Example…
My Soln.
Exercise:
Find the worst-case time complexity of the
LC search algorithm in previous slide.
Find the required space needed for same
algorithm.