Exercise · ZW-PATH-IN-A-GRAPH-006 · ★★☆ Intermediate

Take the graph with edges \(12, 23, 34\). How many walks of length 3 go from \(1\) to \(2\) (vertices may repeat)?

Choose one option.

Show answer
  • A. 2

Explanation

They are 1,2,1,2 and 1,2,3,2; the number of walks of length 3 is the (1,2) entry of A³, which equals 2.

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-005 ZW-PATH-IN-A-GRAPH-007 →