Skip to main content

Depth-First and Breadth-First Search

  • Chapter
The Design and Analysis of Algorithms

Part of the book series: Texts and Monographs in Computer Science ((MCS))

Abstract

Depth-first search (DFS) and breadth-first search (BFS) are two of the most useful subroutines in graph algorithms. They allow one to search a graph in linear time and compile information about the graph. They differ in that the former uses a stack (LIFO) discipline and the latter uses a queue (FIFO) discipline to choose the next edge to explore.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 69.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 89.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 109.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 1992 Springer-Verlag New York, Inc.

About this chapter

Cite this chapter

Kozen, D.C. (1992). Depth-First and Breadth-First Search. In: The Design and Analysis of Algorithms. Texts and Monographs in Computer Science. Springer, New York, NY. https://doi.org/10.1007/978-1-4612-4400-4_4

Download citation

  • DOI: https://doi.org/10.1007/978-1-4612-4400-4_4

  • Publisher Name: Springer, New York, NY

  • Print ISBN: 978-1-4612-8757-5

  • Online ISBN: 978-1-4612-4400-4

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics