Breadth first search

Материал из WEGA
Версия от 14:07, 24 февраля 2011; Glk (обсуждение | вклад) (Новая страница: «'''Breadth first search''' --- поиск в ширину. Given the adjacency lists <math>A(v)</math> for each vertex <math>v</math> of a connected graph (directe…»)
(разн.) ← Предыдущая версия | Текущая версия (разн.) | Следующая версия → (разн.)

Breadth first search --- поиск в ширину.

Given the adjacency lists [math]\displaystyle{ A(v) }[/math] for each vertex [math]\displaystyle{ v }[/math] of a connected graph (directed or undirected), the following algorithm conducts a breadth first search. On completion of the search, each vertex has acquired a breadth first index (BFI) indicating the order in which the vertex was visited. The vertex [math]\displaystyle{ u }[/math] is visited first and [math]\displaystyle{ BFI(u) = 0 }[/math].