A graph-theoretic algorithm for the solution of a linear diophantine problem of frobenius