Todos os livros

Profissional

Apps Sobre Coach Entrar Começar a ler

Computer Science · Glossário

O que é Breadth-first search, BFS tree?

Também chamado de: breadth-first search · BFS tree

Definition 24.17 University Computer Science — Year 1 · Capítulo 24 — Graphs and Traversals

A breadth-first search from ss keeps a queue of discovered vertices, initially ss; it removes the vertex uu at the head and discovers each undiscovered neighbour vv of uu, setting dist[v]=dist[u]+1\texttt{dist}[v] = \texttt{dist}[u] + 1 and the parent of vv to uu, and adds it at the tail. The parent links form the BFS tree, rooted at ss.

Ler no capítulo →