Uninformed Searching Algorithms in Artificial Intelligence
Searching:
Man has ability to find things and best solutions for satisfying own desires but one thing which we never realized and that is our searching power to find anything which is most useful and helpful for us. Whenever we face any problem we do search for best solution. As when we search we got lot of options to solve our problems but we select best one and most of the people says the actual problem arise when we have lot of options and select best one but in Artificial Intelligence Different Searching Algorithms help us to select best choice from many and AI major use in Searching Algorithms. The main theme of this assignment also based on Searching Algorithms of AI. There are four major characteristics to analyze Searching strategy on which base we can say our searching algorithm is best and we got our solution in most efficient manner. Below is the four major characteristics to analyze Searching strategy
Completeness:
The given searching algorithm has ability to complete whole search and give best solution in end.
Time Complexity: How much Time will be consumed to 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 cant find best Searching Algorithm.
Categories of Searching Strategy
Uninformed/Blind
Informed/Heuristic
Any Path/Non-optimal
Optimal Path
Q#1: You have to analyze algorithms under blind/uninformed search category i.e. Breadth First Search, Depth First Search, Depth Limited Search and Iterative Deepening. You must have to discuss all four characteristics for 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 to reached desired goal thats 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 of the simplest search strategy by expanded the root Node and 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 of the queue. This algorithm works at level wise mean level to level goal find and this is best systematic searching technique in which goal can find easily and quickly. This is also time saving because breadth first search always find shallowest goal state first. Now below is the Characteristics of Searching Strategy to 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 because as your level of search increasing your time will also increase which will become major headache to solve problem
Space Complexity: Take lot of memory because all the leaf nodes must be maintained in memory
Optimality: Breadth First Search considered good for optimality because if you goal exist in upper level then you can easily find and reached.
2.Depth First Search:
In this Blind Search algorithm move from root to left most successors node. It is best use of memory because it store only one path from root to leaf node. If goal not find then move to siblings if they exist but with same strategy to move left node/link. One of 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 to discard all visited nodes. In many Problems searching Depth First Search considered faster than Breadth First Search because it uses best technique by exploring small portion of whole tree for finding solution.
Completeness: Completeness effect in two ways if the desired goal gain at shallowest level then terminate otherwise the searching continue and in big tree structure its most difficult. So in short its not Complete.
Time Complexity: Depth First Search take less time because in this technique specific path follow instead of flowing whole tree and just move downward so less time required.
Space Complexity: Best use of resources because in this technique on root to leaf node path is saved and if goal not found then visited nodes will discard so it is modest way to use memory.
Optimality: One of the major drawback of depth first search is that it may get stuck on different states because if goal not found and control move deep to deep node then its difficult to find goal because 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 and space complexity is same like Depth first search but with little modification as its name suggest Limited search and this can be done through general search algorithm. As is already discussed in DFS the goal cant find if searches down with infinite length tree so in this way DFS not guaranteed to find the solution thats why it not fulfill the characteristic of Completeness so for solving this problem of DFS introduced DLS. DLS guaranteed to find solution with in given depth limit but its not sure to find most optimal path so its not optimal.
Completeness: It is complete search strategy.
Time Complexity: Just move root to leaf so easy take less time as compared to others searching algorithms.
Space Complexity: Less space required no need to store extra nodes which visited already.
Optimality : Not optimal
4.Iterative Deepening Search
Iterative Deepening Search is the combination of Depth First Search and Breadth First Search. In short this combine the best part of both algorithms like IDS is complete and optimal like Breadth First Search with use of less memory like Depth First Search. If take its time then its not better than Breadth First Search because if goal not found then nodes expanded on 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 of time.
Space Complexity: Use less space by using technique of DFS.
Optimality : yes! Find goal by using best technique so it become easy to reach desired goal by searching best method
Q#2: Compare these algorithms with each other and discuss with reasons/examples that which algorithm is better then other and 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 and some are best in other environment these both depend on their characteristics. According to the above discussed unique characteristics of four searching algorithms we can compare them. These algorithms compare according to Characteristics of searching strategy which are completeness, time complexity, space complexity and optimality.
Breadth First Search & Depth First Search
These both are most important and simple in implementation Uninformed/Blind search algorithms and both has opposite characteristics. If we discuss according to their performance and faster searching then BFS said to be faster because it uses shallowest searching technique and works at level wise and on other hand DFS searching to depth so if your goal exist in upper level like Goal may be at level 2 then BFS find it fast and show result but if tree is long then DFS search depth and may b just searching on depth level and got stuck.
Example 1:
If our Goal is UOG and we move from Jhelum then we have many paths to reach UOG and some may be not take us at UOG so which we select?
If apply BFS then we will got our Goal at level 3 and terminate but if we apply DFS then search start from jhe then sar,mad,kal,lal so its not optimal way to find path.
Depth First Search & Depth Limited Search
Depth Limited search is use to eliminate the problems of DFS because in DFS goal may not be find if length of tree infinite so with DLS we can overcome from this problem by setting the limit and the search process start and do work until limit value become false. Limit value set according to 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 because in this least one goal state at a depth which less than l, so in this way this algorithm guaranteed to find goal. If apply DFS then that goal move to left most node with depth so its become difficult to reached our goal.
Iterative Deepening Search VS DFS,BFS & DLS
IDS is combine with the best characteristics of DFS and BFS. IDS is basically use to overcome the problem of DLS because in DLS if we dont have idea about the lowest depth of a goal state then always find the best limit l by trying all possible depths for l until we achieved a goal state. But this technique become wasteful because all the DLS for limit l less than the goal level are not useful and its may be possible many states are expanded many times. So in DLS searching time may be spent at the deepest level of the search tree. So this Searching algorithm works well and in optimal way.
Example 3:
If we assume we dont have any goal in above example and perform search to 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 and got two child B and C as one thing in mind perform DFS and BFS properties and then we see our goal on each depth and expand further in this way our iterations will be
A
ABC
ABEFCGI
ABEJFKCGLIM
In this way whole tree will be searched and it is Complete and Optimal like BFS because all Nodes expanded on each level and it is also modest memory requirements like DFS because just store the result of goal and other visited nodes discard mean not visit again and again.
So now if Compare all Four algorithms in terms of Characteristics of Searching Strategy then result will be
Completeness:
BFS: Goal exist in finite depth then terminate
DFS: Mostly problem searching its not completed and got stuck
DLS: Provide complete search strategy
IDS: Best technique for complete search
Time Complexity:
BFS: Not Time Saving
DFS: Take less time in some situation but most of time also show opposite reaction
DLS: Take less time
IDS: Not time saving because its time complexity equal to BFS
Space Complexity:
BFS: Using lot of memory so not good for resources
DFS: Save lot of memory best for utilizing resources
DLS: Less space required
IDS: Use technique of DFS so less space use
Optimality:
BFS: Provide optimal solution
DFS: Not give optimal solution
DLS: Not optimal for finding solution
IDS: Best! Provide optimal solution
So, in short best one algorithm is IDS but other also best depend on their problem situation as discussed above comparison.
Q#3: Explain how we can improve the performance of all said algorithms?
Before choosing the Searching Algorithm first analyze the problem carefully because without any proper knowledge and understanding about problem we cant move further and select best searching technique. As in above two questions briefly explain their advantages and disadvantages which gives according to the four basic pillars of searching in AI those are the Characteristics. And the Algorithm which satisfied the maximum characteristics of searching strategy is Iterative Deepening Search. As we cant break the rules which defined in above four searching algorithms so the best way is to improve their performance is chose best searching algorithm according to problem. Analyze the problem carefully and see which algorithms satisfied maximum characteristics and then apply search.
Q#4: Convert following graph in tree and apply Breadth First Search. You have to apply step by step process and show status of OPEN and 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] |
Last week I posted here about how I need to start keeping track of my income and stop screwing around online so much. Then I posted here about taking a Facebook Fast, or at least turning off the notifications that flood my email inbox. You wont believe how my little productivity experiment went. It was a real eye-opener! Against my better judgment Im going to go ahead and post this picture. Its grainy and small but you will at least get the idea of how I set up my spreadsheet and if you get out a magnifying glass you can read the numbers! I apologize that I dont have graphic design skills. Basically what this is saying is that I only worked 24.66 hours last week, made $682.17 and averaged $27.66 per hour. 1. This is the most I have made in a week since I started doing this in earnest back in April. 2. I feel like I worked a lot less than usual. Having to track my other made me cognizant of when I was messing around. 3. About 25 hours of working allowed me to have lots of fun with my kids, complete my chores and do somewhat of an overhaul of the "playroom" ... resulting in getting rid of 2 bags of things from the house. Progress! This week proofreading has died down significantly so Im focusing more on creating original content and on the house/kids. I dont know if Ill be able to make that much in a week again, but I was surprised that I could. If I worked at that rate of income for 40 hours per week for 52 weeks per year that would be a salary of: $57,532 Not too shabby!
Read More..
*Im not going to get into with you if this is ethical or not. It is happening and that is all. As long as someone is not providing you with review text and you are giving your own honest review, I dont see a problem with this. You are being paid for your TIME, not for a 5-star review. I personally always feel smarmy asking for a review on any of my own ebooks for free ... someone is spending their time to check out my book and I feel like they should be compensated. Okay, that being said, there are a lot of companies and authors looking for book reviews. Product reviews are a different animal and I would not do one of those unless provided with the product. Heres my personal experience with doing book reviews for Fiverr clients: It was too busy and I could not keep up! Then someone reported me or something and I got shut down. Fiverr shut down my book review gig and wont let me even put REVIEW in any of my gigs anymore. Im not sure how this highly successful Fiverr seller has gotten away with it for years but see how she words her gigs. Remember that when you are first starting on Fiverr you cant offer the EXTRAS like she is doing ... I believe you can do that after about 30 days. Then its nice to be able to charge an extra 2 gigs for 24-hour turnaround if you are able. For now you can charge one gig for the review and another gig for any ebook priced up to $4 and a third gig for any ebook priced up to $8 (Fiverr takes 20% of your sales so keep in mind you get $4 per paid gig and not $5). You keep any overage. You simply purchase the ebook on Amazon, peruse it, speed read, whatever, and give a review. If there are ever any problems with getting paid from a buyer, simply go back to Amazon and request a refund for your ebook purchase. The seller I referenced above, plus all the others doing this, must be speed readers or have a lot of time on their hands as shut-ins or something???? I cant figure it out and let me know if you can! I wish you success at whatever you try on Fiverr! *Do not give 24-hour service for free and do not pre-write a review until you have been paid, no matter how big a hurry you are in. There are people/buyers on Fiverr who are looking for free work and will threaten to give you bad feedback if you dont cancel their order and give it to them for free. Trust your instincts on jobs like this.
Read More..
You might not know that I homeschool, so I have FIVE little people around all day. You must be wondering at this point if I have a clone so I can write for so many regional parenting publications.
I wish!
No matter how many kids you have running around, there are chores that need to be done, and I think I might FINALLY have something in place that will get all the little things done that need to be done around the house. And no, I did not have 5 children so they could be my minions. I am merely instilling responsibility in them now since when they grow up they will be doing chores around their own pad.
[Who am I kidding? Odds are at least two of the five will turn out like me: MESSY and SLOBBY but can find anything in a pinch for about 20 years after leaving home and THEN the realization will hit them around 40 that keeping things kinda picked up and purged is a lot easier than cleaning for days at a time after it gets out of hand!]
Just head over to my its-a-good-kind-of-crazy blog about my life, The Kerrie Show, to check out my chore chart. You also get a bonus Funny Bathroom Cleaning Instructions. Its a little service I like to provide, no charge.
Read More..
C# Program to solve different problems
Program Statement: Write a program which will take input a character a value from user. You have to use switch statement to decide if value of a is t then you have to call table function, if value of a is f then call factorial function, if value of a is p then call prime function, if value of a is s then call search function. You have to write four functions in your program; Search(char n5[], char c, char choice) Table function will print the table of n1 from 1 to n2. Factorial function will print the factorial of n3 if n3 is multiple of 2. Prime function will print the n4 if n4 is prime. Search function will take first argument n5 as an array of characters and second element a character to be search in the array and third element a character to decide which searching algorithm to be used.i.e. if user has passed the value of c as s then Search function will perform the sequential search but if value of c is something else then Search function will perform binary search. Structure of your program will be like this. You have to make it exactly working. class functions { public int fact = 1; public void factorial(int n3) { if (n3 % 2 == 0) { for (int i = 1; i <= n3; i++) { fact = fact * i; } Console.WriteLine(" Factorial is : {0} ", fact); } else { Console.WriteLine(" Its not multiple of 2! "); } } public void prime(int n4) { int i = 2;
if (n4 == 1) { Console.WriteLine("Number is not prime!"); } for (i = 2; i <= n4 - 1; i++) { if (n4 % i == 0) { Console.WriteLine("Number is not prime!"); break; } } if (n4 == i) { Console.WriteLine("{0} is a prime number!", n4); } } public void table(int n1, int n2) {
for (int i = 1; i <= n2; i++) { Console.WriteLine("{0} * {1} = {2}", n1, i, n1 * i); } } public void search(char[] array, char s) { int p = 0; foreach (char c in array) { if (c == s) { Console.WriteLine("Character {0} found!", c); p++; break; } } if (p == 0) Console.WriteLine("character not found."); } }
Read More..
Microsoft developing cycle is developing more reliable discoveries for their user.Achievement form Window 2000 to Windows 7.Developing cycle not stop and move forward from window 8 to now window 8.1. Window 8 get amazing fame among its users due to its amazing features with user friendly interface.Now Microsoft thought one step above from window 8 and upgrade it to window 8.1. Window 8 lovers wants to have new look of window 8 in form of window 8.1 and want to use this on their system.Users thinks that it might be tricky or complex to upgrade window 8.Today i have select this topic to teach you How To Upgrade Window 8 To Window 8.1.Just you have to follow given below easy steps to enjoy the features of window 8.1.
How To Upgrade Window 8 To Window 8.1 Create Backup Image of System:First most important steps is to create a back up of your system data.As mnay users find difficulty in upgradation steps so its necessary to have a backup using window 7 recovery tool.Advantage is that if you are unable to upgrade then you can find your old window configuration. Launche Window 7 Recovery Tool:Follow below steps to Launche Window 7 Recovery Tool.Below imge show all these steps.Press (WIN + W) to access search setting page. Type "window 7 files" without commas in setting box.Click on "window 7 file recovery".
Create A system Image:Next move to create a system image by below steps. I this steps a dialog box will appear which will ask you to specify location where you want to store your system backup.For example, you can create the system image on a set of DVD discs as in below image.
Click on start backup.When it will completed you ask to insert DVD disc as you are going to have a your system backup on DVD disc. Insert DVD disc and format it. Youll be ask to create a System Repair disc when process is complete.If you already have recovery drive click on No and you have successfully backup of your system. Note: In Windows 8, the System Repair disc is the same as the Recovery Drive.
Download the Windows 8.1 installerAfter creating backup next step is Downloading the Windows 8.1 installer.For this follow below steps.Go to >>start>>Window Store>>Window 8.1
Click on Download button. Downloading Process will be start.Window 8.1 downloading data is 4GB so its take time depending upon your internet connection.
Restart System:
After downloading window 8.1, a message will be appear,may ask you to restart your syste. Clcik on Restart now.
Setup Process: After restarting below screen will appear if you have DELL laptop/system.Now all your system data all important things will start setting up and proceed step by step till reach to 100% as below image show.
System will restart again. Accept Window 8.1 License terms:After rebooting,you will ask to accept terms of window 8.1 as below screen will appear. Click on "I Accept". Use Express Setting:On next window click on "use express setting".If you are not agree with by default setting then Click on "customize" and manage settings as you want. Use Skydrive:This steps is to use skydrive. You have enter your Microsoft Account password specify your backup email account Enter the security code that will be sent to you via your backup email account. After entering all above data click on "Use Skydrive".
Installation Of Apps:
In this steps all your previously installed apps will be reinstalled. Third-party apps may only have a tile on the Start Screen. Just click the tile and the app will be completely reinstalled.
Final Step: After many steps you are successful upgrade to window 8.1. You will see start screen which will be transparent.You can customize it according to your choice.
Read More..
The universe contains everything that exists: Earth, the Sun, the stars, galaxies (collections of billions of stars), and everything else in space. People have wondered how the universe got started for thousands of years. Most scientists now think they have the answer. They think the universe began about 14 billion years ago with a kind of big explosion. They call the explosion the big bang. WHAT HAPPENED AFTER THE BIG BANG? No one knows what caused the big bang, but scientists think they know what happened all the way back to the first seconds after the big bang. The brand new universe was very hot and very small. It blew outwards very fast. In the first three minutes, matter started to form. Hundreds of years later, the universe looked like a big ball of fire. You can picture the universe as something like a black balloon with white dots painted on it. The black represents space and the white dots are galaxies. Blowing air into the balloon makes it bigger. The spaces between each dot get farther apart as the balloon expands. As it got bigger, the universe got cooler. Hydrogen gas formed. The gas broke into clumps. The clumps came together to make galaxies and stars. Other kinds of matter formed in the stars. Finally, planets like Earth formed around some stars. IS THERE PROOF OF A BIG BANG? The expansion of the universe is evidence for the big bang. American scientist Edwin Hubble studied light coming from galaxies far out in the universe. In 1929, he found that the galaxies were speeding away from Earth and from each other in all directions. Scientists tracked the paths of the galaxies back to their starting place. They saw that all the galaxies must have started from the same place. Packing all that matter into a small area would make a very dense, searing hot ball-the big bang. Scientists use math to describe how the universe behaves. In the early 1900s, German American scientist Albert Einstein came up with equations that predict an expanding universe. These equations have correctly predicted the motions of stars, planets, and light. More proof came in the 1990s from a spacecraft called the Cosmic Background Explorer (COBE). COBE saw rays coming from far off in the universe. The rays are left over from the early days of the universe. They could only have been created in a much smaller and hotter universe long ago. WILL THE UNIVERSE KEEP EXPANDING? Scientists are not sure what will happen to the universe. They currently think it will keep expanding forever. They even think the expansion is speeding up. But scientists are still studying this question.
Read More..
|