public State[] getNondeterministicStates(Automaton automaton) {
		LambdaTransitionChecker lc = LambdaCheckerFactory
				.getLambdaChecker(automaton);
		ArrayList list = new ArrayList();
		/* Get all states in automaton. */
		State[] states = automaton.getStates();
		/* Check each state for nondeterminism. */
		for (int k = 0; k < states.length; k++) {
			State state = states[k];
			/* Get all transitions from each state. */
			Transition[] transitions = automaton.getTransitionsFromState(state);

			for (int i = 0; i < transitions.length; i++) {
				Transition t1 = transitions[i];
				/* if is lambda transition. */
				if (lc.isLambdaTransition(t1)) {
					if (!list.contains(state))
						list.add(state);
				}
				/*
				 * Check all transitions against all other transitions to see if
				 * any are equal.
				 */
				else {
					for (int p = (i + 1); p < transitions.length; p++) {
						Transition t2 = transitions[p];
						if (areNondeterministic(t1, t2)) {
							if (!list.contains(state))
								list.add(state);
						}
					}
				}
			}
		}
		return (State[]) list.toArray(new State[0]);
	}