+ All Categories
Home > Documents > By: Er. Sukhwinder kaur. What is Automata Theory? What is Automata Theory? Alphabet and Strings...

By: Er. Sukhwinder kaur. What is Automata Theory? What is Automata Theory? Alphabet and Strings...

Date post: 31-Dec-2015
Category:
Upload: dina-gilmore
View: 217 times
Download: 2 times
Share this document with a friend
Popular Tags:
12
by: Er. Sukhwinder kaur
Transcript
Page 1: By: Er. Sukhwinder kaur.  What is Automata Theory? What is Automata Theory?  Alphabet and Strings Alphabet and Strings  Empty String Empty String

by: Er. Sukhwinder kaur

Page 2: By: Er. Sukhwinder kaur.  What is Automata Theory? What is Automata Theory?  Alphabet and Strings Alphabet and Strings  Empty String Empty String

What is Automata Theory? Alphabet and Strings Empty String Languages Finite Automata Structural expressions

Page 3: By: Er. Sukhwinder kaur.  What is Automata Theory? What is Automata Theory?  Alphabet and Strings Alphabet and Strings  Empty String Empty String

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 doThe theory of computation

Computability vs. Complexityback

Page 4: By: Er. Sukhwinder kaur.  What is Automata Theory? What is Automata Theory?  Alphabet and Strings Alphabet and Strings  Empty String Empty String

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 01101 are strings over {0, 1 }.

Cat, CAT, and compute are strings over the English alphabet.

back

Page 5: By: Er. Sukhwinder kaur.  What is Automata Theory? What is Automata Theory?  Alphabet and Strings Alphabet and Strings  Empty String Empty String

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 = 010100 |x| = 6 x = 01 0 1 00 |x| = ?

xy = concatentation of two strings x and y

Page 6: By: Er. Sukhwinder kaur.  What is Automata Theory? What is Automata Theory?  Alphabet and Strings Alphabet and Strings  Empty String Empty String

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

Page 7: By: Er. Sukhwinder kaur.  What is Automata Theory? What is Automata Theory?  Alphabet and Strings Alphabet and Strings  Empty String Empty String

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=Ø?

Page 8: By: Er. Sukhwinder kaur.  What is Automata Theory? What is Automata Theory?  Alphabet and Strings Alphabet and Strings  Empty String Empty String

Given a string w ∑*and a language L over ∑, decide whether or not w L.

Example:Let w = 100011Q) Is w the language of strings with equal

number of 0s and 1s?

back

Page 9: By: Er. Sukhwinder kaur.  What is Automata Theory? What is Automata Theory?  Alphabet and Strings Alphabet and Strings  Empty String Empty String

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 timeNondeterministic (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.

Page 10: By: Er. Sukhwinder kaur.  What is Automata Theory? What is Automata Theory?  Alphabet and Strings Alphabet and Strings  Empty String Empty String

Modeling recognition of the word “then

Start state Final stateTransition Intermediate state

back

Page 11: By: Er. Sukhwinder kaur.  What is Automata Theory? What is Automata Theory?  Alphabet and Strings Alphabet and Strings  Empty String Empty String

GrammarsRegular 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 (possiblyempty)

Other space delimited words(part of city name)

Should end w/ 2-letter state code

back

Page 12: By: Er. Sukhwinder kaur.  What is Automata Theory? What is Automata Theory?  Alphabet and Strings Alphabet and Strings  Empty String Empty String

Thank You


Recommended