src/test/java/de/dfki/lt/loot/fsa/TestMinimization.java
public static void main(String[] args) {
    StringFsa det0 = new StringFsa();
    det0.readFromText(
        Paths.get("src/test/resources/fsa/det-new-aut-2.txt"));
    StringFsa det = det0.copy();
    int totalRounds = det.getNumberOfActiveVertices();

    List<Integer> deleted = new ArrayList<Integer>();
    for (int round = 0; round < totalRounds; ++round) {
      System.out.println(round + "  " + det.getNumberOfActiveVertices());
      for (int v = 0; v < det.getNumberOfVertices(); ++v) {
        // don't delete the start or the last final state
        if (det.isVertex(v)
            && det.getInitialState() != v
            && (! det.isFinalState(v) || det.getFinalStates().size() > 1)) {
          det.removeVertex(v);
          det.removeDeadStates();
          if (problemPersists(det)) {
            deleted.add(v);
          } else {
            det = det0.copy();
            for (int del : deleted) {
              det.removeVertex(del);
            }
          }
        }
        det = det0.copy();
        for (int del : deleted) {
          det.removeVertex(del);
        }
        det.saveAsText(Paths.get("/tmp/reduced.txt"));
      }
    }
  }
/** To automatically reduce the problem size when we find new automata which
   *  are problematic.
   */
To automatically reduce the problem size when we find new automata which
are problematic.
To automatically reduce the problem size when we find new automata which are problematic .
public static void main(String[] args) {
    StringFsa det0 = new StringFsa();
    det0.readFromText(
        Paths.get("src/test/resources/fsa/det-new-aut-2.txt"));
    StringFsa det = det0.copy();
    int totalRounds = det.getNumberOfActiveVertices();
    List<Integer> deleted = new ArrayList<Integer>();
    for (int round = 0; round < totalRounds; ++round) {
      System.out.println(round + "  " + det.getNumberOfActiveVertices());
      for (int v = 0; v < det.getNumberOfVertices(); ++v) {
        if (det.isVertex(v)
            && det.getInitialState() != v
            && (! det.isFinalState(v) || det.getFinalStates().size() > 1)) {
          det.removeVertex(v);
          det.removeDeadStates();
          if (problemPersists(det)) {
            deleted.add(v);
          } else {
            det = det0.copy();
            for (int del : deleted) {
              det.removeVertex(del);
            }
          }
        }
        det = det0.copy();
        for (int del : deleted) {
          det.removeVertex(del);
        }
        det.saveAsText(Paths.get("/tmp/reduced.txt"));
      }
    }
  }
public static void main ( String [ ] args ) { StringFsa det0 = new StringFsa ( ) ; det0 . readFromText ( Paths . get ( "src/test/resources/fsa/det-new-aut-2.txt" ) ) ; StringFsa det = det0 . copy ( ) ; int totalRounds = det . getNumberOfActiveVertices ( ) ; List < Integer > deleted = new ArrayList < Integer > ( ) ; for ( int round = 0 ; round < totalRounds ; ++ round ) { System . out . println ( round + "  " + det . getNumberOfActiveVertices ( ) ) ; for ( int v = 0 ; v < det . getNumberOfVertices ( ) ; ++ v ) { if ( det . isVertex ( v ) && det . getInitialState ( ) != v && ( ! det . isFinalState ( v ) || det . getFinalStates ( ) . size ( ) > 1 ) ) { det . removeVertex ( v ) ; det . removeDeadStates ( ) ; if ( problemPersists ( det ) ) { deleted . add ( v ) ; } else { det = det0 . copy ( ) ; for ( int del : deleted ) { det . removeVertex ( del ) ; } } } det = det0 . copy ( ) ; for ( int del : deleted ) { det . removeVertex ( del ) ; } det . saveAsText ( Paths . get ( "/tmp/reduced.txt" ) ) ; } } }
To automatically reduce the problem size when we find new automata which
  are problematic.
To automatically reduce the problem size when we find new automata which are problematic .
// don't delete the start or the last final state