community
directory
books
authors
images
encyclopedia

Email:
Password:
Register

Knowledgerush Search

 

Google
  Web knowledgerush


Search for images of Breadth-first search


Message boards   Post comment

Breadth-first search

Breadth-first search (BFS) is a tree search algorithm used for traversing or searching a tree (graph theory) or tree structure. Intuitively, you start at the root node and explore all the neighboring nodes. Then for each of those nearest nodes, explore their unexplored neighbor nodes, and so on until it finds the goal.

Formally, BFS is an uninformed search method that aims to expand and examine all nodes of a tree systematically in search of a solution. In other words, it exhaustively searches the entire tree without considering the goal until it finds it. It does not use a heuristic.

From the standpoint of the algorithm, all nodes obtained by expanding any node are placed at the end of the search queue. In typical implementations, nodes that have not yet been examined for their neighbors are placed in some container (such as a queue or linked list) called "open" and then once examined are placed in the container "closed".

When searching in a unweighted cyclic graph (one that is not a tree) for a shortest path, BFS may be adapted by keeping a bit on each node to indicate that it has already been visited.

  • BFS is complete - it finds a goal-state if one exists. (That is, it reaches every node on the tree.)
  • BFS is optimal - it finds the smallest number of steps to reach the goal.
  • BFS has space complexity linear in the size(edges plus vertices) of the tree/graph searched as it needs to store all expanded nodes in memory.
  • BFS has time complexity linear in the size(edges plus vertices) of the graph or tree searched.

See also:

External links

Referenced By

Best-first search | Best first search | Depth-first search | Depth first search | List of graph theory topics | List of mathematical topics | List of mathematical topics (A-C) | List of mathematics topics | Tree search algorithm

 

Compose Your Message

Your Email Address or Pen Name (optional):
Subject:
Your Message:
 

 

 

 

 

 

This article is licensed under the GNU Free Documentation License. It uses material from the Wikipedia article "Breadth-first search".

 

Contact UsPrivacy Statement & Terms of Use

 
Copyright © 1999-2003 Knowledgerush.com. All rights reserved.