File:Depth-first-tree.svg · Wikimedia Commons · See Wikimedia Commons
búsqueda en profundidad
Sign in to saveAlso known as DFS, depth-first traversal, depth first search, depth-first search
algorithm for traversing or searching tree or graph data structures
Key facts
- Class
- Search algorithm
- Data structure
- Graph
- Worst case performance
- O ( | V | + | E | ) {\displaystyle O(|V|+|E|)} for explicit graphs traversed without repetition, O ( b d ) {\displaystyle O(b^{d})} for implicit graphs with branching factor b searched to depth d
- Worst case space complexity
- O ( | V | ) {\displaystyle O(|V|)} if entire graph is traversed without repetition, O(longest path length searched) = O ( b d ) {\displaystyle O(bd)} for implicit graphs without elimination of duplicate nodes
- Optimal
- no (does not generally find shortest paths)
via Wikipedia infobox
Described at

Depth first search - Wikimedia Commons
commons.wikimedia.org →Link to a page describing this subject · 937 chars · not written by Vinony
Wikidata facts
- Subclass of
- graph traversal
- Image
- Depth-first-tree.svg
Show 7 more facts
- Commons category
- Depth-first search
- uses
- LIFO
- short name
- DFS
- maintained by WikiProject
- WikiProject Mathematics
- used by
- intelligent agent
- Commons gallery
- Depth first search
- described at URL
- commons.wikimedia.org/wiki/Depth_first_search
Sources (2)
via Wikidata · CC0
Article · Español
Una Búsqueda en profundidad (en inglés DFS o Depth First Search) es un algoritmo de búsqueda no informada utilizado para recorrer todos los nodos de un grafo o árbol (teoría de grafos) de manera ordenada, pero no uniforme. Su funcionamiento consiste en ir expandiendo todos y cada uno de los nodos que va localizando, de forma recurrente, en un camino concreto. Cuando ya no quedan más nodos que visitar en dicho camino, regresa (Backtracking), de modo que repite el mismo proceso con cada uno de los hermanos del nodo ya procesado. Análogamente existe el algoritmo de búsqueda en anchura (BFS o Breadth First Search).
Abstract from DBpedia / Wikipedia · CC BY-SA