public Relation<Production, Pair<Production, Integer>> getItemReduces() {
		// ignores rejected productions
		Relation<Production, Pair<Production, Integer>> red = new Relation<Production, Pair<Production, Integer>>();

		for (Production p : productions) {
			if (p.reachable) {
				for (int i = 0; i < p.getLength(); ++i) {
					Symbol s = p.getSymbolAt(i);
					if (s instanceof NonTerminal) {
						for (Production p2 : ((NonTerminal) s).productions) {
							if (p2.reachable && p.isDerivationAllowed(p2, i)) {
								red.add(p2, new Pair<Production, Integer>(p, i + 1));
							}
						}
					}
				}
			}
		}
		
		return red;
	}