throw new RuntimeException("Error");
    public int calculateCumulativeError(int s1, int s2, int t1, int[] receivedSymbol) {	int s1error;	int inputValue;	int branchError;	int[] expectedSymbol;	// lookup what input caused this transition	inputValue = inputTable[s1][s2];	if (inputValue == UNINIT) {	    System.out.println("Error!!! invalid transition from " + s1 + " to " + s2);	    throw new RuntimeException("Error");	}		// look up the cumulative error of s1 	s1error = accumulatedErrorStates[s1][t1];	// now, calculate the output symbol that this transition causes	expectedSymbol = new int[SYMBOLSIZE];	expectedSymbol = convertToBase2(outputTable[s1][inputValue]);	// now, compute the error that this branch causes	// (eg the hamming distance between the received symbol and the symbol that	// this transition would generate)	branchError = hammingDistance(expectedSymbol, receivedSymbol);//  	System.out.println("Calculating transition from " + s1 + " to " + s2 +//  			   " i= " + inputValue +//  			   " o= " + convertFromBase2(expectedSymbol) +//  			   " rs= " + convertFromBase2(receivedSymbol) + //  			   " be= " + branchError +//  			   " ce= " + s1error);		// the total error that choosing this transition would incur	// is the branch error plus the cumulative error for the	// path up to s1.	return s1error + branchError;    }