0% found this document useful (0 votes)
57 views1 page

AI Search Trees vs Graphs Explained

Uploaded by

Renukadevi D
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views1 page

AI Search Trees vs Graphs Explained

Uploaded by

Renukadevi D
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

AI Notes: Problems, Problem Spaces, and Search

1. Search Trees vs Search Graphs

- A Search Tree is a tree-like structure where nodes represent states and edges are actions.

- A Search Graph is more efficient for problems with duplicate states.

- Trees may generate the same node multiple times, wasting effort.

- Graphs avoid this by tracking visited nodes (requires bookkeeping).

2. Duplicate Node Checking

Algorithm: Check Duplicate Nodes

1. Check if node already exists in the search graph.

2. If yes:

a. Use existing node.

b. If the new path is better, update the path.

c. Otherwise, discard it.

3. This avoids unnecessary duplication.

3. Graph Search Efficiency

- Especially useful in partially commutative systems (order of operations doesn't affect result).

- Systematic searches might explore same node via different paths.

- Graph search prevents this redundancy, making search more efficient.

4. Example: Water Jug Problem

- A classic AI example involving pouring water between jugs.

- Many paths lead to the same state.

- Using a graph avoids re-exploring identical states.

Common questions

Powered by AI

In graph search, when encountering duplicate paths, the algorithm first checks if the node already exists. If the new path offers a better solution, the path is updated; otherwise, the node is discarded. This mechanism ensures only the most efficient paths are utilized and prevents needless duplication .

Bookkeeping in search graphs is essential for efficiency as it involves maintaining a record of visited nodes. This prevents the duplication of states that is common in search trees, thus conserving computational power and avoiding redundant processing of identical nodes or states .

Graph search enhances efficiency in partially commutative systems, where the order of operations doesn't affect the result, by systematically avoiding the exploration of the same node via different paths. This prevention of redundancy through node bookkeeping ensures a more resource-efficient search process .

Search graphs are particularly advantageous in scenarios involving multiple paths leading to the same state, such as in the water jug problem. Their ability to track visited nodes and prevent redundant explorations of duplicate states results in a more efficient search process compared to methods like search trees that lack such node tracking .

The water jug problem exemplifies the benefit of search graphs as it involves multiple paths leading to the same state. Using a search graph avoids re-exploring these identical states through node tracking, unlike a search tree, which may inefficiently generate and explore duplicate states due to its structure .

Node duplication in search algorithms leads to redundant work and inefficiency, as multiple identical nodes are explored. In graph searches, this is addressed by checking if a node already exists in the search graph. If it does, the existing node is used, thereby avoiding unnecessary duplication and conserving computational resources .

Even systematic searches can encounter redundancy if they explore the same node via different paths. The systematic nature doesn't prevent multiple identical nodes due to varied paths unless a structure like a graph search is employed to prevent such duplications through node bookkeeping .

Updating paths when a better path is found in a graph search optimizes the search process and ensures that the best route to each node is always utilized. This prevents exploring less efficient paths and reduces computational redundancy, ultimately leading to faster and more optimal search results .

Search trees represent problems where nodes are states and edges involve actions; however, they may redundantly generate the same node multiple times, leading to inefficiency. Search graphs, on the other hand, track visited nodes using bookkeeping, which prevents duplication and is more efficient, especially in systems with duplicate states .

A search tree might generate the same node multiple times due to its tree-like structure that does not track visited nodes. This leads to inefficiency as the computational effort is wasted on processing identical nodes repeatedly, hindering the effectiveness of the search .

You might also like