Matching Parent Functions to Graphs