Tous les livres

Professionnel

Applis À propos Coach Connexion Commencer la lecture

Computer Science · Glossaire

Qu'est-ce que « Breadth-first search, BFS tree » ?

Aussi appelé : breadth-first search · BFS tree

Definition 24.17 University Computer Science — Year 1 · Chapitre 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.

Lire dans le chapitre →