AI IMP
AI IMP
BFS DFS
BFS stands for Breadth First Search. DFS stands for Depth First Search.
BFS uses Queue data structure for DFS uses Stack data structure.
finding the shortest path.
BFS builds the tree level by level. DFS builds the tree sub-tree by
sub-tree.
BFS does not use the backtracking DFS uses backtracking to traverse all
concept. the unvisited nodes.
BFS is more suitable for searching DFS is more suitable when there are
vertices closer to the given source. solutions away from source.
BFS is slower than DFS. DFS is faster than BFS.
It works on the concept of FIFO It works on the concept of LIFO
(First In First Out). (Last In First Out).
In BFS, there is no problem of In DFS, we may be trapped into
trapping into finite loops. infinite loops.
It is not memory efficient as it It is memory efficient as it requires
requires more memory than DFS. less memory than BFS.
BFS is used in various applications DFS is used in various applications
such as bipartite graphs, shortest such as acyclic graphs and finding
paths, etc. strongly connected components etc.
2.Draw and explain the architecture of rule-based expert system architecture.
● “An expert system is a computer system that emulates, or acts in all respects,
with the decision-making capabilities of a human expert.”
● Expert Systems = knowledge-based systems = knowledge-based expert
systems.
● Rule bases system is same as the production system.
● When we creating and maintain the production system and find initial state
to goal state then rule base system is used.
● Learning module and history file are not common components of expert
systems when they are provided they are used to assist in building and
refining the knowledge base.