public String toDot() {
		StringBuilder s = new StringBuilder();
		s.append("digraph {\n");
		s.append("\tnode [shape=point, color=white, fontcolor=white]; start;\n");
		s.append("\tnode [shape=circle, color=black, fontcolor=black];\n");
		
		//a roundabout way of collecting transitions...
		HashMap<Tuple, ArrayList<Character>> map = new HashMap<>();
		
		for(Transition t : G.edges()) {
			if(t.symbol() == EPSILON)
				s.append(String.format("\t%d -> %d [color=red];\n", t.from(), t.to()));
			else {
				Tuple pair = new Tuple(t.from(), t.to());
				if(!map.containsKey(pair))
					map.put(pair, new ArrayList<Character>());
				map.get(pair).add(t.symbol());
			}
		}
		
		for(Entry<Tuple, ArrayList<Character>> e : map.entrySet()) {
			Tuple pair = e.getKey();
			Collections.sort(e.getValue());
			String symbols = "" + e.getValue().remove(0);
			for(char c : e.getValue()) {
				symbols += c;
			}
			s.append(String.format("\t%d -> %d [label=\"%s\"];\n", pair.p(), pair.q(), symbols));
		}
		
		for(int i = 0; i < G.order(); i++) {
			if(F.contains(i)) {
				s.append(String.format("\t%d [shape=doublecircle];\n", i));
			} else if(I.contains(i)) {
				s.append(String.format("\tstart -> %d;\n", i));
			}
			/*if(re != null && i < re.length) {
				s.append(String.format("\t%d [label = \"%c\"];\n", i, re[i]));
			}*/
		}
		s.append("}");
		return s.toString();
	}