# Detour: The BEST Theorem

Learn the BEST theorem for computing the number of Eulerian cycles in a graph.

## We'll cover the following

Given an adjacency matrix $A(G)$ of a directed Eulerian graph $G$, we define the matrix
$A^∗(G)$ by replacing the *i*-th diagonal entry of $−A(G)$ by *InDegree*(*i*) for each node *i* in $G$ (the figure below).

Get hands-on with 1200+ tech skills courses.