public static Set getUselessStates(Automaton a) {
		if (a.getInitialState() == null) {
			throw new IllegalArgumentException(
					"Automata does not have an initial state!");
		}
		Set finalized = findFinal(a);
		Set initialized = findInitial(a);
		Set useless = new HashSet(Arrays.asList(a.getStates()));
		finalized.retainAll(initialized);
		useless.removeAll(finalized);
		return useless;
	}