Σ is the input alphabet - a non-finite, empty set. Each symbol represents a transition. Every transition can occur at any state, even if it just loops back
δ is the transition function: Q×Σ→Q - a function taking the state and transition as inputs, and outputting an end state
M reading the input string w∈Z∗ symbol by symbol. For each symbol, the transition function is run using with the current symbol and state. The input string is accepted if M ends in an end state.
δ^ extends δ to take in strings (and not just symbols) as the transition by processing each symbol in the string and passing the remaining substring recursively.
δ^:Q×Σ∗→Qδ^(q,ϵ)=qδ^(q,ax)=δ^(δ(q,a),x) where a∈Σ,x∈Σ∗ and the input string is ax
The string w is accepted by M if δ^(q0,w)∈F
The language accepted by M, L(M)={w∈Z∗∣δ^(q0,w)∈F}
The language A∈Σ∗ is regular if A=L(M) for some DFA M
All finite languages are regular (e.g. OR every single string) but not all infinite languages are regular.
By their definitions, A=L(M) for some DFA M=(Q,Σ,δ,q0,F).
Swap accepting and non-accepting states:
Let M′=(Q,Σ,δ,q0,Q−F). Now, show that L(M′)=Aˉ.
To do this, we first show that M′ is regular. This means that L(M)={w∈Z∗∣δ^(q0,w)∈F}.
The first requirement, w∈Z∗ is obviously fulfilled. The second bit will be:
δ^(q0,w)∈Q−F
Q−F is the complement of F, so: δ^(q0,w)∈/F
The definition of the extended transition function is δ^(q0,w)∈F, which is the complement of above. Thus, this means it satisfies the opposite of L(M):
NFA: a state can have zero or multiple transitions using a single symbol.
M=(Q,Σ,δ,q0,F)
δ:Q×Σ→P(Q), where P(Q) is the power set. That is, the transition function will return a set of states. If multiple states are returned, M can move to any of those states. If the empty set is returned, M will get stuck and that route should be ignored.
If any route leads to an accept state, the string should be accepted.
That is, for every state it can be in, calculate the possible transition(s) for the next symbol, put them all in a set, and repeat until the input string is empty.
w is accepted by M if and only if δ^(q0,w)∈F=∅.
The language accepted by M is the set of all strings where the above is true:
States become a set containing all states it could be in given the transitions. If it can be in the states {qx,qy,qz} then denote the state as qxyz. Accept all states where the set contains any element from the accept states set. Add a new reject state with a self-transition under all symbols to ensure that every state has transitions for every symbol.
Idea: keep track of all states the NFA M can be in while reading the input.
Subset automaton (DFA) M′=(P(Q),Σ,δ′,{q0},F′) where F′={S⊆Q∣S∩F=∅} (any state where one or more elements of the state contains an element from the accept states).