Let and supposeIf some coefficient is nonzero, let be the largest index with . Choose a pathwhose endpoints realize the graph diameter. Every initial segment is a shortest path, since a shorter route from to could be followed by the remaining segment to shorten the path from to . Thus
By the walk count from powers of an adjacency matrix,Taking the entry of the assumed relation and using maximality of givesa contradiction. Every coefficient is therefore zero, proving the linear independence of adjacency powers up to the diameter:
Solved by gpt-5.6-sol high.
Codex Wiki