SlideShare ist ein Scribd-Unternehmen logo
1 von 6
Downloaden Sie, um offline zu lesen
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)

Más contenido relacionado

Was ist angesagt?

Theory of Automata
Theory of AutomataTheory of Automata
Theory of AutomataFarooq Mian
 
Lecture 1,2
Lecture 1,2Lecture 1,2
Lecture 1,2shah zeb
 
Automata theory
Automata theoryAutomata theory
Automata theorycolleges
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal languageRabia Khalid
 
Lecture 3,4
Lecture 3,4Lecture 3,4
Lecture 3,4shah zeb
 
Theory of Automata Lesson 02
Theory of Automata Lesson 02Theory of Automata Lesson 02
Theory of Automata Lesson 02hamzamughal39
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal languageRabia Khalid
 
Deterministic Finite Automata (DFA)
Deterministic Finite Automata (DFA)Deterministic Finite Automata (DFA)
Deterministic Finite Automata (DFA)Animesh Chaturvedi
 
Regular Expression Examples.pptx
Regular Expression Examples.pptxRegular Expression Examples.pptx
Regular Expression Examples.pptxGhulamRabani9
 
Alphabets , strings, languages and grammars
Alphabets , strings, languages  and grammarsAlphabets , strings, languages  and grammars
Alphabets , strings, languages and grammarshele987
 
Theory of computing
Theory of computingTheory of computing
Theory of computingRanjan Kumar
 
Context free languages
Context free languagesContext free languages
Context free languagesJahurul Islam
 
Theory of Automata Lesson 01
 Theory of Automata Lesson 01  Theory of Automata Lesson 01
Theory of Automata Lesson 01 hamzamughal39
 

Was ist angesagt? (20)

Theory of Automata
Theory of AutomataTheory of Automata
Theory of Automata
 
Lesson 05
Lesson 05Lesson 05
Lesson 05
 
Lecture 1,2
Lecture 1,2Lecture 1,2
Lecture 1,2
 
Lesson 12
Lesson 12Lesson 12
Lesson 12
 
Automata theory
Automata theoryAutomata theory
Automata theory
 
Lecture 8
Lecture 8Lecture 8
Lecture 8
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal language
 
Lecture 3,4
Lecture 3,4Lecture 3,4
Lecture 3,4
 
Theory of Automata Lesson 02
Theory of Automata Lesson 02Theory of Automata Lesson 02
Theory of Automata Lesson 02
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal language
 
Deterministic Finite Automata (DFA)
Deterministic Finite Automata (DFA)Deterministic Finite Automata (DFA)
Deterministic Finite Automata (DFA)
 
Lecture 5
Lecture 5Lecture 5
Lecture 5
 
Lesson 10
Lesson 10Lesson 10
Lesson 10
 
Regular Expression Examples.pptx
Regular Expression Examples.pptxRegular Expression Examples.pptx
Regular Expression Examples.pptx
 
pushdown automata
pushdown automatapushdown automata
pushdown automata
 
Alphabets , strings, languages and grammars
Alphabets , strings, languages  and grammarsAlphabets , strings, languages  and grammars
Alphabets , strings, languages and grammars
 
Theory of computing
Theory of computingTheory of computing
Theory of computing
 
Context free languages
Context free languagesContext free languages
Context free languages
 
Automata theory
Automata theoryAutomata theory
Automata theory
 
Theory of Automata Lesson 01
 Theory of Automata Lesson 01  Theory of Automata Lesson 01
Theory of Automata Lesson 01
 

Andere mochten auch

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 SurveyFarwa Ansari
 

Andere mochten auch (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
 

Mehr von Farwa Ansari

Micro-services architecture
Micro-services architectureMicro-services architecture
Micro-services architectureFarwa Ansari
 
Software Design Patterns - An Overview
Software Design Patterns - An OverviewSoftware Design Patterns - An Overview
Software Design Patterns - An OverviewFarwa 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 overviewFarwa 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 TechniquesFarwa 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 houseFarwa 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 CompaniesFarwa Ansari
 
Applications of Image Processing
Applications of Image ProcessingApplications of Image Processing
Applications of Image ProcessingFarwa Ansari
 
Cohen sutherland algorithm
Cohen sutherland algorithmCohen sutherland algorithm
Cohen sutherland algorithmFarwa 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 glFarwa Ansari
 
Linear combination of vector
Linear combination of vectorLinear combination of vector
Linear combination of vectorFarwa Ansari
 
Graphic display devices
Graphic display devicesGraphic display devices
Graphic display devicesFarwa 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 challengesFarwa Ansari
 
Tomasulo Algorithm
Tomasulo AlgorithmTomasulo Algorithm
Tomasulo AlgorithmFarwa 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 ParallelismFarwa 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 TranslationFarwa Ansari
 

Mehr von 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
 

Último

Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdf
Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdfNeo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdf
Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdfNeo4j
 
Using DAX & Time-based Analysis in Data Warehouse
Using DAX & Time-based Analysis in Data WarehouseUsing DAX & Time-based Analysis in Data Warehouse
Using DAX & Time-based Analysis in Data WarehouseThinkInnovation
 
Air Con Energy Rating Info411 Presentation.pdf
Air Con Energy Rating Info411 Presentation.pdfAir Con Energy Rating Info411 Presentation.pdf
Air Con Energy Rating Info411 Presentation.pdfJasonBoboKyaw
 
Deloitte+RedCross_Talk to your data with Knowledge-enriched Generative AI.ppt...
Deloitte+RedCross_Talk to your data with Knowledge-enriched Generative AI.ppt...Deloitte+RedCross_Talk to your data with Knowledge-enriched Generative AI.ppt...
Deloitte+RedCross_Talk to your data with Knowledge-enriched Generative AI.ppt...Neo4j
 
Bengaluru Tableau UG event- 2nd March 2024 Q1
Bengaluru Tableau UG event- 2nd March 2024 Q1Bengaluru Tableau UG event- 2nd March 2024 Q1
Bengaluru Tableau UG event- 2nd March 2024 Q1bengalurutug
 
Stochastic Dynamic Programming and You.pptx
Stochastic Dynamic Programming and You.pptxStochastic Dynamic Programming and You.pptx
Stochastic Dynamic Programming and You.pptxjkmrshll88
 
Elements of language learning - an analysis of how different elements of lang...
Elements of language learning - an analysis of how different elements of lang...Elements of language learning - an analysis of how different elements of lang...
Elements of language learning - an analysis of how different elements of lang...PrithaVashisht1
 
STOCK PRICE ANALYSIS Furkan Ali TASCI --.pptx
STOCK PRICE ANALYSIS  Furkan Ali TASCI --.pptxSTOCK PRICE ANALYSIS  Furkan Ali TASCI --.pptx
STOCK PRICE ANALYSIS Furkan Ali TASCI --.pptxFurkanTasci3
 
Unleashing Datas Potential - Mastering Precision with FCO-IM
Unleashing Datas Potential - Mastering Precision with FCO-IMUnleashing Datas Potential - Mastering Precision with FCO-IM
Unleashing Datas Potential - Mastering Precision with FCO-IMMarco Wobben
 
Enabling GenAI Breakthroughs with Knowledge Graphs
Enabling GenAI Breakthroughs with Knowledge GraphsEnabling GenAI Breakthroughs with Knowledge Graphs
Enabling GenAI Breakthroughs with Knowledge GraphsNeo4j
 
How to Build an Experimentation Culture for Data-Driven Product Development
How to Build an Experimentation Culture for Data-Driven Product DevelopmentHow to Build an Experimentation Culture for Data-Driven Product Development
How to Build an Experimentation Culture for Data-Driven Product DevelopmentAggregage
 
Paul Martin (Gartner) - Show Me the AI Money.pdf
Paul Martin (Gartner) - Show Me the AI Money.pdfPaul Martin (Gartner) - Show Me the AI Money.pdf
Paul Martin (Gartner) - Show Me the AI Money.pdfdcphostmaster
 
TCFPro24 Building Real-Time Generative AI Pipelines
TCFPro24 Building Real-Time Generative AI PipelinesTCFPro24 Building Real-Time Generative AI Pipelines
TCFPro24 Building Real-Time Generative AI PipelinesTimothy Spann
 
Neo4j_Jesus Barrasa_The Art of the Possible with Graph.pptx.pdf
Neo4j_Jesus Barrasa_The Art of the Possible with Graph.pptx.pdfNeo4j_Jesus Barrasa_The Art of the Possible with Graph.pptx.pdf
Neo4j_Jesus Barrasa_The Art of the Possible with Graph.pptx.pdfNeo4j
 
Brain Tumor Detection with Machine Learning.pptx
Brain Tumor Detection with Machine Learning.pptxBrain Tumor Detection with Machine Learning.pptx
Brain Tumor Detection with Machine Learning.pptxShammiRai3
 
Data Analytics Fundamentals: data analytics types.potx
Data Analytics Fundamentals: data analytics types.potxData Analytics Fundamentals: data analytics types.potx
Data Analytics Fundamentals: data analytics types.potxEmmanuel Dauda
 
The market for cross-border mortgages in Europe
The market for cross-border mortgages in EuropeThe market for cross-border mortgages in Europe
The market for cross-border mortgages in Europe321k
 
Báo cáo Social Media Benchmark 2024 cho dân Marketing
Báo cáo Social Media Benchmark 2024 cho dân MarketingBáo cáo Social Media Benchmark 2024 cho dân Marketing
Báo cáo Social Media Benchmark 2024 cho dân MarketingMarketingTrips
 
Empowering Decisions A Guide to Embedded Analytics
Empowering Decisions A Guide to Embedded AnalyticsEmpowering Decisions A Guide to Embedded Analytics
Empowering Decisions A Guide to Embedded AnalyticsGain Insights
 
Prediction Of Cryptocurrency Prices Using Lstm, Svm And Polynomial Regression...
Prediction Of Cryptocurrency Prices Using Lstm, Svm And Polynomial Regression...Prediction Of Cryptocurrency Prices Using Lstm, Svm And Polynomial Regression...
Prediction Of Cryptocurrency Prices Using Lstm, Svm And Polynomial Regression...ferisulianta.com
 

Último (20)

Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdf
Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdfNeo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdf
Neo4j Graph Summit 2024 Workshop - EMEA - Breda_and_Munchen.pdf
 
Using DAX & Time-based Analysis in Data Warehouse
Using DAX & Time-based Analysis in Data WarehouseUsing DAX & Time-based Analysis in Data Warehouse
Using DAX & Time-based Analysis in Data Warehouse
 
Air Con Energy Rating Info411 Presentation.pdf
Air Con Energy Rating Info411 Presentation.pdfAir Con Energy Rating Info411 Presentation.pdf
Air Con Energy Rating Info411 Presentation.pdf
 
Deloitte+RedCross_Talk to your data with Knowledge-enriched Generative AI.ppt...
Deloitte+RedCross_Talk to your data with Knowledge-enriched Generative AI.ppt...Deloitte+RedCross_Talk to your data with Knowledge-enriched Generative AI.ppt...
Deloitte+RedCross_Talk to your data with Knowledge-enriched Generative AI.ppt...
 
Bengaluru Tableau UG event- 2nd March 2024 Q1
Bengaluru Tableau UG event- 2nd March 2024 Q1Bengaluru Tableau UG event- 2nd March 2024 Q1
Bengaluru Tableau UG event- 2nd March 2024 Q1
 
Stochastic Dynamic Programming and You.pptx
Stochastic Dynamic Programming and You.pptxStochastic Dynamic Programming and You.pptx
Stochastic Dynamic Programming and You.pptx
 
Elements of language learning - an analysis of how different elements of lang...
Elements of language learning - an analysis of how different elements of lang...Elements of language learning - an analysis of how different elements of lang...
Elements of language learning - an analysis of how different elements of lang...
 
STOCK PRICE ANALYSIS Furkan Ali TASCI --.pptx
STOCK PRICE ANALYSIS  Furkan Ali TASCI --.pptxSTOCK PRICE ANALYSIS  Furkan Ali TASCI --.pptx
STOCK PRICE ANALYSIS Furkan Ali TASCI --.pptx
 
Unleashing Datas Potential - Mastering Precision with FCO-IM
Unleashing Datas Potential - Mastering Precision with FCO-IMUnleashing Datas Potential - Mastering Precision with FCO-IM
Unleashing Datas Potential - Mastering Precision with FCO-IM
 
Enabling GenAI Breakthroughs with Knowledge Graphs
Enabling GenAI Breakthroughs with Knowledge GraphsEnabling GenAI Breakthroughs with Knowledge Graphs
Enabling GenAI Breakthroughs with Knowledge Graphs
 
How to Build an Experimentation Culture for Data-Driven Product Development
How to Build an Experimentation Culture for Data-Driven Product DevelopmentHow to Build an Experimentation Culture for Data-Driven Product Development
How to Build an Experimentation Culture for Data-Driven Product Development
 
Paul Martin (Gartner) - Show Me the AI Money.pdf
Paul Martin (Gartner) - Show Me the AI Money.pdfPaul Martin (Gartner) - Show Me the AI Money.pdf
Paul Martin (Gartner) - Show Me the AI Money.pdf
 
TCFPro24 Building Real-Time Generative AI Pipelines
TCFPro24 Building Real-Time Generative AI PipelinesTCFPro24 Building Real-Time Generative AI Pipelines
TCFPro24 Building Real-Time Generative AI Pipelines
 
Neo4j_Jesus Barrasa_The Art of the Possible with Graph.pptx.pdf
Neo4j_Jesus Barrasa_The Art of the Possible with Graph.pptx.pdfNeo4j_Jesus Barrasa_The Art of the Possible with Graph.pptx.pdf
Neo4j_Jesus Barrasa_The Art of the Possible with Graph.pptx.pdf
 
Brain Tumor Detection with Machine Learning.pptx
Brain Tumor Detection with Machine Learning.pptxBrain Tumor Detection with Machine Learning.pptx
Brain Tumor Detection with Machine Learning.pptx
 
Data Analytics Fundamentals: data analytics types.potx
Data Analytics Fundamentals: data analytics types.potxData Analytics Fundamentals: data analytics types.potx
Data Analytics Fundamentals: data analytics types.potx
 
The market for cross-border mortgages in Europe
The market for cross-border mortgages in EuropeThe market for cross-border mortgages in Europe
The market for cross-border mortgages in Europe
 
Báo cáo Social Media Benchmark 2024 cho dân Marketing
Báo cáo Social Media Benchmark 2024 cho dân MarketingBáo cáo Social Media Benchmark 2024 cho dân Marketing
Báo cáo Social Media Benchmark 2024 cho dân Marketing
 
Empowering Decisions A Guide to Embedded Analytics
Empowering Decisions A Guide to Embedded AnalyticsEmpowering Decisions A Guide to Embedded Analytics
Empowering Decisions A Guide to Embedded Analytics
 
Prediction Of Cryptocurrency Prices Using Lstm, Svm And Polynomial Regression...
Prediction Of Cryptocurrency Prices Using Lstm, Svm And Polynomial Regression...Prediction Of Cryptocurrency Prices Using Lstm, Svm And Polynomial Regression...
Prediction Of Cryptocurrency Prices Using Lstm, Svm And Polynomial Regression...
 

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)