go to previous page   go to home page   go to next page

Answer:

An empty string. (Just hit "enter".)


Example Run

Copy the code and paste it to a file. Compile and run it. Here is a sample run:

$ java FSATableTester
Enter a string -->abc
The string "abc" is rejected.
Enter a string -->ac
The string is recognized.
Enter a string -->acccc
The string is recognized.
Enter a string -->ABACCC
The string "ABACCC" is rejected.
Enter a string -->ababcccc
The string "ababcccc" is rejected.
Enter a string -->

$

Say that you wish to implement the following automaton:

sample automaton

QUESTION 9:

Fill in the blanks, so that the table implements the automaton.

  public static void main (String[] args)
  {
    FSATable fsa = new FSATable(3, 1);  
   
    fsa.addFinal(  );
 
    fsa.addTrans( , ,  );
    fsa.addTrans( , ,  );
    fsa.addTrans( , ,  );
    fsa.addTrans( , ,  );

     . . . .