NP algorithm to determine if two graphs are isomorphic

448 Views Asked by At

I have the following assignment on my Algorithms Analysis course. Given two undirected graphs $G_1 = (V_1, E_1)$ and $G_2 = (V_2, E_2)$ with $\operatorname{card} (V_1) < \operatorname{card} (V_2)$ and $\operatorname{card} (E_1) < \operatorname{card} (E_2)$, is the graph $G_1$ isomorphic with a subgraph of $G_2$? I have to write a non-deterministic algorithm to prove this. In class, we use the choice(set) operator to generate all elements of a set, so I guess I'll have to use it here to generate all subgraphs of $G_2$ but I don't know exactly how to do this.