SlideShare une entreprise Scribd logo
1  sur  6
Class:-TE Subject:- Theory of computation Branch: Comp Engg
Subject Incharge: Pallavi Yevale
Test No:-1
1) Draw a DFA to accept strings of 0’s, 1’s and 2’s beginning with a ‘0’
followed by odd number of 1’s and ending with ‘2’. (5)
2) Explain DFA with example and it’s disadvantages. (5)
3) Obtain DFA from given NFA (10)
OR
Convert the following є- NFA to its equivalent DFA.
q0 q1 q2 q3
q0 q1 q2
Class:-TE Subject:- Theory of computation Branch: Comp Engg
Subject Incharge: Pallavi Yevale
Test No:-2
1. Attempt any five. (5)
a) Obtain a regular expression to accept the strings of 0’s and 1’s having no
two consecutive 0’s.
b) Obtain a regular expression to accept the strings of a’s and b’s starting
with ‘a’ and ending with ‘b’.
c) Obtain a regular expression to accept the strings of a’s and b’s whose
second symbol from the right end is ‘a’.’
d) Obtain a regular expression to accept the strings of a’s and b’s such that
3rd
symbol from the right is ‘a’ and 4th
symbol the right end is ‘b’.
e) Obtain a regular expression to accept the words with two or more letters
but beginning and ending with same letter where ∑ = {a,b}
f) Obtain a regular expression for the language
L={an
bm
| m+n is even}
g) Obtain a regular expression for the language
L={an
bm
| m≥1,n≥ 1,nm≥ 3}
2. Following FA recognize the languages L1 and L2. Draw FA recognizing
language L1- L2 (5)
M1
M2
Class:-TE Subject:- Theory of computation Branch: Comp Engg
Subject Incharge: Pallavi Yevale
3. Minimize the number of states of following FA. (10)
OR
Find out the regular expression of following FA’s.
δ a b
A B A
B A C
C D B
*D D A
E D F
F G E
G F G
H G D
δ a b
*1 1 2
*2 1 3
3 1 2
Class:-TE Subject:- Theory of computation Branch: Comp Engg
Subject Incharge: Pallavi Yevale
Test No:-3
Solve any two Questions.
1. Obtain the grammar for the following FA. [10]
a. Obtain grammar to generate string consisting of any number of
a’s.
b. Obtain grammar to generate string consisting of at least one a.
c. Obtain grammar to generate string consisting of any number of
a’s and b’s.
d. Obtain grammar to generate string consisting of at least two a’s.
e. Obtain grammar to generate string consisting of even number of
a’s.
2. A) Is the following grammar ambiguobs? [5]
S→ AB | aaB
A→ a | Aa
B→ b
B) Eliminate the useless symbols from the following grammar. [5]
S→ aA | bB
A→ aA | a
B→ bB
D→ ab | Ea
E→ ac | d
Class:-TE Subject:- Theory of computation Branch: Comp Engg
Subject Incharge: Pallavi Yevale
3. A) Eliminate all unit productions From the grammar [5]
S→ AB
A→ a
B→ C | b
C→ D
D→ E | bc
E→ d | Ab
B) Convert the following grammar into CNF. [5]
S→ 0A | B
A→ 0AA | 1S | 1
B→ 1BB | 0S | 0
Class:-TE Subject:- Theory of computation Branch: Comp Engg
Subject Incharge: Pallavi Yevale
Test No:-4
1. Explain
a. Definition of PDA [4]
b. Acceptance of PDA [2]
2. Design a DPDA for a binary number divisible by 3. [6]
3. Construct the PDA from the following CFG for the language
L={ x є {a,b}*| na(x) >nb(x)} [8]
S a |aS | bSS | SSb | SbS
And show the sequence of moves to accept the string abbaaa.
OR
Write the rules for converting the PDA to CFG and obtain CFG form
following PDA. [8]
Moves no. State Input Stack symbols Moves
1 q0 a Z0 (q0,AZ0)
2 q0 b Z0 (q0,BZ0)
3 q0 a A (q0,AA)
4 q0 b A (q0,BA)
5 q0 a B (q0,AB)
6 q0 b B (q0,BB)
7 q0 c Z0 (q1,Z0)
8 q0 c A (q1,A)
9 q0 c B (q1,B)
10 q1 a A (q1, є)
11 q1 b B (q1, є)
12 q1 є Z0 (q1, є)

Contenu connexe

Tendances

Cs2303 theory of computation may june 2016
Cs2303 theory of computation may june 2016Cs2303 theory of computation may june 2016
Cs2303 theory of computation may june 2016appasami
 
R Programming language model test paper
R Programming language model test paperR Programming language model test paper
R Programming language model test paperLuckshay Batra
 
17432 object oriented programming
17432   object oriented programming17432   object oriented programming
17432 object oriented programmingsoni_nits
 
Lecture 03 lexical analysis
Lecture 03 lexical analysisLecture 03 lexical analysis
Lecture 03 lexical analysisIffat Anjum
 
Eee316: Logical Instructions, Jump Commands, LOOPs and Arrays in Assembly Lan...
Eee316: Logical Instructions, Jump Commands, LOOPs and Arrays in Assembly Lan...Eee316: Logical Instructions, Jump Commands, LOOPs and Arrays in Assembly Lan...
Eee316: Logical Instructions, Jump Commands, LOOPs and Arrays in Assembly Lan...Musbiha Binte Wali
 
Cs6503 theory of computation november december 2015 be cse anna university q...
Cs6503 theory of computation november december 2015  be cse anna university q...Cs6503 theory of computation november december 2015  be cse anna university q...
Cs6503 theory of computation november december 2015 be cse anna university q...appasami
 
Shape Safety in Tensor Programming is Easy for a Theorem Prover -SBTB 2021
Shape Safety in Tensor Programming is Easy for a Theorem Prover -SBTB 2021Shape Safety in Tensor Programming is Easy for a Theorem Prover -SBTB 2021
Shape Safety in Tensor Programming is Easy for a Theorem Prover -SBTB 2021Peng Cheng
 
Intermediate code generation
Intermediate code generationIntermediate code generation
Intermediate code generationRamchandraRegmi
 
Effective Algorithm for n Fibonacci Number By: Professor Lili Saghafi
Effective Algorithm for n Fibonacci Number By: Professor Lili SaghafiEffective Algorithm for n Fibonacci Number By: Professor Lili Saghafi
Effective Algorithm for n Fibonacci Number By: Professor Lili SaghafiProfessor Lili Saghafi
 
Lecture 12 Heuristic Searches
Lecture 12 Heuristic SearchesLecture 12 Heuristic Searches
Lecture 12 Heuristic SearchesHema Kashyap
 
Analysis and design of algorithms part 3
Analysis and design of algorithms part 3Analysis and design of algorithms part 3
Analysis and design of algorithms part 3Deepak John
 
Object Oriented Programming - Value Types & Reference Types
Object Oriented Programming - Value Types & Reference TypesObject Oriented Programming - Value Types & Reference Types
Object Oriented Programming - Value Types & Reference TypesDudy Ali
 
Lecture 12 intermediate code generation
Lecture 12 intermediate code generationLecture 12 intermediate code generation
Lecture 12 intermediate code generationIffat Anjum
 
Chapter 6 intermediate code generation
Chapter 6   intermediate code generationChapter 6   intermediate code generation
Chapter 6 intermediate code generationVipul Naik
 
Automata
AutomataAutomata
AutomataGaditek
 

Tendances (20)

Cs2303 theory of computation may june 2016
Cs2303 theory of computation may june 2016Cs2303 theory of computation may june 2016
Cs2303 theory of computation may june 2016
 
R Programming language model test paper
R Programming language model test paperR Programming language model test paper
R Programming language model test paper
 
17432 object oriented programming
17432   object oriented programming17432   object oriented programming
17432 object oriented programming
 
Lecture 03 lexical analysis
Lecture 03 lexical analysisLecture 03 lexical analysis
Lecture 03 lexical analysis
 
Ch8a
Ch8aCh8a
Ch8a
 
Eee316: Logical Instructions, Jump Commands, LOOPs and Arrays in Assembly Lan...
Eee316: Logical Instructions, Jump Commands, LOOPs and Arrays in Assembly Lan...Eee316: Logical Instructions, Jump Commands, LOOPs and Arrays in Assembly Lan...
Eee316: Logical Instructions, Jump Commands, LOOPs and Arrays in Assembly Lan...
 
Minimizing DFA
Minimizing DFAMinimizing DFA
Minimizing DFA
 
Intermediate code generation
Intermediate code generationIntermediate code generation
Intermediate code generation
 
Cs6503 theory of computation november december 2015 be cse anna university q...
Cs6503 theory of computation november december 2015  be cse anna university q...Cs6503 theory of computation november december 2015  be cse anna university q...
Cs6503 theory of computation november december 2015 be cse anna university q...
 
Shape Safety in Tensor Programming is Easy for a Theorem Prover -SBTB 2021
Shape Safety in Tensor Programming is Easy for a Theorem Prover -SBTB 2021Shape Safety in Tensor Programming is Easy for a Theorem Prover -SBTB 2021
Shape Safety in Tensor Programming is Easy for a Theorem Prover -SBTB 2021
 
Intermediate code generation
Intermediate code generationIntermediate code generation
Intermediate code generation
 
Effective Algorithm for n Fibonacci Number By: Professor Lili Saghafi
Effective Algorithm for n Fibonacci Number By: Professor Lili SaghafiEffective Algorithm for n Fibonacci Number By: Professor Lili Saghafi
Effective Algorithm for n Fibonacci Number By: Professor Lili Saghafi
 
Ch8b
Ch8bCh8b
Ch8b
 
Lecture 12 Heuristic Searches
Lecture 12 Heuristic SearchesLecture 12 Heuristic Searches
Lecture 12 Heuristic Searches
 
Analysis and design of algorithms part 3
Analysis and design of algorithms part 3Analysis and design of algorithms part 3
Analysis and design of algorithms part 3
 
Object Oriented Programming - Value Types & Reference Types
Object Oriented Programming - Value Types & Reference TypesObject Oriented Programming - Value Types & Reference Types
Object Oriented Programming - Value Types & Reference Types
 
Basic Block
Basic BlockBasic Block
Basic Block
 
Lecture 12 intermediate code generation
Lecture 12 intermediate code generationLecture 12 intermediate code generation
Lecture 12 intermediate code generation
 
Chapter 6 intermediate code generation
Chapter 6   intermediate code generationChapter 6   intermediate code generation
Chapter 6 intermediate code generation
 
Automata
AutomataAutomata
Automata
 

En vedette

Regular expressions
Regular expressionsRegular expressions
Regular expressionsEran Zimbler
 
Finite Automata
Finite AutomataFinite Automata
Finite AutomataShiraz316
 
Regular expression with DFA
Regular expression with DFARegular expression with DFA
Regular expression with DFAMaulik Togadiya
 
Finite State Automata
Finite State AutomataFinite State Automata
Finite State Automata孟賢 施
 
Lec 3 ---- dfa
Lec 3  ---- dfaLec 3  ---- dfa
Lec 3 ---- dfaAbdul Aziz
 
Regular language and Regular expression
Regular language and Regular expressionRegular language and Regular expression
Regular language and Regular expressionAnimesh Chaturvedi
 
Regular Expressions 101
Regular Expressions 101Regular Expressions 101
Regular Expressions 101Raj Rajandran
 
Lecture: Regular Expressions and Regular Languages
Lecture: Regular Expressions and Regular LanguagesLecture: Regular Expressions and Regular Languages
Lecture: Regular Expressions and Regular LanguagesMarina Santini
 

En vedette (13)

Lecture2 B
Lecture2 BLecture2 B
Lecture2 B
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
 
Regular expressions
Regular expressionsRegular expressions
Regular expressions
 
Finite Automata
Finite AutomataFinite Automata
Finite Automata
 
Regular expression with DFA
Regular expression with DFARegular expression with DFA
Regular expression with DFA
 
Theory of computing pdf
Theory of computing pdfTheory of computing pdf
Theory of computing pdf
 
Finite State Automata
Finite State AutomataFinite State Automata
Finite State Automata
 
Optimization of dfa
Optimization of dfaOptimization of dfa
Optimization of dfa
 
Lec 3 ---- dfa
Lec 3  ---- dfaLec 3  ---- dfa
Lec 3 ---- dfa
 
Regular language and Regular expression
Regular language and Regular expressionRegular language and Regular expression
Regular language and Regular expression
 
Regular Expressions 101
Regular Expressions 101Regular Expressions 101
Regular Expressions 101
 
Lecture: Regular Expressions and Regular Languages
Lecture: Regular Expressions and Regular LanguagesLecture: Regular Expressions and Regular Languages
Lecture: Regular Expressions and Regular Languages
 
Finite Automata
Finite AutomataFinite Automata
Finite Automata
 

Similaire à Tests

TOC Solutions-Adi.pdf
TOC Solutions-Adi.pdfTOC Solutions-Adi.pdf
TOC Solutions-Adi.pdfAdiseshaK
 
TOC_Solutions-Adi.pdf
TOC_Solutions-Adi.pdfTOC_Solutions-Adi.pdf
TOC_Solutions-Adi.pdfAdiseshaK
 
Problem set2 | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Problem set2 | Theory of Computation | Akash Anand | MTH 401A | IIT KanpurProblem set2 | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Problem set2 | Theory of Computation | Akash Anand | MTH 401A | IIT KanpurVivekananda Samiti
 
[Question Paper] Fundamentals of Digital Computing (Revised Course) [January ...
[Question Paper] Fundamentals of Digital Computing (Revised Course) [January ...[Question Paper] Fundamentals of Digital Computing (Revised Course) [January ...
[Question Paper] Fundamentals of Digital Computing (Revised Course) [January ...Mumbai B.Sc.IT Study
 
ContextFreeGrammars.pptx
ContextFreeGrammars.pptxContextFreeGrammars.pptx
ContextFreeGrammars.pptxPEzhumalai
 
ContextFreeGrammars (1).pptx
ContextFreeGrammars (1).pptxContextFreeGrammars (1).pptx
ContextFreeGrammars (1).pptxviswanath kani
 
Digital Signals and System (April – 2017) [75:25 Pattern | Question Paper]
Digital Signals and System (April  – 2017) [75:25 Pattern | Question Paper]Digital Signals and System (April  – 2017) [75:25 Pattern | Question Paper]
Digital Signals and System (April – 2017) [75:25 Pattern | Question Paper]Mumbai B.Sc.IT Study
 
Top school in noida
Top school in noidaTop school in noida
Top school in noidaEdhole.com
 
V cse cs6503 model qb1 1
V  cse cs6503  model qb1 1V  cse cs6503  model qb1 1
V cse cs6503 model qb1 1Ezhumalai p
 
Digital Signals and System (April – 2015) [Revised Syllabus | Question Paper]
Digital Signals and System (April  – 2015) [Revised Syllabus | Question Paper]Digital Signals and System (April  – 2015) [Revised Syllabus | Question Paper]
Digital Signals and System (April – 2015) [Revised Syllabus | Question Paper]Mumbai B.Sc.IT Study
 
ACM ICPC 2016 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2016 NEERC (Northeastern European Regional Contest) Problems ReviewACM ICPC 2016 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2016 NEERC (Northeastern European Regional Contest) Problems ReviewRoman Elizarov
 
[Question Paper] Logic, Discrete Mathematical Structures (Old Course) [April ...
[Question Paper] Logic, Discrete Mathematical Structures (Old Course) [April ...[Question Paper] Logic, Discrete Mathematical Structures (Old Course) [April ...
[Question Paper] Logic, Discrete Mathematical Structures (Old Course) [April ...Mumbai B.Sc.IT Study
 

Similaire à Tests (20)

TOC_Solutions-Adi.pdf
TOC_Solutions-Adi.pdfTOC_Solutions-Adi.pdf
TOC_Solutions-Adi.pdf
 
TOC Solutions-Adi.pdf
TOC Solutions-Adi.pdfTOC Solutions-Adi.pdf
TOC Solutions-Adi.pdf
 
TOC_Solutions-Adi.pdf
TOC_Solutions-Adi.pdfTOC_Solutions-Adi.pdf
TOC_Solutions-Adi.pdf
 
Problem set2 | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Problem set2 | Theory of Computation | Akash Anand | MTH 401A | IIT KanpurProblem set2 | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Problem set2 | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
 
toc_model_qp2-.pdf
toc_model_qp2-.pdftoc_model_qp2-.pdf
toc_model_qp2-.pdf
 
3rd Semester Computer Science and Engineering (ACU) Question papers
3rd Semester Computer Science and Engineering  (ACU) Question papers3rd Semester Computer Science and Engineering  (ACU) Question papers
3rd Semester Computer Science and Engineering (ACU) Question papers
 
Cs 73
Cs 73Cs 73
Cs 73
 
[Question Paper] Fundamentals of Digital Computing (Revised Course) [January ...
[Question Paper] Fundamentals of Digital Computing (Revised Course) [January ...[Question Paper] Fundamentals of Digital Computing (Revised Course) [January ...
[Question Paper] Fundamentals of Digital Computing (Revised Course) [January ...
 
algo1
algo1algo1
algo1
 
ContextFreeGrammars.pptx
ContextFreeGrammars.pptxContextFreeGrammars.pptx
ContextFreeGrammars.pptx
 
ContextFreeGrammars (1).pptx
ContextFreeGrammars (1).pptxContextFreeGrammars (1).pptx
ContextFreeGrammars (1).pptx
 
Digital Signals and System (April – 2017) [75:25 Pattern | Question Paper]
Digital Signals and System (April  – 2017) [75:25 Pattern | Question Paper]Digital Signals and System (April  – 2017) [75:25 Pattern | Question Paper]
Digital Signals and System (April – 2017) [75:25 Pattern | Question Paper]
 
Top school in noida
Top school in noidaTop school in noida
Top school in noida
 
V cse cs6503 model qb1 1
V  cse cs6503  model qb1 1V  cse cs6503  model qb1 1
V cse cs6503 model qb1 1
 
Lecture4 lexical analysis2
Lecture4 lexical analysis2Lecture4 lexical analysis2
Lecture4 lexical analysis2
 
Adobe
AdobeAdobe
Adobe
 
Digital Signals and System (April – 2015) [Revised Syllabus | Question Paper]
Digital Signals and System (April  – 2015) [Revised Syllabus | Question Paper]Digital Signals and System (April  – 2015) [Revised Syllabus | Question Paper]
Digital Signals and System (April – 2015) [Revised Syllabus | Question Paper]
 
TOC question bank.pdf
TOC question bank.pdfTOC question bank.pdf
TOC question bank.pdf
 
ACM ICPC 2016 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2016 NEERC (Northeastern European Regional Contest) Problems ReviewACM ICPC 2016 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2016 NEERC (Northeastern European Regional Contest) Problems Review
 
[Question Paper] Logic, Discrete Mathematical Structures (Old Course) [April ...
[Question Paper] Logic, Discrete Mathematical Structures (Old Course) [April ...[Question Paper] Logic, Discrete Mathematical Structures (Old Course) [April ...
[Question Paper] Logic, Discrete Mathematical Structures (Old Course) [April ...
 

Dernier

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Dernier (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

Tests

  • 1. Class:-TE Subject:- Theory of computation Branch: Comp Engg Subject Incharge: Pallavi Yevale Test No:-1 1) Draw a DFA to accept strings of 0’s, 1’s and 2’s beginning with a ‘0’ followed by odd number of 1’s and ending with ‘2’. (5) 2) Explain DFA with example and it’s disadvantages. (5) 3) Obtain DFA from given NFA (10) OR Convert the following є- NFA to its equivalent DFA. q0 q1 q2 q3 q0 q1 q2
  • 2. Class:-TE Subject:- Theory of computation Branch: Comp Engg Subject Incharge: Pallavi Yevale Test No:-2 1. Attempt any five. (5) a) Obtain a regular expression to accept the strings of 0’s and 1’s having no two consecutive 0’s. b) Obtain a regular expression to accept the strings of a’s and b’s starting with ‘a’ and ending with ‘b’. c) Obtain a regular expression to accept the strings of a’s and b’s whose second symbol from the right end is ‘a’.’ d) Obtain a regular expression to accept the strings of a’s and b’s such that 3rd symbol from the right is ‘a’ and 4th symbol the right end is ‘b’. e) Obtain a regular expression to accept the words with two or more letters but beginning and ending with same letter where ∑ = {a,b} f) Obtain a regular expression for the language L={an bm | m+n is even} g) Obtain a regular expression for the language L={an bm | m≥1,n≥ 1,nm≥ 3} 2. Following FA recognize the languages L1 and L2. Draw FA recognizing language L1- L2 (5) M1 M2
  • 3. Class:-TE Subject:- Theory of computation Branch: Comp Engg Subject Incharge: Pallavi Yevale 3. Minimize the number of states of following FA. (10) OR Find out the regular expression of following FA’s. δ a b A B A B A C C D B *D D A E D F F G E G F G H G D δ a b *1 1 2 *2 1 3 3 1 2
  • 4. Class:-TE Subject:- Theory of computation Branch: Comp Engg Subject Incharge: Pallavi Yevale Test No:-3 Solve any two Questions. 1. Obtain the grammar for the following FA. [10] a. Obtain grammar to generate string consisting of any number of a’s. b. Obtain grammar to generate string consisting of at least one a. c. Obtain grammar to generate string consisting of any number of a’s and b’s. d. Obtain grammar to generate string consisting of at least two a’s. e. Obtain grammar to generate string consisting of even number of a’s. 2. A) Is the following grammar ambiguobs? [5] S→ AB | aaB A→ a | Aa B→ b B) Eliminate the useless symbols from the following grammar. [5] S→ aA | bB A→ aA | a B→ bB D→ ab | Ea E→ ac | d
  • 5. Class:-TE Subject:- Theory of computation Branch: Comp Engg Subject Incharge: Pallavi Yevale 3. A) Eliminate all unit productions From the grammar [5] S→ AB A→ a B→ C | b C→ D D→ E | bc E→ d | Ab B) Convert the following grammar into CNF. [5] S→ 0A | B A→ 0AA | 1S | 1 B→ 1BB | 0S | 0
  • 6. Class:-TE Subject:- Theory of computation Branch: Comp Engg Subject Incharge: Pallavi Yevale Test No:-4 1. Explain a. Definition of PDA [4] b. Acceptance of PDA [2] 2. Design a DPDA for a binary number divisible by 3. [6] 3. Construct the PDA from the following CFG for the language L={ x є {a,b}*| na(x) >nb(x)} [8] S a |aS | bSS | SSb | SbS And show the sequence of moves to accept the string abbaaa. OR Write the rules for converting the PDA to CFG and obtain CFG form following PDA. [8] Moves no. State Input Stack symbols Moves 1 q0 a Z0 (q0,AZ0) 2 q0 b Z0 (q0,BZ0) 3 q0 a A (q0,AA) 4 q0 b A (q0,BA) 5 q0 a B (q0,AB) 6 q0 b B (q0,BB) 7 q0 c Z0 (q1,Z0) 8 q0 c A (q1,A) 9 q0 c B (q1,B) 10 q1 a A (q1, є) 11 q1 b B (q1, є) 12 q1 є Z0 (q1, є)