Added DIMACS graph construction