Professional Documents
Culture Documents
Searching Techniques
8.0 Introduction
8.1 Control Strategies
8.2 Uninformed Search
8.3 Breadth First Search
8.4 Depth First Search
8.5 Advantages and Disadvantages
8.6 Uniform Cost Search
8.7 Depth Limited Search
8.8 Iterative dependency Depth First Search
8.9 Bidirectional Search
8.10 Review Questions
8.11 References
8.0 Introduction :
This section covers five search strategies that come under the
heading of uninformed search also called blind search . The term means that they
have no additional information about states beyond that provided in the problem
definition . All they can do is generate successors and distinguish a goal state
from a nongoal state. Strategies that know whether one non goal state is more
promising than another are called informed search or heuristic search strategies.
All the search strategies are distinguished by the order in which nodes are
expanded.
Suppose for any problem a tree is constructed with the initial state
as its root. Generate all the offspring of the root by applying each of the
applicable rules to the initial state. Now for each leaf node, generate all its
successors by applying all the rules that are appropriate . Continue this process
until some rule produces a goal state. This process is call breadth first search. The
algorithm of Breadth First Search is as given below:
Step 1: Create a variable called NODE-LIST and set it to the initial state.
(a) Remove the first element from the NODE-LIST and call it E. If
NODE-LIST was empty , quit.
(b) For each way that each rule can match the state described in E , do :
(i) Apply the rule to generate a new state.
(ii) If the new state is a goal state, quit and return this state.
(iii) Otherwise , add the new state to the end of NODE-LIST
8.3.2 Example : Two levels of Breadth first Search tree for water jug
problem:
(0,0)
(4,0) (0 , 3)
(4,3) (0 , 0) (1 , 3) (4 , 3) (0 , 0) (3,0)
Step 1: If the initial state is a goal state, quit and return suiccess.
Step 2: Otherwise , do the following until success or failure is signaled:
(a) Generate a successor, E, of the initial state. If there are no more
successors, fignal failure.
(b) Call Depth-First Search with E as the initial state.
(c) If success is returned , signal success. Otherwise continue in this loop.
8.4.2 Example : One of the solutions of water jug problem using (0,,0)
Depth First Search:
(0,3)
(3,0)
(3,3)
(4,,2)
(0,,2)
(2,,2)
(3,3)
8.6 Uniform Cost Search
Uniform Cost Search is similar to breadth first search
but expands the node with lowest path cost g(n) . It is complete and optimal if the
cost of each step exceeds some positive bound € .
8.7 Depth Limited Search
8.11 References