Suppose you're given a minimal polynomial, is there an efficient and systematic (!) way to find a matrix with given minimal polynomial?
For example for $n \in \mathbb{N}$ find an $n \times n$-Matrix such that its minimal polynomial is $(X - 1)^k$ for a given $1 \leq k \leq n$.
Say we even limit ourselves to $n=5$ and $k=4$, is there a better way to find such a Matrix without using just trial and error?