CSC444 Sep18

slide version

single file version

Contents

  1. Exercises
  2. A Lower bound for Pn
  3. Finite State Automata
  4. Example 1
  5. Example 2
  6. Example 3
  7. Formal Definition
  8. Computation with a Finite State Automaton
  9. Language of a Finite State Automaton
  10. Regular Languages
  11. Regular Operations
  12. Closure
  13. Closure under Union
  14. Nondeterminism
  15. Example
  16. Converting an NFA to an equivalent DFA

Exercises[2] [top]

A Lower bound for Pn[3] [top]

Finite State Automata[4] [top]

States

Start State

Final States

Input

Transitions

Example 1[5] [top]

A finite automaton that recognizes strings from the set {0,1} with one or more 0's followed by one or more 1's.

Example 2[6] [top]

A finite automaton that recognizes strings from the set {0,1} that end with the last to characters being '00'.

Example 3[7] [top]

A Finite Automaton that recognizes strings from the set { a, b, c} consisting of all strings with no 'a' to the right of any 'c'.

Example 4

Man, Wolf, Goat, Cabbage problem.

States?

Input?

How many states?

Formal Definition[8] [top]

    A Finite State Automaton is a 5-tuple:

    1. A finite set Q, called states
    2. A finite set S, called the alphabet
    3. δ: Q x S -> Q is the transition function
    4. q0 in Q is the start state
    5. F subset of Q, the set of accepting or final states

Computation with a Finite State Automaton[9] [top]

There are several ways to formalize the notion that a string is accepted by a finite state automaton.

Page 40 defines one way.

An equivalent way is to extend the transition function to a new function δ': Q x A* -> Q, where A is the alphabet.

The meaning of this extended function δ'(q, w) is the state that the finite state automaton would be in starting from state q and reading all the input characters in the string w.

A string w would be accepted by the finite state automaton if δ'(q0, w) is a final or accepting state.

Language of a Finite State Automaton[10] [top]

The language of a finite state automaton is the set of all strings that are accepted by the finite state automaton.

A language is recognized by a finite state automaton if it is equal to the language of the finite state automaton.

Regular Languages[11] [top]

A formal language is a set of strings over some alphabet of symbols.

A formal language is regular if it is recognized by some finite state automaton.

Regular Operations[12] [top]

Three operations are defined on formal languages.

    Union:          A ∪ B 
    Concatenation:  A o B
    Star:           A*

We may assume that Languages are over the same alphabet.

Closure[13] [top]

The collection of Regular Languages is closed under strings that are accepted by the finite state automatonthe three operations: union, concatenation, and star.

Closure under Union[14] [top]

   A: Strings in {0,1} that contain '111'
   B: Strings in {0,1} that end with '00'


Nondeterminism[15] [top]

A nondeterministic finite automaton (NFA) has a different transition function.

    δ: Q x Aε -> P(Q)

P(Q) is the power set of Q
Aε is the alphabet with the empty string added.

Example[16] [top]

Design an NFA that recognizes those strings that begin with 0 or more letters in {a,b} and followed by 0 or more letters in {b,c}.

Converting an NFA to an equivalent DFA[17] [top]

Convert the previous NFA to an equivalent DFA.

The idea is to create a new DFA whose states will correspond to subsets of the NFA states.

For each state or set of states in the NFA, we will need to consider the set of all states that can be reached without reading any additional input. This is the closure of the state or set of states.

The start state of the DFA will be the closure of the start state of the NFA.

The transition function on the DFA will be defined on subsets of the original states of the NFA. We use the NFA transition function on each state in the set, but we also take the closure to get a target set of states. This set is the new DFA state.