Solving and Matching Equations to Graphs