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

A graph has edges \(12, 13, 23, 34\). How many walks of length 2 (vertices may repeat) start and end at \(3\)?

Choose one option.

Show answer
  • B. 3

Explanation

They are 3,x,3 with x a neighbour of 3: x can be 1, 2 or 4. In general the diagonal entry of A² is the degree.

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