Labeled graphs, in which edges are labeled by letters from some alphabet Σ, are extensively used to model many types of relations associated with actions, costs, owners, or other properties. Each path in a labeled graph induces a word in Σ∗ – the one obtained by concatenating the letters along the edges in the path. Classical graph-theory problems give rise to new problems that take these words...