5.5 Branch and Bound - Lifo and Fifo Search
5.5 Branch and Bound - Lifo and Fifo Search
● Branch and Bound refers to all state space search methods in which all children of the
ENode are generated before any other live node becomes the E-Node.
● Branch and Bound is the generalization of both graph search strategies, BFS and
D-search.
❖ A BFS like state space search is called FIFO (First in first out) search as the list of
live nodes in a first in first out.
❖ A D-search like state space search is called as LIFO (last in first out) search as the
list of live nodes in a last in first out list.
● Live node is a node that has been generated but whose children have not yet been
generated.
● E-node is a live node whose children are currently being explored. In other words, an
E-node is a node currently being expanded.
● Dead node is a generated anode that can not be expanded or explored any further.
● All children of a dead node have already been expanded. Here we will use 3 types of
search strategies:
1. FIFO (First In First Out)
2. LIFO (Last In First Out)
3. LC (Least Cost) Search
Example:
2 3 4
● Now delete an element from queue, i.e. node 2, next generate children of node 2 and place them in
queue.
3 4 5 6
● Next, delete an element from the queue and take it as an E-node, generate the children of node 3, 7, 8 are
children of 3 and these live nodes are killed by bounding functions. So we will not be included in the
queue.
4 5 6
● Again delete an element from the queue. Take it as an E-node, generate the children of 4. Node 9 is
generated and killed by boundary function. Next, delete an element from the queue. Generate children of
nodes 5, i.e., nodes 10 and 11 are generated and by boundary function, the last node in the queue is 6.
The child of node 6 is 12 and it satisfies the conditions of the problem, which is the answer node, so
search terminates.
Example:
● Generate children of node 1 and place these live nodes into stack.
● Remove element from stack and generate the children of it, place those nodes into stack. 2 is removed
from stack. The children of 2 are 5, 6. The content of stack is,
● Again remove an element from stack, i.,e node 5 is removed and nodes generated by 5 are 10, 11 which
are killed by bounded function, so we will not place 10, 11 into the stack.
● Delete an element from stack, i.,e node 6. Generate child of node 6, i.,e 12, which is the answer node, so
the search process terminates.
● In both FIFO and LIFO Branch and Bound the selection rules for the next E-node are rigid and blind.
● The selection rule for the next E-node does not give any preferences to a node that has a very good
chance of getting the search to an answer node quickly.
● In this use ranking function or cost function and generate the children of E-node, among these live
nodes; select a node which has minimum cost. By using a ranking function,calculate the cost of each
node.
● Initially we will take node 1 as E-node. Generate children of node 1, the children are 2, 3, 4.
● By using ranking function we will calculate the cost of 2, 3, 4 nodes is ĉ =2, ĉ =3, ĉ =4 respectively.
Now select a node which has minimum cost i.,e node 2. For node 2, the children are 5, 6. Between 5 and
6 we will select the node 6 since its cost minimum.
● Generate children of node 6 i.,e 12 and 13.
● Select node 12 since its cost (ĉ =1) is minimum.Here 12 is the answer node. So, we terminate the search
process.