theory of computation notes. introduction and mcq points

bushraphd2022 70 views 28 slides Jan 27, 2024
Slide 1
Slide 1 of 28
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28

About This Presentation

TOC notes


Slide Content

Theory of Computation
SANGEETH N.

Syllabus
TheoryofComputation:Regularlanguagesandfiniteautomata,
context-freelanguages&pushdown automata,recursively
enumerablesets&Turingmachines,undecidability

Topics
●BasicTerminologies
●RegularExpression

Basic Terminologies
●Symbol:Asymbolisthesmallestbuildingblock,whichcanbeany
alphabet,letter,orpicture.
●Alphabets:Theyareasetofsymbols,whicharealwaysfinite.
Example:Alphabetsofbinarydigits,decimaldigits.

Basic Terminologies
●String:Astringisafinitesequenceofsymbolsfromsomealphabet.
●Astringisgenerallydenotedaswandthelengthofastringisdenoted
as|w|.
●Listoutstringshavinglengthinthealphabetsetcontaining{a,b}.

Basic Terminologies
●Foralphabet{a,b}withlengthn,numberofstringscanbegenerated=2
n
●Generalcase:IfthenumberofsymbolsinthealphabetΣisrepresentedby|Σ|,
thenanumberofstringsoflengthn,possibleoverΣis|Σ|
n

Basic Terminologies
●ClosureRepresentation
○L
+
: It is a Positive Closurethat represents a set of all strings
except Null or ε-strings.

Basic Terminologies
●ClosureRepresentation
○L
*
: It is “Kleene Closure”, that represents the occurrence of certain
alphabets for given language alphabets from zero to the infinite
number of times.

Basic Terminologies
●Listoutthestringacceptedbya*

Basic Terminologies
●Listoutthestringacceptedbya
+

Basic Terminologies
●Listoutthestringacceptedby{a,b}*

Basic Terminologies
●Alanguageisasetofstrings,chosenfromsomeΣ*
●AlanguageisasubsetofΣ*‘.
●Alanguagethatcanbeformedover‘Σ‘canbeFiniteor
Infinite.

Basic Terminologies
●Finite–Listoutstringoflength2inthealphabet{a,b}*
●Infinite–Listoutstringstartingwithainthealphabet{a,b}*

Regular Expression
●Regular Expressions are patterns that are used to denote
languages.
●An expression is regular if:
○ɸis a regular expression for regular language ɸ.
○ɛis a regular expression for regular language {ɛ}.
○If a∈Σ, a is regular expression with language {a}.

Regular Expression
●An expression is regular if:
○If a and b are regular expression, a + b is also a regular
expression with language {a,b}.
○If a and b are regular expression, ab (concatenation of a
and b) is also regular.
○If a is regular expression, a* (0 or more times a) is also
regular.

Regular Expression
●Write the regular expression for strings starting with a in the
alphabet set {a,b}

Regular Expression
●Write the regular expression for strings end with b in the
alphabet set {a,b}

Regular Expression
●Write the regular expression for strings start with a and end
with b in the alphabet set {a,b}

Regular Expression
●Write the regular expression for strings start with a or end
with b in the alphabet set {a,b}

Regular Expression
●Write the regular expression for strings contain a substring
abbin the alphabet set {a,b}

Regular Expression
●Find the language obtained from regular express 1*01*.

Question -1
Which one of the following languages over the alphabet {0,1} is
described by the regular expression?
(0+1)*0(0+1)*0(0+1)*
(A) The set of all strings containing the substring 00.
(B) The set of all strings containing at most two 0’s.
(C) The set of all strings containing at least two 0’s.
(D) The set of all strings that begin and end with either 0 or 1.

Question -1
Which one of the following languages over the alphabet {0,1} is
described by the regular expression?
(0+1)*0(0+1)*0(0+1)*
(A) The set of all strings containing the substring 00.

Question -1
Which one of the following languages over the alphabet {0,1} is
described by the regular expression?
(0+1)*0(0+1)*0(0+1)*
(B) The set of all strings containing at most two 0’s.

Question -1
Which one of the following languages over the alphabet {0,1} is
described by the regular expression?
(0+1)*0(0+1)*0(0+1)*
(D) The set of all strings that begin and end with either 0 or 1.

Question -1
Which one of the following languages over the alphabet {0,1} is
described by the regular expression?
(0+1)*0(0+1)*0(0+1)*
(C) The set of all strings containing at least two 0’s.

Question -1
Which one of the following languages over the alphabet {0,1} is
described by the regular expression?
(0+1)*0(0+1)*0(0+1)*
(A) The set of all strings containing the substring 00.
(B) The set of all strings containing at most two 0’s.
(C) The set of all strings containing at least two 0’s.
(D) The set of all strings that begin and end with either 0 or 1.

THANK YOU
Tags