Exercise · ZW-PATH-IN-A-GRAPH-003 · ★☆☆ Basic

In the 5-cycle \(1,2,3,4,5\) (edges \(12,23,34,45,51\)), what is the length of the shortest path from \(1\) to \(3\)?

Choose one option.

Show answer
  • D. 2

Explanation

There is 1, 2, 3 of length 2; the other way, 1, 5, 4, 3, has length 3.

Study Discrete mathematics in ZWMath →

Review the concept: Path in a graph

A path of length \(k\) is a sequence of vertices \(v_0,\dots,v_k\) such that each consecutive pair is joined by an edge of \(E\).

\[\{v_{i-1},v_i\}\in E,\qquad i=1,\dots,k\]

More practice problems: path in a graph

← ZW-PATH-IN-A-GRAPH-002 ZW-PATH-IN-A-GRAPH-004 →