This function builds the TF table which represents Finite Automata for a given pattern
public static void computeTF ( char [ ] pat , int M , int [ ] [ ] TF ) { int state , x ; for ( state = 0 ; state <= M ; ++ state ) { for ( x = 0 ; x < NO_OF_CHARS ; ++ x ) { TF [ state ] [ x ] = getNextState ( pat , M , state , x ) ; } } }