private static boolean checkEdges(ConnectedGraph G1, ConnectedGraph G2, Map map, int n) {
		// Check edges in the forward direction.
		for (int i = 0; i < n; i++) {
			int key = map.getKey(i);
			int value = map.getValue(i);
			
			if (G1.V[key].children.length != G2.V[value].children.length) {
				System.out.println("Error. Map sets correspondence between nodes with different number of children! ");
				return true;
			}

			for (int j = 0; j < G1.V[key].children.length; j++) {
				int key1 = G1.V[key].children[j].data;
				for (int l = 0; l < G1.V.length; l++){
					if (G1.V[l].data == key1){
						key1 = l;
						break;
					}
				}
				int value1 = map.mapKey(key1);
				
				value1 = G2.V[value1].data;
				
				boolean flag = false;

				for (int k = 0; k < G2.V[value].children.length; k++) {
					if (G2.V[value].children[k].data == value1) {
						flag = true;
						break;
					}
				}
				if (flag == false) {
					System.out.println("Error. An edge was not mapped! ");
					return true;
				}
			}
		}
		return false;
	}