Basic definition:

  • An alphabet is a non-empty, finite, set of symbols.
  • A string w over an alphabet is a finite (0 or more) sequence of symbols from , an empty string denote by
  • The set of all strings is denoted
  • A language is any subset of

Deterministic finite automaton (DFA): input output

  • Same state and same read character same next state (Deterministic)
  • Finite number of states (finite)
  • no empty string && each character only appear once && arrow for each charter in

Steps:

  1. Predefined start state
  2. reads input (per char at a time). Depend on the character read and current state, deterministically moves to a new state
  3. Finish reading, check if accept states. If accept, then accept. Otherwise rejects. (double circle accept)

Let be a DFA, the language of a DFA denoted is the set of strings such that accepts .

The template of defining a DFA:

  1. Fix the alphabet, of the DFA
  2. Define a finite set of states
  3. A start state
  4. Define a subset are accept states
  5. , define ,

Nondeterministic finite automaton(NFA):

  • Allow empty string , character can appear more times or 0 times

  • Same state and same read character same next state (Deterministic)

  • Finite number of states (finite)

Steps:

  1. Predefined start state
  2. reads input (per char at a time). Depend on the character read and current state, deterministically moves to a new state
    1. no such input appear in some arrow, immediately reject
  3. Since same character can appear many times, we need to make choice. That’s, NFA accepts the string if any sequence of choices leads to an accept state

Let be a NFA, the language of a NFA denoted is the set of strings such that accepts .


Let be any language over .

  • There is a DFA such that is a NFA such that is regular
  • is regular if there is a DFA such that .
  • The complement of denote
  • The concatenation of and denote is the set of strings that your get by concatenating a string in and a string in
  • , define . Let .
  • , called Kleene star, or “A star”

Let be any language over . , is distinguisher for

Define a binary equivalence relationship relative to language A over as , a distinguisher for . In this situation, we say is indistinguishable from relative to .

Myhjill-Nerode Theorem: Let be language over . is regular has a finite number of equivalence classes.

  • To prove not regular, we can find an infinite set s.t. any two elements are distinguishable. In other words, Let be a language. A set is infinite is not regular

Define .