Logo

Code Fellows

Navigation

  • index
  • next |
  • previous |
  • Python Dev Accelerator 2.0 documentation »
  • Monday »

Graph Traversal: Breadth First Search¶

Motivation¶

  • Google Robot
  • Lewis Carroll’s Doublets (Knuth does it better then you)
  • Rubic’s Cube
  • find diameter (G-d’s Number)
  • find a shortest path

Definition¶

Given a graph G, and a starting vertex s, a breadth first search, finds all vertices a distance of d from s, prior to moving to a distance of d+1. It finds all children, prior to looking for grandchildren.

Attributes¶

  • {distance | level}
  • parent
  • frontier
  • {color | is_visited}

Operations¶

  • traverse(G, s)

Table Of Contents

  • Graph Traversal: Breadth First Search
    • Motivation
    • Definition
    • Attributes
    • Operations

Previous topic

Monday

Next topic

Graph Traversal: Depth First Search

Quick search

Enter search terms or a module, class or function name.

Navigation

  • index
  • next |
  • previous |
  • Python Dev Accelerator 2.0 documentation »
  • Monday »
© Copyright 2014, Cris Ewing. Created using Sphinx 1.3.5.