Problems > Closed Walks on Wheel W4 > Editorial

Closed Walks on Wheel W4 — Solution & Editorial

Back to the Problem

The (1,1) entry of the adjacency matrix's N-th power. Matrix exponentiation in O(V³ log N).

Complexity: O(V3 log N)