1. Definition
The input of determinization must be a Boolean automaton
A where labels are letters.
The function returns a deterministic automaton
D
equivalent to the input:
-
The automaton D has at most one initial state
-
For every state s and every letter a, there is at
most one transition outgoing from s with label
a.
2. Implementation
The algorithm of determinization is the subset construction:
-
every state of D is a distinct set of states of
A;
-
if the set of initial states of A is not empty,
this set is the initial state of D;
-
if X is a state of D, for every
letter a which is a label of a transition of A outgoing from a state in X, let
Y be the set of states succesors of at least one state in
X by a transition with label a;
then Y is a state of D and there is a
transition in D from X to
Y with label a;
-
a state X is final if and only if one of its elements is final.
The result of determinization has the following properties:
- every state is accessible;
-
if A is an accessible deterministic automaton,
D is isomorphic to
A;
-
if A is a trim automaton,
D is trim.
Moreover, the history of the determinization can be recorded.
In this case, for every state of D,
the corresponding subset of states of A can be retrieved.
If the maximal index of states of A is smaller
than twice sizeof(size_t)
, subsets are implemented in the
algorithm by (static) bitsets
;
otherwise, they are implemented by
std::set
.