top of page
Search

Searching basic: Depth-First and Width-First

  • Writer: Yitong Chen
    Yitong Chen
  • Sep 12, 2020
  • 2 min read

Updated: 7 days ago


Searching is a basic idea in AI. Because using AI is mainly about finding a solution to some problem, and the way computer utilized to find a solution is searching. In this blog I will talk about two basic searching concepts: depth-First Searching and Width-First Searching.

Depth-First Searching: The concept of depth represents progress, percentage of completing, or level. Depth-First Searching aims at finding the entire solution one by one, no matter the solution is easy or hard to accomplish. Here, one by one means the computer will aim at one possible route without returning to the previous intersection unless it has reached an end.

Width-First Searching: The concept of width represents scales, directions, and possibilities. Width-First Searching is not kin of finding a solution fast, but it focuses on overall performance of possible solutions.

To be clear about the differences between those two searching methods, I will take new product development for example.

If a company is using Depth-First Searching to develop new products, it will pick one product plan and execute it till the product has been made. If the product is satisfying, then this company will be happy to stick to this product and not developing other products, given the company only want a satisfying product.

But a company utilizing Width-First Searching will behave differently. This company will develop as many products as they are able to develop simultaneously. If in a certain phrase a product turned out to be impossible to develop or not worthwhile to finish, it will abolish this plan. And if one product is significantly outperforming the others, it will be emphasised on.

Though I would prefer the Width-First type, those two types have their own advantages. Depth-First Searching gives a solution fast, which means if it is a recurring problem, you can solve the first several turns in a non-optimal solution and when better solution is generated you can opt to new solutions. Width-First Searching does give you the optimal solution only, but it may take a long time. It is not suitable for finding solutions for urgent problems. But this kind of competence continues because if the non-optimal solution found by Depth-First Searching is so bad that it takes decades to solve the problem, it will be a waste of time. Therefore, my opinion on this debate is that setting criteria will solve most of the problems. If a solution is satisfying, which means it meets criteria, it should be admitted to using. New solution can still be searched and replace the old solution.


 
 
 

Comments


Post: Blog2_Post
bottom of page