public ArrayList expandState(State state, Automaton nfa, Automaton dfa) {
		ArrayList list = new ArrayList();
		AlphabetRetriever far = new FSAAlphabetRetriever();
		String[] alphabet = far.getAlphabet(nfa);
		/** for each letter in the alphabet. */
		for (int k = 0; k < alphabet.length; k++) {
			/**
			 * get states reachable on terminal from all states represented by
			 * state.
			 */
			State[] states = getStatesOnTerminal(alphabet[k],
					getStatesForState(state, nfa), nfa);
			/** if any reachable states on terminal. */
			if (states.length > 0) {
				/**
				 * get state from dfa that represents list of reachable states
				 * in nfa.
				 */
				State toState = getStateForStates(states, dfa, nfa);
				/** if no such state. */
				if (toState == null) {
					/** create state, add to list */
					toState = createStateWithStates(dfa, states, nfa);
					// StatePlacer sp = new StatePlacer();
					// Point point = sp.getPointForState(dfa);
					// toState = dfa.createState(point);
					// toState.setLabel(getStringForStates(states));
					// if(hasFinalState(states, nfa)) {
					// dfa.addFinalState(toState);
					// }
					list.add(toState);
				}
				/**
				 * add transition to dfa from state to state that represents
				 * reachables states on terminal from nfa.
				 */
				Transition transition = new FSATransition(state, toState,
						alphabet[k]);
				dfa.addTransition(transition);
			}
		}
		return list;
	}