0% found this document useful (0 votes)
40 views29 pages

Automata Theory

The document summarizes key concepts from an automata theory lecture, including: 1) Sets and languages are introduced, with examples of set operations like union, intersection, and complement. Languages are defined as sets of strings constructed by rules. 2) Languages and automata are related, as languages can be used to formulate decision problems modeled by automata. Sets of strings define languages that automata accept or reject. 3) Important terminology for languages is defined, like the alphabet, strings, concatenation, Kleene star/plus, and language operations. Examples illustrate finite descriptions of infinite languages.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views29 pages

Automata Theory

The document summarizes key concepts from an automata theory lecture, including: 1) Sets and languages are introduced, with examples of set operations like union, intersection, and complement. Languages are defined as sets of strings constructed by rules. 2) Languages and automata are related, as languages can be used to formulate decision problems modeled by automata. Sets of strings define languages that automata accept or reject. 3) Important terminology for languages is defined, like the alphabet, strings, concatenation, Kleene star/plus, and language operations. Examples illustrate finite descriptions of infinite languages.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 29

Automata Theory

Lecture 2
Lecture’s Objective
Part 1: Understanding the concept of sets and languages.
Part 2: How these two concepts are related to our course?
Part 3: Important terminologies and properties related to languages.
Part 1
Highlights
• Sets
• Languages
Basics - Sets

A = {11, 12, 13, 14}


B = {10, 20, 30, …}
Basics - Sets
More straightforward

B = {3, 5, 7, …}
Ambiguity: Set of odd numbers > 1 or set of primes?
B = {x | x is an odd integer greater than 1}

More descriptive
Basics - Sets

More examples
C = {x | x Ɛ B and x < 11}
D = {x | there exist integers i and j, both >= 0, with x = 3i+7j }
D = {3i + 7j | i,j are non-negative}
D = {3i+7j | i,j Ɛ N}
Basics - Sets

Complement of a set
A’ = {x Ɛ U | x ∉ A}
Basics - Sets
Union of two sets
A U B = {x | x Ɛ A or x Ɛ B}

NOTE
No need to memorize these
properties. Just have a look at
these to refresh your concept.
Basics - Sets
Intersection of two sets
A Π B = {x | x Ɛ A and x Ɛ B}

NOTE
No need to memorize these
properties. Just have a look at
these to refresh your concept.
Basics - Sets

Subtraction
A - B = {x | x Ɛ A and x ∉ B}
A - B = {x | x Ɛ A} Π {x | x ∉ B}
A – B = A Π B’
Basics - Sets
A few more properties

NOTE
No need to memorize these
properties. Just have a look at
these to refresh your concept.
Basics - Sets

Symmetric difference
A ⊕ B = (A – B) U (B – A)
A ⊕(B ⊕ C) = (A ⊕ B) ⊕ C
Basics - Sets

Cartesian product
A X B = {(a , b) | a Ɛ A and b Ɛ B}
Where (a , b) are ordered pairs
Basics - Sets

Disjoint sets
Intersection of sets is an empty set.
Basics – Sets – Important symbols
Symbol Meaning Symbol Meaning

… Forever a ∈ A Element of: a is in A

A ⊆ B Subset: A has some (or all) elements of B b ∉ A Not element of: b is not in A

Proper Subset: A has some elements of B ∅ Empty set = {}


A ⊂ B
Universal Set: set of all possible values
A ⊄ B Not a Subset: A is not a subset of B U
(in the area of interest)
A ⊇ B Superset: A has same elements as B, or more P(A) Power Set: all subsets of A

Proper Superset: A has B's elements and more A=B Equality: both sets have the same members
A ⊃ B
A×B Cartesian Product: set of ordered pairs from A and B
A ⊅ B Not a Superset: A is not a superset of B
|A| Cardinality: the number of elements of set A
A ∪ B Union: in A or B (or both)
| Such that
A ∩ B Intersection: in both A and B
: Such that
Ac Complement: elements not in A NOTE
∀ For all (∀x>1, x >x)
2
No need to memorize these
A−B Difference: in A but not in B ∃ There Exists (∃ x | x2>x) symbols. Just have a look at
these to get familiar with
these.
Basics – Languages
• A natural languages involves A natural language is a
• Alphabet set set of all legal sentences
• Vocabulary constructed by obeying
• Grammatical rules grammatical rules.
• Sentences
• Paragraphs etc.
A programming language
• A programming language involves
is a set of all legal
• Keywords/operators
statements constructed
• Syntactic rules
by obeying syntactic
• Statements
rules.
• Program
Part 2

Now lets relate the concepts of sets and languages with automata
Sets
N – A binary number N – A Natural number

Is odd number? Is odd number?

Model of Computation Model of Computation

Yes No Yes No
L = {1, 01, 11, 001, 011, 101, 111, ……}  YES L = {1, 3, 5, 7, 9, 11, 13, 15, 17, ……}  YES
L’ = {0, 00, 10, 000, 010, 100, 110, ……}  NO L’ = {2, 4, 6, 8, 10, 12, 14, 16, ……}  NO

Here comes the concept of Sets


The concept of languages in automata
N – A binary number

A language is a set of words


Is odd number?
(strings) constructed by obeying
Model of Computation some rule(s)

Yes No
L = {1, 01, 11, 001, 011, 101, 111, ……}  YES
L’ = {0, 00, 10, 000, 010, 100, 110, ……}  NO
The concept of languages in automata
N – A binary number

Because a language is a set of strings,


Is odd number? so set operations can be used to
Model of Computation
construct/define languages.

Yes No
L = {1, 01, 11, 001, 011, 101, 111, ……}  YES
L’ = {0, 00, 10, 000, 010, 100, 110, ……}  NO
The concept of languages in automata
N – A binary number

Example:
Is odd number? ∑ = {0 , 1}
Model of Computation L = {x Ɛ ∑* | x ends with 1}

Conclusion:
The concept of language is used to
Yes No
formulate a decision problem.
L = {1, 01, 11, 001, 011, 101, 111, ……}  YES
L’ = {0, 00, 10, 000, 010, 100, 110, ……}  NO
Part 3
Languages – Terminologies and properties
Important definitions
• ∑ = {a , b}
• Word & string
• Null string (^)
• Length of string = |abbba| = 5
• Substring, prefix, suffix
Languages – Terminologies and properties
Important operations
• Concatenation of two words or languages
• If A = abba, B = aab then AB = abbaaab
• ab^b = abb^ = ^abb =abb
• L1L2 = {xy | x Ɛ L1 and y Ɛ L2}
• {ab, ba} {a, b} = {aba, abb, baa, bab}
• ∑2 = {a , b}2 = {a, b} {a, b} = {aa, ab, ba, bb}
• a4 = aaaa where a can be a word or language or even an alphabet set
• Kleene star and kleene plus operators
• ∑* = {a , b}* = {^, a, b, aa, ab, ba, bb, …..}
• Complement of a language
• L’ = ∑* - L
• Union, intersection and difference of languages
Discuss alphabet set with symbols like ∑ = {ab , baa} etc. Note: No symbol should be prefix of other
symbol.
Languages – Few examples
• L = {x Ɛ {a,b}* | |X| <= 8}
• L = {x Ɛ {a,b}* | |X| is odd}
• L = {x Ɛ {a,b}* | na (x) >= nb (x)}
• L = {x Ɛ {a,b}* | |X| >= 2 and x begins and ends with b}

• A finite way to describe infinite languages


• L1 = {ab, bab}* U {b} {bb}*
• L2 = {byb | y Ɛ {a , b}*}
Exercises
Describe each of the following infinite sets precisely, using a formula that does not involve “…”. If you wish, you
can use N, R,Q, Z, and common notations for sets.
a) {0, -1, 2, -3, 4, -5, . . .}
b) {1/2, 1/4, 3/4, 1/8, 3/8, 5/8, 7/8, 1/16, 3/16, 5/16, 7/16, . . .}
c) {10, 1100, 111000, 11110000, . . .} ( a subset of {0,1}* )
d) {{0}, {1}, {2}, . . .}
e) {{0}, {0,1}, {0, 1, 2}, {0, 1, 2, 3}, . . .}
Exercises
Find an expression for the indicated set, involving A,B,C, and any of the operations Union, Intersection and
Complement.
a) {x|xƐA or xƐB but not both}
b) {x|x is an element of exactly one of the three sets a, b, and c}
c) {x|x is an element of at most one of the three sets a, b, and c}
d) {x|x is an element of exactly two of the three sets a, b, and c}
e) {x|x is an element of exactly one and at most two of the three sets a, b, and c}
Exercises
Under what circumstances L+ and L* are equal?
Answer: When L contains ^ as a word.

You might also like