Class NMinimizer

java.lang.Object
  extended byNMinimizer
All Implemented Interfaces:
Minimizer

public class NMinimizer
extends java.lang.Object
implements Minimizer

Naive minimizer in O(n^3).


Constructor Summary
NMinimizer()
           
 
Method Summary
 boolean equiv(DFA a, int p, int q, int[] c)
          Tests whether two states are equivalent.
 DFA minimal(DFA a, int[] c)
          Returns the automaton a renumbered according to c
 DFA minimize(DFA a)
          Returns the minimal automaton of a
 int[] partition(DFA a)
          Computes the Nerode partition.
 int[] refine(DFA a, int[] c)
          Refines the partition c.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NMinimizer

public NMinimizer()
Method Detail

minimize

public DFA minimize(DFA a)
Returns the minimal automaton of a

Specified by:
minimize in interface Minimizer

minimal

public DFA minimal(DFA a,
                   int[] c)
Returns the automaton a renumbered according to c

Parameters:
a - the original DFA
c - a partition of the state set
Returns:
the new DFA

partition

public int[] partition(DFA a)
Computes the Nerode partition.

Parameters:
a - a DFA
Returns:
the Nerode partition

refine

public int[] refine(DFA a,
                    int[] c)
Refines the partition c.

Parameters:
a - a complete DFA
c - a partition of the state set
Returns:
the refined partition

equiv

public boolean equiv(DFA a,
                     int p,
                     int q,
                     int[] c)
Tests whether two states are equivalent.

Parameters:
a - a complete DFA
p - a state
q - a state
Returns:
true if p=q mod c and p.u=q.u mod c for every letter u