From 81d37507aa99174a23e74ef1f58e2745ce3c2213 Mon Sep 17 00:00:00 2001 From: Bemwa Malak Date: Wed, 18 Jan 2023 15:15:04 +0200 Subject: [PATCH] Update breadth-first-search.md Fixed naming for vertices variables to be consistent with the rest of the statement --- src/graph/breadth-first-search.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/graph/breadth-first-search.md b/src/graph/breadth-first-search.md index d8408c9e5..458f417bd 100644 --- a/src/graph/breadth-first-search.md +++ b/src/graph/breadth-first-search.md @@ -154,7 +154,7 @@ the criterion is the condition $d_a [v] + d_b [v] = d_a [b]$. * Find the shortest path of even length from a source vertex $s$ to a target vertex $t$ in an unweighted graph: For this, we must construct an auxiliary graph, whose vertices are the state $(v, c)$, where $v$ - the current node, $c = 0$ or $c = 1$ - the current parity. -Any edge $(a, b)$ of the original graph in this new column will turn into two edges $((u, 0), (v, 1))$ and $((u, 1), (v, 0))$. +Any edge $(u, v)$ of the original graph in this new column will turn into two edges $((u, 0), (v, 1))$ and $((u, 1), (v, 0))$. After that we run a BFS to find the shortest path from the starting vertex $(s, 0)$ to the end vertex $(t, 0)$. ## Practice Problems