To generate an instance (G,G') run python generate.py n1 e1 n2 e2
where n1,e1 are the number of nodes and edges in the bigger graph (G'), n2,e2 are the number of nodes and edges in the smaller graph (G). In the current code, it is guaranteed that G is a subgraph of G'. However, you can change the variable guaranteed_subgraph to false, to generate G,G' where G may not be a subgraph of G'. You can store in the instance in a file by redirecting the output to a file:
python generate.py n1 e1 n2 e2 > filename
To check whether a mapping (in the given output format) is valid, you can run
python check.py test.input test.output
where test.input is in the described input format, and test.output is in the described output format.