I wonder if there is any result relating the *degree* $d$ of the minimal polynomial of a directed finite graph to any of its topological features - such as its diameter, or any other similar 'natural' quantity.

Ideally, this should help me, given knowledge of such a topological feature, to give an upper bound on $d$.

How does the situation change if considering a *weighted* graph, such as the transition relation of a Markov chain?

**Context**: I have a nonnegative matrix $Q$ (representing the transition relation of a generic Markov chain restricted to transient states) and a column vector $v$ (representing a generic initial sub-distribution on states). It is known that the least integer $m$ such that for each vector $v$ the Krylov space $K_m(A,v)=\mathrm{span}\{v, Qv, Q^2 v,...,Q^{m-1}v\}$ is $Q$-invariant, is $m=d$, where $d$ is the degree of the minimal polynomial of $Q$. I'm trying to understand the relationship between this $d$ and the 'topology' of $Q$ seen as a graph, in the above sense. Assume there is only one connected component in the graph of $Q$.

Any reference to this problem would be greatly appreciated.

Best, Michele