private int transition(int state,int symbol){
  for (int i=state; i < transitions.length; i++) {
    if ((transitions[i] % vocabularySize) == symbol) {
      return (transitions[i] / vocabularySize);
    }
  }
  return -1;
}

private int transition ( int state , int symbol ) { for ( int i = state ; i < transitions . length ; i ++ ) { if ( ( transitions [ i ] % vocabularySize ) == symbol ) { return ( transitions [ i ] / vocabularySize ) ; } } return - 1 ; }
causes this fsm to transition to the next state given the current state and input symbol .
