/// <summary> /// Minimizes the given automaton using Brzozowski's algorithm. /// </summary> /// <param name="a">The automaton.</param> internal static void MinimizeBrzozowski(Automaton a) { if (a.IsSingleton) { return; } BasicOperations.Determinize(a, SpecialOperations.Reverse(a).ToList()); BasicOperations.Determinize(a, SpecialOperations.Reverse(a).ToList()); }
/// <summary> /// Determinizes the specified automaton. /// </summary> /// <remarks> /// Complexity: exponential in number of states. /// </remarks> /// <param name="a">The automaton.</param> public static void Determinize(Automaton a) { if (a.IsDeterministic || a.IsSingleton) { return; } var initialset = new HashSet <State>(); initialset.Add(a.Initial); BasicOperations.Determinize(a, initialset.ToList()); }
public void Determinize() { BasicOperations.Determinize(this); }
internal void Determinize() { BasicOperations.Determinize(this); }