SlideShare a Scribd company logo
By: F.A
4/1/2014
AUTOMATA CHAPTER 2: LANGUAGES (PROBLEMS)
Chapter 2:
LANGUAGES
Problems:
1. Consider the language S*, where S = {a, b}. How many words does this
language have of length 2? Of length 3? Of length n?
Solution:
S = {a, b}
S* = {, a, b, aa, ab, bb, ba, aaa, aab, aba, abb, bbb, bba, bab, baa,…. }
 So this language have words of length 2 = 4
Of length 3 = 8
Of length n = 2n
 We can solve this question in the following way too
Let number of words = nm
Then words of length 2 = 22
= 4
Of length 3 = 23
= 8
Of length n = 2n
2. Consider the language S*, where S = {aa, b}. how many words does this
language have of length 4? Of length 5? Of length 6? What can be said
in general?
Solution:
S = {aa, b}
S* = {, aa, b, aaaa, aab, bb, baa, aaaaaa, aaaab, aabb, aabaa, baaaa, baab, bbb,
bbaa, aaaaaaaa, aaaaaab, aaaabb, aaaabaa, aabaaaa, aabaab, aabbb, aabbaa,
bbbb, bbbaa, bbaaaa, bbaab, baabb, baabaa, baaaaaa, baaaab, aaaaaaaaaa,
…….}
 So words of length 4 = 24 = 16
Of length 5 = 25 = 32
Of length 5 = 26 = 64
In general:
In general we can say that
3. Consider the language S*, where S = {ab, ba}. Write out all the words in
S* that have seven or fewer letters. Can any word in this language
contain the substrings aaa or bbb? What is the smallest word that is not
in this language?
Solution:
S = {ab, ba}
S* = {, ab, ba, abab, abba, baba, baab, ababab, ababba, abbaba, abbaab,
baabab, baabba, bababa, babaab, abababab, abababba, ababbaba, ababbaab,
abbaabab, abbaabba, abbababa, abbabaab, baababab, baababba, baabbaba,
baabbaab, babaabab, babaabba, babababa, bababaab, ababababab,
ababababba, abababbaba, abababbaab, ababbaabab, ababbaabba, ababbababa,
ababbabaab, abbaababab, abbaababba, abbaabbaba, abbaabbaab, abbabaabab,
abbabaabba, abbabababa, abbababaab, baabababab, baabababba, baababbaba,
baababbaab, baabbaabab, baabbaabba, baabbababa, baabbabaab, babaababab,
babaababba, babaabbaba, babaabbaab, bababaabab, bababaabba, bababababa,
babababaab, abababababab, abababababba, ababababbaba, ababababbaab,
abababbaabab, abababbaabba, abababbababa, abababbabaab, ababbaababab,
ababbaababba, ababbaabbaba, ababbaabbaab, ababbabaabab, ababbabaabba,
ababbabababa, ababbababaab, abbaabababab, abbaabababba, abbaababbaba,
abbaababbaab, abbaabbaabab, abbaabbaabba, abbaabbababa, abbaabbabaab,
abbabaababab, abbabaababba, abbabaabbaba, abbabaabbaab, abbababaabab,
abbababaabba, abbababababa, abbabababaab, ababababababab,
ababababababba, abababababbaba, abababababbaab, ababababbaabab,
ababababbaabba, ababababbababa, ababababbabaab, abababbaababab,
abababbaababba, ababbaabbaba, ababbaabbaab, ababbabaabab,
abababbabaabba, abababbabababa, abababbababaab, ababbaabababab,
ababbaabababba, ababbaababbaba, ababbaababbaab, ababbaabbaabab,
ababbaabbaabba, ababbaabbababa, ababbaabbabaab, ababbabaababab,
ababbabaababba, ababbabaabbaba, ababbabaabbaab, ababbababaabab,
ababbababaabba, ababbababababa, ababbabababaab, baabababababab,
baabababababba, baababababbaba, baababababbaab, baabababbaabab,
baabababbaabba, baabababbababa, baabababbabaab, baababbaababab,
baababbaababba, baababbaabbaba, baababbaabbaab, baababbabaabab,
baababbabaabba, baababbabababa, baababbababaab, baabbaabababab,
baabbaabababba, baabbaababbaba, baabbaababbaab, baabbaabbaabab,
baabbaabbaabba, baabbaabbababa, baabbaabbabaab, baabbabaababab,
baabbabaababba, baabbabaabbaba, baabbabaabbaab, baabbababaabab,
baabbababaabba, baabbababababa, baabbabababaab,…}
 All words in S* that have seven or fewer letters:
S* = { abababababab, abababababba, ababababbaba, ababababbaab,
abababbaabab, abababbaabba, abababbababa, abababbabaab, ababbaababab,
ababbaababba, ababbaabbaba, ababbaabbaab, ababbabaabab, ababbabaabba,
ababbabababa, ababbababaab, abbaabababab, abbaabababba, abbaababbaba,
abbaababbaab, abbaabbaabab, abbaabbaabba, abbaabbababa, abbaabbabaab,
abbabaababab, abbabaababba, abbabaabbaba, abbabaabbaab, abbababaabab,
abbababaabba, abbababababa, abbabababaab, ababababababab,
ababababababba, abababababbaba, abababababbaab, ababababbaabab,
ababababbaabba, ababababbababa, ababababbabaab, abababbaababab,
abababbaababba, ababbaabbaba, ababbaabbaab, ababbabaabab,
abababbabaabba, abababbabababa, abababbababaab, ababbaabababab,
ababbaabababba, ababbaababbaba, ababbaababbaab, ababbaabbaabab,
ababbaabbaabba, ababbaabbababa, ababbaabbabaab, ababbabaababab,
ababbabaababba, ababbabaabbaba, ababbabaabbaab, ababbababaabab,
ababbababaabba, ababbababababa, ababbabababaab, baabababababab,
baabababababba, baababababbaba, baababababbaab, baabababbaabab,
baabababbaabba, baabababbababa, baabababbabaab, baababbaababab,
baababbaababba, baababbaabbaba, baababbaabbaab, baababbabaabab,
baababbabaabba, baababbabababa, baababbababaab, baabbaabababab,
baabbaabababba, baabbaababbaba, baabbaababbaab, baabbaabbaabab,
baabbaabbaabba, baabbaabbababa, baabbaabbabaab, baabbabaababab,
baabbabaababba, baabbabaabbaba, baabbabaabbaab, baabbababaabab,
baabbababaabba, baabbababababa, baabbabababaab }
 No, No words can contain aaa or bbb because the first a in string ab and the a in
ba never allow to make aaa or bbb.
 The smallest word is of length zero (0) that is  (capital lambda) and it is present
in the language so other than it there is no smallest word that is not in the
language.
4. Consider the language S*, where S = {a, ab, ba}. Is the string (abbba) a
word in this language? Write out all the words in this language with six
or fewer letters. What is another way in which to describe the words in
this language? Be careful this is not simply the language of all words
without bbb.
Solution:
 No, the string abbba a word is not present in the language, because b
individually does not exist in the given string S, so (ab b ba) can’t exist in this
language.
 All the words with six or fewer letters in this language are written below:
S* = {, a, ab, ba, aa, aab, aba, aba, abab, abba, baa, baab, baba, aaa, aaab,
aaba, aaba, aabab, aabba, abaa, abaab, ababa, abaa, abaab, ababa, ababa,
ababab, ababba, abbaa, abbaab, abbaba, baaa, baaab, baaba, baaba, baabab,
baabba, babaa, babaab, bababa, aaaa, aaaab, aaaba, aaaba, aaabab, aaabba,
aabaa, aabaab, aababa, aabaa, aabaab, aababa, aababa, aababab, aababba,
aabbaa, aabbaab, aabbaba, abaaa, abaaab, abaaba, abaaba, abaabab, abaabba,
ababaa, ababaab, abababa, abaaa, abaaab, abaaba, abaaba, abaabab, abaabba,
ababaa, ababaab, abababa, ababaa, ababaab, abababa, abababa, abababab,
abababba, ababbaa, ababbaab, ababbaba, abbaaa, abbaaab, abbaaba, abbaaba,
abbaabab, abbaabba, abbabaa, abbabaab, abbababa, baaaa, baaaab, baaaba,
baaaba, baaabab, baaabba, baabaa, baabaab, baababa, baabaa, baabaab,
baababa, baababa, baababab, baababba, baabbaa, baabbaab, baabbaba,
babaaa, babaaab, babaaba, babaaba, babaabab, babaabba, bababaa, bababaab,
babababa, aaaaa, aaaaab, aaaaba, aaaaba, aaaabab, aaaabba, aaabaa, aaabaab,
aaababa, aaabaa, aaabaab, aaababa, aaababa, aaababab, aaababba, aaabbaa,
aaabbaab, aaabbaba, aabaaa, aabaaab, aabaaba, aabaaba, aabaabab, aabaabba,
aababaa, aababaab, aabababa, aabaaa, aabaaab, aabaaba, aabaaba, aabaabab,
aabaabba, aababaa, aababaab, aabababa, aababaa, aababaab, aabababa,
aabababa, aabababab, aabababba, aababbaa, aababbaab, aababbaba, aabbaaa,
aabbaaab, aabbaaba, aabbaaba, aabbaabab, aabbaabba, aabbabaa, aabbabaab,
aabbababa, abaaaa, abaaaab, abaaaba, abaaaba, abaaabab, abaaabba, abaabaa,
abaabaab, abaababa, abaabaa, abaabaab, abaababa, abaababa, abaababab,
abaababba, abaabbaa, abaabbaab, abaabbaba, ababaaa, ababaaab, ababaaba,
ababaaba, ababaabab, ababaabba, abababaa, abababaab, ababababa, abaaaa,
abaaaab, abaaaba, abaaaba, abaaabab, abaaabba, abaabaa, abaabaab,
abaababa, abaabaa, abaabaab, abaababa, abaababa, abaababab, abaababba,
abaabbaa, abaabbaab, abaabbaba, ababaaa, ababaaab, ababaaba, ababaaba,
ababaabab, ababaabba, abababaa, abababaab, ababababa, ababaaa, ababaaab,
ababaaba, ababaaba, ababaabab, ababaabba, abababaa, abababaab,
ababababa, abababaa, abababaab, ababababa, ababababa, ababababab,
ababababba, abababbaa, abababbaab, abababbaba, ababbaaa, ababbaaab,
ababbaaba, ababbaaba, ababbaabab, ababbaabba, ababbabaa, ababbabaab,
ababbababa, abbaaaa, abbaaaab, abbaaaba, abbaaaba, abbaaabab, abbaaabba,
abbaabaa, abbaabaab, abbaababa, abbaabaa, abbaabaab, abbaababa,
abbaababa, abbaababab, abbaababba, abbaabbaa, abbaabbaab, abbaabbaba,
abbabaaa, abbabaaab, abbabaaba, abbabaaba, abbabaabab, abbabaabba,
abbababaa, abbababaab, abbabababa,…} [upto six letters]
 Another way….
5. Consider the language S*, where S = {xx, xxx}. In how many ways
can x 19 be written as the product of words in S? This means: How
many different factorizations are there of x 19 into xx and xxx?
Solution:
(xx) (xx) (xx) (xx) (xx) (xx) (xx) (xx) + (xxx) = x16 + x3 = x19
x19 can consist of 8 double xx combinations and 1 triple xxx combination i.e
= 8 * 2 + 1 * 3 = 19
x19 can consist of 5 double xx combinations and 3 triples xxx combinations
= 5 * 2 + 3 * 3 = 19
x19 can consist of 2 double xx combinations and 5 triples xxx combinations
= 2 * 2 + 5 * 3 = 19
3 double xx combinations can be replaced by 2 triple xxx combinations like
(xx)(xx)(xx) = (xxx)(xxx)

More Related Content

What's hot

Lesson 05
Lesson 05Lesson 05
Lesson 03
Lesson 03Lesson 03
Theory of Automata
Theory of AutomataTheory of Automata
Theory of Automata
Farooq Mian
 
Language
LanguageLanguage
Language
Mobeen Mustafa
 
Lesson 04
Lesson 04Lesson 04
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal language
Rabia Khalid
 
Lesson 08
Lesson 08Lesson 08
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal language
Rabia Khalid
 
Lecture 1,2
Lecture 1,2Lecture 1,2
Lecture 1,2
shah zeb
 
Lecture 6
Lecture 6Lecture 6
Lecture 6
shah zeb
 
FInite Automata
FInite AutomataFInite Automata
FInite Automata
Mobeen Mustafa
 
NFA or Non deterministic finite automata
NFA or Non deterministic finite automataNFA or Non deterministic finite automata
NFA or Non deterministic finite automata
deepinderbedi
 
simple problem to convert NFA with epsilon to without epsilon
simple problem to convert NFA with epsilon to without epsilonsimple problem to convert NFA with epsilon to without epsilon
simple problem to convert NFA with epsilon to without epsilon
kanikkk
 
Closure properties of context free grammar
Closure properties of context free grammarClosure properties of context free grammar
Closure properties of context free grammar
AfshanKhan51
 
Regular Expression Examples.pptx
Regular Expression Examples.pptxRegular Expression Examples.pptx
Regular Expression Examples.pptx
GhulamRabani9
 
Lecture 5
Lecture 5Lecture 5
Lecture 5
shah zeb
 
Non regular languages
Non regular languagesNon regular languages
Non regular languageslavishka_anuj
 
Lecture 7
Lecture 7Lecture 7
Lecture 7
shah zeb
 
Pumping lemma Theory Of Automata
Pumping lemma Theory Of AutomataPumping lemma Theory Of Automata
Pumping lemma Theory Of Automata
hafizhamza0322
 
Lesson 12
Lesson 12Lesson 12

What's hot (20)

Lesson 05
Lesson 05Lesson 05
Lesson 05
 
Lesson 03
Lesson 03Lesson 03
Lesson 03
 
Theory of Automata
Theory of AutomataTheory of Automata
Theory of Automata
 
Language
LanguageLanguage
Language
 
Lesson 04
Lesson 04Lesson 04
Lesson 04
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal language
 
Lesson 08
Lesson 08Lesson 08
Lesson 08
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal language
 
Lecture 1,2
Lecture 1,2Lecture 1,2
Lecture 1,2
 
Lecture 6
Lecture 6Lecture 6
Lecture 6
 
FInite Automata
FInite AutomataFInite Automata
FInite Automata
 
NFA or Non deterministic finite automata
NFA or Non deterministic finite automataNFA or Non deterministic finite automata
NFA or Non deterministic finite automata
 
simple problem to convert NFA with epsilon to without epsilon
simple problem to convert NFA with epsilon to without epsilonsimple problem to convert NFA with epsilon to without epsilon
simple problem to convert NFA with epsilon to without epsilon
 
Closure properties of context free grammar
Closure properties of context free grammarClosure properties of context free grammar
Closure properties of context free grammar
 
Regular Expression Examples.pptx
Regular Expression Examples.pptxRegular Expression Examples.pptx
Regular Expression Examples.pptx
 
Lecture 5
Lecture 5Lecture 5
Lecture 5
 
Non regular languages
Non regular languagesNon regular languages
Non regular languages
 
Lecture 7
Lecture 7Lecture 7
Lecture 7
 
Pumping lemma Theory Of Automata
Pumping lemma Theory Of AutomataPumping lemma Theory Of Automata
Pumping lemma Theory Of Automata
 
Lesson 12
Lesson 12Lesson 12
Lesson 12
 

Viewers also liked

Introduction to the theory of computation
Introduction to the theory of computationIntroduction to the theory of computation
Introduction to the theory of computationprasadmvreddy
 
Deciability (automata presentation)
Deciability (automata presentation)Deciability (automata presentation)
Deciability (automata presentation)
Sagar Kumar
 
Chapter 5: Names, Bindings and Scopes (review Questions and Problem Set)
Chapter 5: Names, Bindings and Scopes (review Questions and Problem Set)Chapter 5: Names, Bindings and Scopes (review Questions and Problem Set)
Chapter 5: Names, Bindings and Scopes (review Questions and Problem Set)
Farwa Ansari
 
Energy Harvesting Techniques in Wireless Sensor Networks – A Survey
Energy Harvesting Techniques in Wireless Sensor Networks – A SurveyEnergy Harvesting Techniques in Wireless Sensor Networks – A Survey
Energy Harvesting Techniques in Wireless Sensor Networks – A Survey
Farwa Ansari
 
Lecture: Automata
Lecture: AutomataLecture: Automata
Lecture: Automata
Marina Santini
 
Finite Automata
Finite AutomataFinite Automata
Finite Automata
Mukesh Tekwani
 

Viewers also liked (6)

Introduction to the theory of computation
Introduction to the theory of computationIntroduction to the theory of computation
Introduction to the theory of computation
 
Deciability (automata presentation)
Deciability (automata presentation)Deciability (automata presentation)
Deciability (automata presentation)
 
Chapter 5: Names, Bindings and Scopes (review Questions and Problem Set)
Chapter 5: Names, Bindings and Scopes (review Questions and Problem Set)Chapter 5: Names, Bindings and Scopes (review Questions and Problem Set)
Chapter 5: Names, Bindings and Scopes (review Questions and Problem Set)
 
Energy Harvesting Techniques in Wireless Sensor Networks – A Survey
Energy Harvesting Techniques in Wireless Sensor Networks – A SurveyEnergy Harvesting Techniques in Wireless Sensor Networks – A Survey
Energy Harvesting Techniques in Wireless Sensor Networks – A Survey
 
Lecture: Automata
Lecture: AutomataLecture: Automata
Lecture: Automata
 
Finite Automata
Finite AutomataFinite Automata
Finite Automata
 

More from Farwa Ansari

Micro-services architecture
Micro-services architectureMicro-services architecture
Micro-services architecture
Farwa Ansari
 
Software Design Patterns - An Overview
Software Design Patterns - An OverviewSoftware Design Patterns - An Overview
Software Design Patterns - An Overview
Farwa Ansari
 
Optimizing the memory management of a virtual machine monitor on a NUMA syste...
Optimizing the memory management of a virtual machine monitor on a NUMA syste...Optimizing the memory management of a virtual machine monitor on a NUMA syste...
Optimizing the memory management of a virtual machine monitor on a NUMA syste...
Farwa Ansari
 
Fault Tolerance Typed Assembly Language - A graphical overview
Fault Tolerance Typed Assembly Language - A graphical overviewFault Tolerance Typed Assembly Language - A graphical overview
Fault Tolerance Typed Assembly Language - A graphical overview
Farwa Ansari
 
Comparative Analysis of Face Recognition Methodologies and Techniques
Comparative Analysis of Face Recognition Methodologies and TechniquesComparative Analysis of Face Recognition Methodologies and Techniques
Comparative Analysis of Face Recognition Methodologies and Techniques
Farwa Ansari
 
Chapter 4: Lexical & Syntax Analysis (Programming Exercises)
Chapter 4: Lexical & Syntax Analysis (Programming Exercises)Chapter 4: Lexical & Syntax Analysis (Programming Exercises)
Chapter 4: Lexical & Syntax Analysis (Programming Exercises)
Farwa Ansari
 
Business plan of a software house
Business plan of a software houseBusiness plan of a software house
Business plan of a software house
Farwa Ansari
 
Mission statement and Vision statement of 3 Different Companies
Mission statement and Vision statement of 3 Different CompaniesMission statement and Vision statement of 3 Different Companies
Mission statement and Vision statement of 3 Different Companies
Farwa Ansari
 
Applications of Image Processing
Applications of Image ProcessingApplications of Image Processing
Applications of Image Processing
Farwa Ansari
 
Cohen sutherland algorithm
Cohen sutherland algorithmCohen sutherland algorithm
Cohen sutherland algorithm
Farwa Ansari
 
Scaling
ScalingScaling
Scaling
Farwa Ansari
 
Raster images (assignment)
Raster images (assignment)Raster images (assignment)
Raster images (assignment)
Farwa Ansari
 
Prefix and suffix of open gl
Prefix and suffix of open glPrefix and suffix of open gl
Prefix and suffix of open gl
Farwa Ansari
 
Linear combination of vector
Linear combination of vectorLinear combination of vector
Linear combination of vector
Farwa Ansari
 
Graphic display devices
Graphic display devicesGraphic display devices
Graphic display devices
Farwa Ansari
 
Implementation & Challenges of IPv6
Implementation & Challenges of IPv6Implementation & Challenges of IPv6
Implementation & Challenges of IPv6
Farwa Ansari
 
IPv6 Implementation challenges
IPv6 Implementation challengesIPv6 Implementation challenges
IPv6 Implementation challenges
Farwa Ansari
 
Tomasulo Algorithm
Tomasulo AlgorithmTomasulo Algorithm
Tomasulo Algorithm
Farwa Ansari
 
Summary of Simultaneous Multithreading: Maximizing On-Chip Parallelism
Summary of Simultaneous Multithreading: Maximizing On-Chip ParallelismSummary of Simultaneous Multithreading: Maximizing On-Chip Parallelism
Summary of Simultaneous Multithreading: Maximizing On-Chip Parallelism
Farwa Ansari
 
Memory Hierarchy Design, Basics, Cache Optimization, Address Translation
Memory Hierarchy Design, Basics, Cache Optimization, Address TranslationMemory Hierarchy Design, Basics, Cache Optimization, Address Translation
Memory Hierarchy Design, Basics, Cache Optimization, Address Translation
Farwa Ansari
 

More from Farwa Ansari (20)

Micro-services architecture
Micro-services architectureMicro-services architecture
Micro-services architecture
 
Software Design Patterns - An Overview
Software Design Patterns - An OverviewSoftware Design Patterns - An Overview
Software Design Patterns - An Overview
 
Optimizing the memory management of a virtual machine monitor on a NUMA syste...
Optimizing the memory management of a virtual machine monitor on a NUMA syste...Optimizing the memory management of a virtual machine monitor on a NUMA syste...
Optimizing the memory management of a virtual machine monitor on a NUMA syste...
 
Fault Tolerance Typed Assembly Language - A graphical overview
Fault Tolerance Typed Assembly Language - A graphical overviewFault Tolerance Typed Assembly Language - A graphical overview
Fault Tolerance Typed Assembly Language - A graphical overview
 
Comparative Analysis of Face Recognition Methodologies and Techniques
Comparative Analysis of Face Recognition Methodologies and TechniquesComparative Analysis of Face Recognition Methodologies and Techniques
Comparative Analysis of Face Recognition Methodologies and Techniques
 
Chapter 4: Lexical & Syntax Analysis (Programming Exercises)
Chapter 4: Lexical & Syntax Analysis (Programming Exercises)Chapter 4: Lexical & Syntax Analysis (Programming Exercises)
Chapter 4: Lexical & Syntax Analysis (Programming Exercises)
 
Business plan of a software house
Business plan of a software houseBusiness plan of a software house
Business plan of a software house
 
Mission statement and Vision statement of 3 Different Companies
Mission statement and Vision statement of 3 Different CompaniesMission statement and Vision statement of 3 Different Companies
Mission statement and Vision statement of 3 Different Companies
 
Applications of Image Processing
Applications of Image ProcessingApplications of Image Processing
Applications of Image Processing
 
Cohen sutherland algorithm
Cohen sutherland algorithmCohen sutherland algorithm
Cohen sutherland algorithm
 
Scaling
ScalingScaling
Scaling
 
Raster images (assignment)
Raster images (assignment)Raster images (assignment)
Raster images (assignment)
 
Prefix and suffix of open gl
Prefix and suffix of open glPrefix and suffix of open gl
Prefix and suffix of open gl
 
Linear combination of vector
Linear combination of vectorLinear combination of vector
Linear combination of vector
 
Graphic display devices
Graphic display devicesGraphic display devices
Graphic display devices
 
Implementation & Challenges of IPv6
Implementation & Challenges of IPv6Implementation & Challenges of IPv6
Implementation & Challenges of IPv6
 
IPv6 Implementation challenges
IPv6 Implementation challengesIPv6 Implementation challenges
IPv6 Implementation challenges
 
Tomasulo Algorithm
Tomasulo AlgorithmTomasulo Algorithm
Tomasulo Algorithm
 
Summary of Simultaneous Multithreading: Maximizing On-Chip Parallelism
Summary of Simultaneous Multithreading: Maximizing On-Chip ParallelismSummary of Simultaneous Multithreading: Maximizing On-Chip Parallelism
Summary of Simultaneous Multithreading: Maximizing On-Chip Parallelism
 
Memory Hierarchy Design, Basics, Cache Optimization, Address Translation
Memory Hierarchy Design, Basics, Cache Optimization, Address TranslationMemory Hierarchy Design, Basics, Cache Optimization, Address Translation
Memory Hierarchy Design, Basics, Cache Optimization, Address Translation
 

Recently uploaded

Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
Subhajit Sahu
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
AbhimanyuSinha9
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
yhkoc
 
My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.
rwarrenll
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
NABLAS株式会社
 
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
ukgaet
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
ocavb
 
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
mbawufebxi
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
TravisMalana
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
Opendatabay
 
FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
MaleehaSheikh2
 
一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单
enxupq
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
pchutichetpong
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
axoqas
 
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project PresentationPredicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Boston Institute of Analytics
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
jerlynmaetalle
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
ArpitMalhotra16
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
slg6lamcq
 

Recently uploaded (20)

Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
 
My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
 
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
 
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
 
FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
 
一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
 
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project PresentationPredicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
 

Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. COHEN. Chapter 2 Problems

  • 1. By: F.A 4/1/2014 AUTOMATA CHAPTER 2: LANGUAGES (PROBLEMS)
  • 2. Chapter 2: LANGUAGES Problems: 1. Consider the language S*, where S = {a, b}. How many words does this language have of length 2? Of length 3? Of length n? Solution: S = {a, b} S* = {, a, b, aa, ab, bb, ba, aaa, aab, aba, abb, bbb, bba, bab, baa,…. }  So this language have words of length 2 = 4 Of length 3 = 8 Of length n = 2n  We can solve this question in the following way too Let number of words = nm Then words of length 2 = 22 = 4 Of length 3 = 23 = 8 Of length n = 2n 2. Consider the language S*, where S = {aa, b}. how many words does this language have of length 4? Of length 5? Of length 6? What can be said in general? Solution: S = {aa, b} S* = {, aa, b, aaaa, aab, bb, baa, aaaaaa, aaaab, aabb, aabaa, baaaa, baab, bbb, bbaa, aaaaaaaa, aaaaaab, aaaabb, aaaabaa, aabaaaa, aabaab, aabbb, aabbaa,
  • 3. bbbb, bbbaa, bbaaaa, bbaab, baabb, baabaa, baaaaaa, baaaab, aaaaaaaaaa, …….}  So words of length 4 = 24 = 16 Of length 5 = 25 = 32 Of length 5 = 26 = 64 In general: In general we can say that 3. Consider the language S*, where S = {ab, ba}. Write out all the words in S* that have seven or fewer letters. Can any word in this language contain the substrings aaa or bbb? What is the smallest word that is not in this language? Solution: S = {ab, ba} S* = {, ab, ba, abab, abba, baba, baab, ababab, ababba, abbaba, abbaab, baabab, baabba, bababa, babaab, abababab, abababba, ababbaba, ababbaab, abbaabab, abbaabba, abbababa, abbabaab, baababab, baababba, baabbaba, baabbaab, babaabab, babaabba, babababa, bababaab, ababababab, ababababba, abababbaba, abababbaab, ababbaabab, ababbaabba, ababbababa, ababbabaab, abbaababab, abbaababba, abbaabbaba, abbaabbaab, abbabaabab, abbabaabba, abbabababa, abbababaab, baabababab, baabababba, baababbaba, baababbaab, baabbaabab, baabbaabba, baabbababa, baabbabaab, babaababab, babaababba, babaabbaba, babaabbaab, bababaabab, bababaabba, bababababa, babababaab, abababababab, abababababba, ababababbaba, ababababbaab, abababbaabab, abababbaabba, abababbababa, abababbabaab, ababbaababab, ababbaababba, ababbaabbaba, ababbaabbaab, ababbabaabab, ababbabaabba, ababbabababa, ababbababaab, abbaabababab, abbaabababba, abbaababbaba, abbaababbaab, abbaabbaabab, abbaabbaabba, abbaabbababa, abbaabbabaab, abbabaababab, abbabaababba, abbabaabbaba, abbabaabbaab, abbababaabab, abbababaabba, abbababababa, abbabababaab, ababababababab, ababababababba, abababababbaba, abababababbaab, ababababbaabab, ababababbaabba, ababababbababa, ababababbabaab, abababbaababab, abababbaababba, ababbaabbaba, ababbaabbaab, ababbabaabab,
  • 4. abababbabaabba, abababbabababa, abababbababaab, ababbaabababab, ababbaabababba, ababbaababbaba, ababbaababbaab, ababbaabbaabab, ababbaabbaabba, ababbaabbababa, ababbaabbabaab, ababbabaababab, ababbabaababba, ababbabaabbaba, ababbabaabbaab, ababbababaabab, ababbababaabba, ababbababababa, ababbabababaab, baabababababab, baabababababba, baababababbaba, baababababbaab, baabababbaabab, baabababbaabba, baabababbababa, baabababbabaab, baababbaababab, baababbaababba, baababbaabbaba, baababbaabbaab, baababbabaabab, baababbabaabba, baababbabababa, baababbababaab, baabbaabababab, baabbaabababba, baabbaababbaba, baabbaababbaab, baabbaabbaabab, baabbaabbaabba, baabbaabbababa, baabbaabbabaab, baabbabaababab, baabbabaababba, baabbabaabbaba, baabbabaabbaab, baabbababaabab, baabbababaabba, baabbababababa, baabbabababaab,…}  All words in S* that have seven or fewer letters: S* = { abababababab, abababababba, ababababbaba, ababababbaab, abababbaabab, abababbaabba, abababbababa, abababbabaab, ababbaababab, ababbaababba, ababbaabbaba, ababbaabbaab, ababbabaabab, ababbabaabba, ababbabababa, ababbababaab, abbaabababab, abbaabababba, abbaababbaba, abbaababbaab, abbaabbaabab, abbaabbaabba, abbaabbababa, abbaabbabaab, abbabaababab, abbabaababba, abbabaabbaba, abbabaabbaab, abbababaabab, abbababaabba, abbababababa, abbabababaab, ababababababab, ababababababba, abababababbaba, abababababbaab, ababababbaabab, ababababbaabba, ababababbababa, ababababbabaab, abababbaababab, abababbaababba, ababbaabbaba, ababbaabbaab, ababbabaabab, abababbabaabba, abababbabababa, abababbababaab, ababbaabababab, ababbaabababba, ababbaababbaba, ababbaababbaab, ababbaabbaabab, ababbaabbaabba, ababbaabbababa, ababbaabbabaab, ababbabaababab, ababbabaababba, ababbabaabbaba, ababbabaabbaab, ababbababaabab, ababbababaabba, ababbababababa, ababbabababaab, baabababababab, baabababababba, baababababbaba, baababababbaab, baabababbaabab, baabababbaabba, baabababbababa, baabababbabaab, baababbaababab, baababbaababba, baababbaabbaba, baababbaabbaab, baababbabaabab, baababbabaabba, baababbabababa, baababbababaab, baabbaabababab, baabbaabababba, baabbaababbaba, baabbaababbaab, baabbaabbaabab, baabbaabbaabba, baabbaabbababa, baabbaabbabaab, baabbabaababab, baabbabaababba, baabbabaabbaba, baabbabaabbaab, baabbababaabab, baabbababaabba, baabbababababa, baabbabababaab }
  • 5.  No, No words can contain aaa or bbb because the first a in string ab and the a in ba never allow to make aaa or bbb.  The smallest word is of length zero (0) that is  (capital lambda) and it is present in the language so other than it there is no smallest word that is not in the language. 4. Consider the language S*, where S = {a, ab, ba}. Is the string (abbba) a word in this language? Write out all the words in this language with six or fewer letters. What is another way in which to describe the words in this language? Be careful this is not simply the language of all words without bbb. Solution:  No, the string abbba a word is not present in the language, because b individually does not exist in the given string S, so (ab b ba) can’t exist in this language.  All the words with six or fewer letters in this language are written below: S* = {, a, ab, ba, aa, aab, aba, aba, abab, abba, baa, baab, baba, aaa, aaab, aaba, aaba, aabab, aabba, abaa, abaab, ababa, abaa, abaab, ababa, ababa, ababab, ababba, abbaa, abbaab, abbaba, baaa, baaab, baaba, baaba, baabab, baabba, babaa, babaab, bababa, aaaa, aaaab, aaaba, aaaba, aaabab, aaabba, aabaa, aabaab, aababa, aabaa, aabaab, aababa, aababa, aababab, aababba, aabbaa, aabbaab, aabbaba, abaaa, abaaab, abaaba, abaaba, abaabab, abaabba, ababaa, ababaab, abababa, abaaa, abaaab, abaaba, abaaba, abaabab, abaabba, ababaa, ababaab, abababa, ababaa, ababaab, abababa, abababa, abababab, abababba, ababbaa, ababbaab, ababbaba, abbaaa, abbaaab, abbaaba, abbaaba, abbaabab, abbaabba, abbabaa, abbabaab, abbababa, baaaa, baaaab, baaaba, baaaba, baaabab, baaabba, baabaa, baabaab, baababa, baabaa, baabaab, baababa, baababa, baababab, baababba, baabbaa, baabbaab, baabbaba, babaaa, babaaab, babaaba, babaaba, babaabab, babaabba, bababaa, bababaab, babababa, aaaaa, aaaaab, aaaaba, aaaaba, aaaabab, aaaabba, aaabaa, aaabaab, aaababa, aaabaa, aaabaab, aaababa, aaababa, aaababab, aaababba, aaabbaa, aaabbaab, aaabbaba, aabaaa, aabaaab, aabaaba, aabaaba, aabaabab, aabaabba, aababaa, aababaab, aabababa, aabaaa, aabaaab, aabaaba, aabaaba, aabaabab, aabaabba, aababaa, aababaab, aabababa, aababaa, aababaab, aabababa, aabababa, aabababab, aabababba, aababbaa, aababbaab, aababbaba, aabbaaa, aabbaaab, aabbaaba, aabbaaba, aabbaabab, aabbaabba, aabbabaa, aabbabaab,
  • 6. aabbababa, abaaaa, abaaaab, abaaaba, abaaaba, abaaabab, abaaabba, abaabaa, abaabaab, abaababa, abaabaa, abaabaab, abaababa, abaababa, abaababab, abaababba, abaabbaa, abaabbaab, abaabbaba, ababaaa, ababaaab, ababaaba, ababaaba, ababaabab, ababaabba, abababaa, abababaab, ababababa, abaaaa, abaaaab, abaaaba, abaaaba, abaaabab, abaaabba, abaabaa, abaabaab, abaababa, abaabaa, abaabaab, abaababa, abaababa, abaababab, abaababba, abaabbaa, abaabbaab, abaabbaba, ababaaa, ababaaab, ababaaba, ababaaba, ababaabab, ababaabba, abababaa, abababaab, ababababa, ababaaa, ababaaab, ababaaba, ababaaba, ababaabab, ababaabba, abababaa, abababaab, ababababa, abababaa, abababaab, ababababa, ababababa, ababababab, ababababba, abababbaa, abababbaab, abababbaba, ababbaaa, ababbaaab, ababbaaba, ababbaaba, ababbaabab, ababbaabba, ababbabaa, ababbabaab, ababbababa, abbaaaa, abbaaaab, abbaaaba, abbaaaba, abbaaabab, abbaaabba, abbaabaa, abbaabaab, abbaababa, abbaabaa, abbaabaab, abbaababa, abbaababa, abbaababab, abbaababba, abbaabbaa, abbaabbaab, abbaabbaba, abbabaaa, abbabaaab, abbabaaba, abbabaaba, abbabaabab, abbabaabba, abbababaa, abbababaab, abbabababa,…} [upto six letters]  Another way…. 5. Consider the language S*, where S = {xx, xxx}. In how many ways can x 19 be written as the product of words in S? This means: How many different factorizations are there of x 19 into xx and xxx? Solution: (xx) (xx) (xx) (xx) (xx) (xx) (xx) (xx) + (xxx) = x16 + x3 = x19 x19 can consist of 8 double xx combinations and 1 triple xxx combination i.e = 8 * 2 + 1 * 3 = 19 x19 can consist of 5 double xx combinations and 3 triples xxx combinations = 5 * 2 + 3 * 3 = 19 x19 can consist of 2 double xx combinations and 5 triples xxx combinations = 2 * 2 + 5 * 3 = 19 3 double xx combinations can be replaced by 2 triple xxx combinations like (xx)(xx)(xx) = (xxx)(xxx)