Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Walks

A walk of length kk from node ss to node tt is a sequence

s=v0,v1,…,vk=ts=v_0,v_1,\dots,v_k=t

such that (vi−1,vi)∈E(v_{i-1}, v_i)\in E for every i=1,…,ki=1,\dots,k.

The number of walks of length kk from node ss to node tt is given by the (s,t)(s,t) entry of AkA^k:

(Ak)st=∑v∈V(Ak−1)svAvt(A^k)_{st}=\sum_{v\in V}(A^{k-1})_{sv}A_{vt}

In particular,

(A1)st=Ast,(A2)st=∑v∈VAsvAvt(A^1)_{st}=A_{st}, \qquad (A^2)_{st}=\sum_{v\in V}A_{sv}A_{vt}

Paths

A path is a walk in which all vertices are distinct.

The shortest-path distance from ss to tt can be written as

d(s,t)=min⁡{k≥0:(Ak)st>0}d(s,t)=\min\{k\ge 0:(A^k)_{st}>0\}

Cycles

A cycle is a closed walk with

v0=vkv_0=v_k

and no repeated vertices other than the first and last.

Dense structures

A complete graph, or clique, is a graph in which every vertex is connected to every other vertex. In an nn-node complete graph, each node has degree n−1n-1.