Uninformed Searching Algorithms in Artificial Intelligence
Searching:
Man has ability toward find things furthermore best solutions beneficial to satisfying own desires but one thing which we never realized furthermore that is our searching power toward find anything which is most useful furthermore helpful beneficial to us. Whenever we face any problem we do search beneficial to best solution. As when we search we got lot regarding options toward solve our problems but we select best one furthermore most regarding the people says the actual problem arise when we have lot regarding options furthermore select best one but in Artificial Intelligence Different Searching Algorithms help us toward select best choice from many furthermore AI major use in Searching Algorithms. The main theme regarding this assignment also based at Searching Algorithms regarding AI. There are four major characteristics toward analyze Searching strategy at which base we can say our searching algorithm is best furthermore we got our solution in most efficient manner. Below is the four major characteristics toward analyze Searching strategy
Completeness:
The given searching algorithm has ability toward complete whole search furthermore give best solution in end.
Time Complexity: How much Time will be consumed toward get proper solution by following searching technique.
Space Complexity: How much sources will utilize during searching process.
Optimality: Find out best quality solution from many.
Without above mentioned Search strategy we can’t find best Searching Algorithm.
Categories regarding Searching Strategy
• Uninformed/Blind
• Informed/Heuristic
• Any Path/Non-optimal
• Optimal Path
Q#1: You have toward analyze algorithms under blind/uninformed search category i.e. Breadth First Search, Depth First Search, Depth Limited Search furthermore Iterative Deepening. You must have toward discuss all four characteristics beneficial to each algorithm ONE BY ONE.
Uninformed/Blind search is same like work with blank mind but this also implement using some strategy. In this search there is no proper information about how many steps or path cost required toward reached desired goal that’s why it also called Blind search. Six Uninformed search strategies are as follow
• Breadth First Search
• Depth First Search
• Depth Limited Search
• Iterative Deepening Search
• Bidirectional Search
• Uniform Cost Search
1.Breadth First Search:
Breadth First Search is one regarding the simplest search strategy by expanded the root Node furthermore then generated other nodes from Root in this way got successors. This search can also implemented by calling General Search Algorithm. In this manner a queuing function is used which puts the newly generated states at the end regarding the queue. This algorithm works at level wise mean level toward level goal find furthermore this is best systematic searching technique in which goal can find easily furthermore quickly. This is also time saving since breadth first search always find shallowest goal state first. Now below is the Characteristics regarding Searching Strategy toward see weather Breadth First Search fulfill all four characteristics or not
Completeness: If goal exist in finite depth then terminate.
Time Complexity: Not time saving since as your level regarding search increasing your time will also increase which will become major headache toward solve problem
Space Complexity: Take lot regarding memory since all the leaf nodes must be maintained in memory
Optimality: Breadth First Search considered good beneficial to optimality since if you goal exist in upper level then you can easily find furthermore reached.
2.Depth First Search:
In this Blind Search algorithm move from root toward left most successors node. It is best use regarding memory since it store only one path from root toward leaf node. If goal not find then move toward siblings if they exist but with same strategy toward move left node/link. One regarding the most important thing which should be follow when applying this strategy, already visited/explore or write node will not visited again so best way is toward discard all visited nodes. In many Problems searching Depth First Search considered faster than Breadth First Search since it uses best technique by exploring small portion regarding whole tree beneficial to finding solution.
Completeness: Completeness effect in two ways if the desired goal gain at shallowest level then terminate otherwise the searching continue furthermore in big tree structure its most difficult. So in short its not Complete.
Time Complexity: Depth First Search take less time since in this technique specific path follow instead regarding flowing whole tree furthermore just move downward so less time required.
Space Complexity: Best use regarding resources since in this technique at root toward leaf node path is saved furthermore if goal not found then visited nodes will discard so it is modest way toward use memory.
Optimality: One regarding the major drawback regarding depth first search is that it may get stuck at different states since if goal not found furthermore control move deep toward deep node then its difficult toward find goal since you away from real goal as the real goal may exist at upper level so in this way it is not optimal.
3.Depth Limited Search:
This searching algorithm works same like Depth First search as its time furthermore space complexity is same like Depth first search but with little modification as its name suggest Limited search furthermore this can be done through general search algorithm. As is already discussed in DFS the goal can’t find if searches down with infinite length tree so in this way DFS not guaranteed toward find the solution that’s why it not fulfill the characteristic regarding Completeness so beneficial to solving this problem regarding DFS introduced DLS. DLS guaranteed toward find solution with in given depth limit but its not sure toward find most optimal path so its not optimal.
Completeness: It is complete search strategy.
Time Complexity: Just move root toward leaf so easy take less time as compared toward others searching algorithms.
Space Complexity: Less space required no need toward store extra nodes which visited already.
Optimality : Not optimal
4.Iterative Deepening Search
Iterative Deepening Search is the combination regarding Depth First Search furthermore Breadth First Search. In short this combine the best part regarding both algorithms like IDS is complete furthermore optimal like Breadth First Search with use regarding less memory like Depth First Search. If take its time then its not better than Breadth First Search since if goal not found then nodes expanded at each low level. Iterative Deepening is the best search technique work in large search space with unknown depth solution.
Completeness: yes! Follow BFS best technique so it is complete searching algorithm. So when goal achieved terminate
Time Complexity: Its not time saving in other words its most worse than BFS in matter regarding time.
Space Complexity: Use less space by using technique regarding DFS.
Optimality : yes! Find goal by using best technique so it become easy toward reach desired goal by searching best method
Q#2: Compare these algorithms with each other furthermore discuss with reasons/examples that which algorithm is better then other furthermore in what situations/environments.
The above mentioned searching algorithms in Answer 1 has some special characteristics which make them differ from each other. Some algorithms are best in some environment furthermore some are best in other environment these both depend at their characteristics. According toward the above discussed unique characteristics regarding four searching algorithms we can compare them. These algorithms compare according toward Characteristics regarding searching strategy which are completeness, time complexity, space complexity furthermore optimality.
Breadth First Search & Depth First Search
These both are most important furthermore simple in implementation Uninformed/Blind search algorithms furthermore both has opposite characteristics. If we discuss according toward their performance furthermore faster searching then BFS said toward be faster since it uses shallowest searching technique furthermore works at level wise furthermore at other hand DFS searching toward depth so if your goal exist in upper level like Goal may be at level 2 then BFS find it fast furthermore show result but if tree is long then DFS search depth furthermore may b just searching at depth level furthermore got stuck.
Example 1:
If our Goal is UOG furthermore we move from Jhelum then we have many paths toward reach UOG furthermore some may be not take us at UOG so which we select?
If apply BFS then we will got our Goal at level 3 furthermore terminate but if we apply DFS then search start from jhe then sar,mad,kal,lal so its not optimal way toward find path.
Depth First Search & Depth Limited Search
Depth Limited search is use toward eliminate the problems regarding DFS since in DFS goal may not be find if length regarding tree infinite so with DLS we can overcome from this problem by setting the limit furthermore the search process start furthermore do work until limit value become false. Limit value set according toward given problem like in below example Limit value will be l = 3
Example 2:
In the above our Goal is 4 then the DLS works well since in this least one goal state at a depth which less than l, so in this way this algorithm guaranteed toward find goal. If apply DFS then that goal move toward left most node with depth so its become difficult toward reached our goal.
Iterative Deepening Search VS DFS,BFS & DLS
IDS is combine with the best characteristics regarding DFS furthermore BFS. IDS is basically use toward overcome the problem regarding DLS since in DLS if we don’t have idea about the lowest depth regarding a goal state then always find the best limit l by trying all possible depths beneficial to l until we achieved a goal state. But this technique become wasteful since all the DLS beneficial to limit l less than the goal level are not useful furthermore its may be possible many states are expanded many times. So in DLS searching time may be spent at the deepest level regarding the search tree. So this Searching algorithm works well furthermore in optimal way.
Example 3:
If we assume we don’t have any goal in above example furthermore perform search toward find goal that not exist in above example like D so the iteration will be start from Depth 0 where just one start state A which is not the goal so we expand A furthermore got two child B furthermore C as one thing in mind perform DFS furthermore BFS properties furthermore then we see our goal at each depth furthermore expand further in this way our iterations will be
A
ABC
ABEFCGI
ABEJFKCGLIM
In this way whole tree will be searched furthermore it is Complete furthermore Optimal like BFS since all Nodes expanded at each level furthermore it is also modest memory requirements like DFS since just store the result regarding goal furthermore other visited nodes discard mean not visit again furthermore again.
So now if Compare all Four algorithms in terms regarding Characteristics regarding Searching Strategy then result will be
Completeness:
BFS: Goal exist in finite depth then terminate
DFS: Mostly problem searching its not completed furthermore got stuck
DLS: Provide complete search strategy
IDS: Best technique beneficial to complete search
Time Complexity:
BFS: Not Time Saving
DFS: Take less time in some situation but most regarding time also show opposite reaction
DLS: Take less time
IDS: Not time saving since its time complexity equal toward BFS
Space Complexity:
BFS: Using lot regarding memory so not good beneficial to resources
DFS: Save lot regarding memory best beneficial to utilizing resources
DLS: Less space required
IDS: Use technique regarding DFS so less space use
Optimality:
BFS: Provide optimal solution
DFS: Not give optimal solution
DLS: Not optimal beneficial to finding solution
IDS: Best! Provide optimal solution
So, in short best one algorithm is IDS but other also best depend at their problem situation as discussed above comparison.
Q#3: Explain how we can improve the performance regarding all said algorithms?
Before choosing the Searching Algorithm first analyze the problem carefully since without any proper knowledge furthermore understanding about problem we can’t move further furthermore select best searching technique. As in above two questions briefly explain their advantages furthermore disadvantages which gives according toward the four basic pillars regarding searching in AI those are the Characteristics. And the Algorithm which satisfied the maximum characteristics regarding searching strategy is Iterative Deepening Search. As we can’t break the rules which defined in above four searching algorithms so the best way is toward improve their performance is chose best searching algorithm according toward problem. Analyze the problem carefully furthermore see which algorithms satisfied maximum characteristics furthermore then apply search.
Q#4: Convert following graph in tree furthermore apply Breadth First Search. You have toward apply step by step process furthermore show status regarding OPEN furthermore CLOSE queues.
Answer 4:
Root Node: 0
Goal: 6
Open State | Close State |
Open=[0] | Close=[] |
Open=[1,4] | Close=[0] |
Open=[4,2,4,5] | Close=[1,0] |
Open=[2,4,5,1,5] | Close=[4,1,0] |
Open=[4,5,1,5,3,6] | Close=[2,4,1,0] |
Open=[5,1,5,3,6,5] | Close=[4,2,4,1,0] |
Open=[1,5,3,6,5,4,6] | Close=[5,4,2,4,1,0] |
Open=[5,3,6,5,4,6,2,5] | Close=[1,5,4,2,4,1,0] |
Open=[3,6,5,4,6,2,5,1,6] | Close=[5,1,5,4,2,4,1,0] |
Open=[6,5,4,6,2,5,1,6,6,7] | Close=[3,5,1,5,4,2,4,1,0] |
Open=[5,4,6,2,5,1,6,6,7,3,5,7] | Close=[6,3,5,1,5,4,2,4,1,0] |
Q#5: Convert following graph in tree furthermore apply Depth First Search. You have toward apply step by step process furthermore show status regarding OPEN furthermore CLOSE queues.
Answer 5:
Directed
Open State | Close State |
Open[E1] | Close[] |
Open[E2,E3,E5,E9] | Close[E1] |
Open[E3,E5,E8,E3,E5,E9] | Close[E2,E1] |
Open[E5,E5,E8,E3,E5,E9] | Close[E3,E2,E1] |
Open[E6,E8,E9,E5,E8,E3,E5,E9] | Close[E5,E3,E2,E1] |
Open[E9,E8,E9,E5,E8,E3,E5,E9] | Close[E6,E5,E3,E2,E1] |
Open[E8,E9,E5,E8,E3,E5,E9] | Close[E9,E6,E5,E3,E2,E1] |
Open[E9,E5,E8,E3,E5,E9] | Close[E8,E9,E6,E5,E3,E2,E1] |
Open[E5,E8,E3,E5,E9] | Close[E9,E8,E9,E6,E5,E3,E2,E1] |
Open[E6,E8,E9,E8,E3,E5,E9] | Close[E5,E9,E8,E9,E6,E5,E3,E2,E1] |
Open[E9,E8,E9,E8,E3,E5,E9] | Close[E6,E5,E9,E8,E9,E6,E5,E3,E2,E1] |
Open[E8,E9,E8,E3,E5,E9] | Close[E9,E6,E5,E9,E8,E9,E6,E5,E3,E2,E1] |
Open[E9,E8,E3,E5,E9] | Close[E8,E9,E6,E5,E9,E8,E9,E6,E5,E3,E2,E1] |
Open[E8,E3,E5,E9] | Close[E9,E8,E9,E6,E5,E9,E8,E9,E6,E5,E3,E2,E1] |
Open[E3,E5,E9] | Close[E8,E9,E8,E9,E6,E5,E9,E8,E9,E6,E5,E3,E2,E1] |
Open[E5,E5,E9] | Close[E3,E8,E9,E8,E9,E6,E5,E9,E8,E9,E6,E5,E3,E2,E1] |
Open[E6,E8,E9,E5,E9] | Close[,E5,E3,E8,E9,E8,E9,E6,E5,E9,E8,E9,E6,E5,E3,E2,E1] |
Open[E9,E8,E9,E5,E9] | Close[E6,E5,E3,E8,E9,E8,E9,E6,E5,E9,E8,E9,E6,E5,E3,E2,E1] |
Open[E8,E9,E5,E9] | Close[,E9,E6,E5,E3,E8,E9,E8,E9,E6,E5,E9,E8,E9,E6,E5,E3,E2,E1] |
Open[E9,E5,E9] | Close[,E8,E9,E6,E5,E3,E8,E9,E8,E9,E6,E5,E9,E8,E9,E6,E5,E3,E2,E1] |
Open[E5,E9] | Close[,E9,E8,E9,E6,E5,E3,E8,E9,E8,E9,E6,E5,E9,E8,E9,E6,E5,E3,E2,E1] |
Open[E6,E8,E9,E9] | Close[,E5,E9,E8,E9,E6,E5,E3,E8,E9,E8,E9,E6,E5,E9,E8,E9,E6,E5,E3,E2,E1] |
Open[E9E8E9E9] | Close[E6,E5,E9,E8,E9,E6,E5,E3,E8,E9,E8,E9,E6,E5,E9,E8,E9,E6,E5,E3,E2,E1] |
Open[E8,E9,E9] | Close[E9,E6,E5,E9,E8,E9,E6,E5,E3,E8,E9,E8,E9,E6,E5,E9,E8,E9,E6,E5,E3,E2,E1] |
Open[E9,E9] | Close[E8,E9,E6,E5,E9,E8,E9,E6,E5,E3,E8,E9,E8,E9,E6,E5,E9,E8,E9,E6,E5,E3,E2,E1] |
Open[E9] | Close[E9,E8,E9,E6,E5,E9,E8,E9,E6,E5,E3,E8,E9,E8,E9,E6,E5,E9,E8,E9,E6,E5,E3,E2,E1] |
Open[] | Close[E9,E9,E8,E9,E6,E5,E9,E8,E9,E6,E5,E3,E8,E9,E8,E9,E6,E5,E9,E8,E9,E6,E5,E3,E2,E1] |
Undirected:
As it has lot regarding branches so it has lot regarding Open[] furthermore Close[]