by: Er. Sukhwinder kaur
What is Automata Theory? What is Automata Theory? Alphabet and Strings Alphabet and Strings Empty String Empty String Languages Languages Finite Automata Finite Automata Structural expressions Structural expressions
Study of abstract computing devices, or “machines” Automaton = an abstract computing device Note: A “device” need not even be a physical hardware! A fundamental question in computer science: Find out what different models of machines can do and cannot do The theory of computation Computability vs. Complexity back
An alphabet is a finite, non-empty set of symbols. { 0, 1 } is a binary alphabet. { A, B, …, Z, a, b, …, z } is an English alphabet. A string over an alphabet is a sequence of any number of symbols from . 0, 1, 11, 00, and are strings over { 0, 1 }. Cat, CAT, and compute are strings over the English alphabet. back
An empty string, denoted by , is a string containing no symbol. is a string over any alphabet. Length of a string w, denoted by “|w|”, is equal to the number of (non- ) characters in the string E.g., x = |x| = 6 x = 01 0 1 00 |x| = ? xy = concatentation of two strings x and y
Let ∑ be an alphabet. ∑ k = the set of all strings of length k ∑* = ∑ 0 U ∑ 1 U ∑ 2 U … ∑ + = ∑ 1 U ∑ 2 U ∑ 3 U … back
L is a said to be a language over alphabet ∑, only if L ∑* this is because ∑* is the set of all strings (of all possible length including 0) over the given alphabet ∑ Examples: 1.Let L be the language of all strings consisting of n 0’s followed by n 1’s: L = { ,01,0011,000111,…} 2.Let L be the language of all strings of with equal number of 0’s and 1’s: L = { ,01,10,0011,1100,0101,1010,1001,…} Definition:Ø denotes the Empty language Let L = { }; Is L=Ø?
Given a string w ∑*and a language L over ∑, decide whether or not w L. Example: Let w = Q) Is w the language of strings with equal number of 0s and 1s? back
Two types – both describe what are called regular languages Deterministic (DFA) – There is a fixed number of states and we can only be in one state at a time Nondeterministic (NFA) –There is a fixed number of states but we can be in multiple states at one time While NFA’s are more expressive than DFA’s, we will see that adding nondeterminism does not let us define any language that cannot be defined by a DFA. One way to think of this is we might write a program using a NFA, but then when it is “compiled” we turn the NFA into an equivalent DFA.
Modeling recognition of the word “then Start state Final stateTransitionIntermediate state back
Grammars Regular expressions E.g., unix style to capture city names such as “Palo Alto CA”: [A-Z][a-z]*([ ][A-Z][a-z]*)*[ ][A-Z][A-Z] Start with a letter A string of other letters (possibly empty) Other space delimited words (part of city name) Should end w/ 2-letter state code back
Thank You