private static boolean isUsefulProduction(Production production, Set set) {
		ProductionChecker pc = new ProductionChecker();
		String rhs = production.getRHS();
		for (int k = 0; k < rhs.length(); k++) {
			char ch = rhs.charAt(k);
			if (!ProductionChecker.isTerminal(ch)
					&& !isInUsefulVariableSet(ch, set)) {
				return false;
			}
		}
		return true;
	}