public State sparse(List<String> lines, String blank,String startingStateName) {

		alphabet = readAlphabetFromHeader(lines.get(0));
		alphabetSet = new HashSet<String>(Arrays.asList(alphabet));

		List<String> functionsList = lines.subList(1, lines.size());
		statesNames = readStatesFromLines(functionsList);

		Map<String, State> states = new HashMap<>();
		for (String name : statesNames) {
			states.put(name, new State(name));
		}

		for (int i = 0; i < functionsList.size(); ++i) {
			String line = functionsList.get(i);
			String[] functions = line.split(WHITE_SPACES_REGEX);
			State state = states.get(functions[0].trim());
			for (int j = 1; j < functions.length; ++j) {
				String function = functions[j].trim();
				if (function.equals("accept")) {
					state.addAcceptMove(alphabet[j - 1]);
				} else if (function.equals("reject")) {
					state.addRejectMove(alphabet[j - 1]);
				} else {

					try {
						String[] functionElements = function.trim().split(",");
						if (functionElements.length != 3) {
							throw new IllegalArgumentException(
									"Unknown function \"" + function + "\"");
						}
						String nextcharacter = checkCharacter(functionElements[0]);
						Direction direction = Direction
								.valueof(functionElements[2]);
						State out = getState(states, functionElements[1]);
						state.addMove(alphabet[j - 1], nextcharacter, out,
								direction);
					} catch (IllegalArgumentException e) {
						throw new IllegalArgumentException(e.getMessage()
								+ " in line: \""
								+ line.replaceAll("[\t]", " ").replaceAll(
										"[ ]{2,}", " ")+"\"");
					}
				}
			}
		}
		

		System.out.println(toString(states.values(), alphabet,
				states.get(startingStateName)));
		return states.get(startingStateName);
	}