Ch 2 (a)_Problem Solving State-Space Search and Control Strategies
Ch 2 (a)_Problem Solving State-Space Search and Control Strategies
State-Space Search
and Control Strategies
Chapter 2 (a)
Problem Characteristics
Heuristic search is a very general method
applicable to a large class of problem.
In order to choose the most appropriate method
(or combination of methods) for a particular
problem it is necessary to analyze the problem
along several key dimensions.
Is the problem decomposable into a set of
independent smaller sub problems?
Contd..
Decomposable problems can be solved by the
divide-and-conquer technique.
Each sub-problem is simpler to solve.
Each sub-problem can be handed over to a different
processor. Thus can be solved in parallel processing
environment.
Is problem non decomposable? Need different
strategies
For example, Block world problem is non
decomposable.
Initial State (State0) Goal State
A
C B
A B C
Start: ON(C, A) ….
Goal: ON(B, C) ON(A, B)
Contd..
(0, 0)
(4, 0) (0, 3)
(0, 0)
(4, 0) (0, 3)
(4, 0)
(0, 3) (4, 0)
C1
7 12 15 11
20
C2 10 13 C3
12 C4 17
5
C5
D(C1,C2) = 7; D(C1,C3) = 11; D(C1,C4) = 12; D(C1,C5) = 15; D(C2,C3) =20;
D(C2,C4) = 10; D(C2,C5) =12; D(C3,C4) =13; D(C3,C5) = 17; D(C4,C5) =5;
Contd..
A simple motion causing and systematic control
structure could, in principle solve this problem.
Explore the search tree of all possible paths and
return the shortest path.
This will require 4! paths to be examined.
If number of cities grow, say 25 cities, then the time
required to wait a salesman to get the information
about the shortest path is of 0(24!) which is not a
practical situation.
Contd..
This phenomenon is called combinatorial
explosion.
We can improve the above strategy as follows:
Begin generating complete paths, keeping track of the
shortest path found so far.
Give up exploring any path as soon as its partial
length becomes greater than the shortest path found
so far.
This algorithm is efficient than the first one, still
requires exponential time some number raised to N
(number of cities).
Paths explored. Assume C1 to be the start city Distance
Rules for boat going from left bank to right bank of the river
L1 ([n1M, m1C, 1B], [n2M, m2C, 0B]) ([(n1-2)M, m1C, 0B], [(n2+2)M, m2C, 1B])
L2 ([n1M, m1C, 1B], [n2M, m2C, 0B]) ([(n1-1)M,(m1-1)C,0B],[(n2+1)M,(m2+1)C, 1B])
L3 ([n1M, m1C, 1B], [n2M, m2C, 0B]) ([n1M, (m1-2)C, 0B], [n2M, (m2+2)C, 1B])
L4 ([n1M, m1C, 1B], [n2M, m2C, 0B]) ([(n1-1)M, m1C,0B],[(n2+1)M, m2C, 1B])
L5 ([n1M, m1C, 1B], [n2M, m2C, 0B]) ([n1M, (m1-1)C, 0B], [n2M, (m2+1)C, 1B])
Rules for boat coming from right bank to left bank of the river
R1 ([n1M, m1C, 0B], [n2M, m2C, 1B]) ([(n1+2)M, m1C, 1B], [(n2-2)M, m2C, 0B])
R2 ([n1M, m1C, 0B], [n2M, m2C, 1B]) ([(n1+1)M,(m1+1)C,1B],[(n2-1)M,(m2-1)C, 0B])
R3 ([n1M, m1C, 0B], [n2M, m2C, 1B]) ([n1M, (m1+2)C, 1B], [n2M, (m2-2)C, 0B])
R4 ([n1M, m1C, 0B], [n2M, m2C, 1B]) ([(n1+1)M, m1C,1B],[(n2-1)M, m2C, 0B])
R5 ([n1M, m1C, 0B], [n2M, m2C, 1B]) ([n1M, (m1+1)C, 1B], [n2M, (m2-1)C, 0B])
One of the possible paths
Start ([3M, 3C, 1B], [0M, 0C, 0B]]
L2: ([2M, 2C, 0B], [1M, 1C, 1B]) 1M,1C
R4: ([3M, 2C, 1B], [0M, 1C, 0B]) 1M
L3: ([3M, 0C, 0B], [0M, 3C, 1B]) 2C