SlideShare a Scribd company logo
Department of Mathematics and Statistics, I.I.T. Kanpur
MTH401 Theory of Computation - Problem Set 3
(1) Design a Turing machine for each language listed below. Note that you may choose
not to provide official details (e.g., the transition diagram, etc.) of your machine
but in that case you must clearly explain what constitutes your machine (e.g.,
alphabet/symbols, tapes/tracks, etc) along with how your machine works (e.g., a
step by step description of the working of your Turing machine).
(a) {0n
1n2
: n > 0}.
(b) The language of odd integers written in binary.
(c) {a#b#c : a, b, c ∈ {0, 1}+
and val(a) + val(b) = val(c)}. (Note that val(α) is
defined to be the non-negative integer that has binary representation α)
(2) For each of the language below, indicate the smallest complexity class that contains
it (e.g., Regular, Deterministic Context Free, Context Free, Recursive, Recursively
Enumerable, Not Recursively Enumerable). You should provide sufficient justifica-
tions for your judgments.
(a) {1n
0m
1m
0n
: n, m > 0}.
(b) The language L of all strings α over {a, b, c} such that α contain an equal
number of occurrences of a’s, b’s and c’s.
(c) The complement of the language L in part (b).
(d) {0m
: m = 2k + 1 where k > 0}.
(e) {0m
10m!
: m > 0}.
(3) Prove that the problem of determining if the languages generated by two CFG’s
are equal is undecidable.
(4) For each of the following languages, state whether the language is or is not re-
cursively enumerable and whether the complement of the language is or is not
recursively enumerable. Justify for your answers.
(a) {M : M is a Turing machine with L(M) = ∅}.
(b) {M : M is a Turing machine with L(M) = Σ∗
}.
(c) {M : M is a Turing machine where L(M) is a regular set}.
(d) {M : M is a finite state machine with L(M) = Σ∗
}.
(e) {G : G is an ambiguous context free grammar }.
1
2
(5) Prove that the Post Correspondence Problem is decidable for strings over the al-
phabet {0}.
(6) The Japanese game go-moku is played by two players, “X” and “O”, on a 19 × 19
grid. Players take turns placing markers, and the first player to achieve 5 of his
markers consecutively in a row, column, or diagonal, is the winner. Consider this
game generalized to an n by n board. Let
GM = {P : P is a position in generalized go-moku
where player “X” has a winning strategy}.
A position means a board with markers on it , such as ones that may occur in the
middle of a play of the game. Show that GM is in PSPACE.
(7) (a) A literal is either a variable or the negation of a variable.
(b) A clause is an OR of literals.
(c) A Boolean formula is in Conjunctive Normal Form (CNF) if it the AND
of clauses.
(d) The problem CSAT refers to the yes/no question “Is a Boolean formula in
CNF satisfiable?”
Show that CSAT is NP-Complete.
Hint : One can easily modify the proof of Cook’s theorem to product a Boolean
expression in CNF.
(8) If a Boolean expression is in CNF and every clause consists of exactly k literals, we
say that the Boolean formula is in k-CNF and its satisfiability question an instance
of k-SAT.
(a) Prove that 2-SAT is in P.
(b) Show that 3-SAT is NP-complete.
(9) Consider the following solitaire game. You are given an m × m board where each
one of the m2
positions may be empty or occupied by either a red stone or a blue
stone. Initially, some configuration of stones is placed on the board. Then, for each
column you must remove either all of the red stones in that column or all of the blue
stones in that column. (If a column already has only red stones or only blue stones
in it then you do not have to remove any further stones from that column.) The
objective is to leave at least one stone in each row. Finding a solution that achieves
this objective may or may not be possible depending upon the initial configuration.
3
Let
SOLITAIRE = {G : G is a game configuration with a solution}.
Prove that SOLITAIRE is NP-complete.
Hint : Show that 3-SAT ≤P SOLITAIRE.

More Related Content

What's hot

Cs2303 theory of computation november december 2015
Cs2303 theory of computation november december 2015Cs2303 theory of computation november december 2015
Cs2303 theory of computation november december 2015
appasami
 
Cs6660 compiler design may june 2017 answer key
Cs6660 compiler design may june 2017  answer keyCs6660 compiler design may june 2017  answer key
Cs6660 compiler design may june 2017 answer key
appasami
 
10_rnn.pdf
10_rnn.pdf10_rnn.pdf
15_representation.pdf
15_representation.pdf15_representation.pdf
15_representation.pdf
KSChidanandKumarJSSS
 
14_autoencoders.pdf
14_autoencoders.pdf14_autoencoders.pdf
14_autoencoders.pdf
KSChidanandKumarJSSS
 
Bron Kerbosch Algorithm - Presentation by Jun Zhai, Tianhang Qiang and Yizhen...
Bron Kerbosch Algorithm - Presentation by Jun Zhai, Tianhang Qiang and Yizhen...Bron Kerbosch Algorithm - Presentation by Jun Zhai, Tianhang Qiang and Yizhen...
Bron Kerbosch Algorithm - Presentation by Jun Zhai, Tianhang Qiang and Yizhen...
Amrinder Arora
 
ACM ICPC 2014 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2014 NEERC (Northeastern European Regional Contest) Problems ReviewACM ICPC 2014 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2014 NEERC (Northeastern European Regional Contest) Problems Review
Roman Elizarov
 
11 - 03 Feb - From Recursion to Dynamic Programming
11 - 03 Feb - From Recursion to Dynamic Programming11 - 03 Feb - From Recursion to Dynamic Programming
11 - 03 Feb - From Recursion to Dynamic Programming
Neeldhara Misra
 
[15.02.05] 타일 채우기 4
[15.02.05] 타일 채우기 4[15.02.05] 타일 채우기 4
[15.02.05] 타일 채우기 4
Hyeonmin Park
 
Dsp
DspDsp
Entropy-Driven Evolutionary Approaches to the Mastermind Problem
Entropy-Driven Evolutionary Approaches to the Mastermind ProblemEntropy-Driven Evolutionary Approaches to the Mastermind Problem
Entropy-Driven Evolutionary Approaches to the Mastermind Problem
Juan J. Merelo
 
Directed Acyclic Graph
Directed Acyclic Graph Directed Acyclic Graph
Directed Acyclic Graph
AJAL A J
 
A Graph-based Cross-lingual Projection Approach for Spoken Language Understan...
A Graph-based Cross-lingual Projection Approach for Spoken Language Understan...A Graph-based Cross-lingual Projection Approach for Spoken Language Understan...
A Graph-based Cross-lingual Projection Approach for Spoken Language Understan...Seokhwan Kim
 
Cs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer keyCs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer key
appasami
 
Theory of Automata and formal languages Unit 5
Theory of Automata and formal languages Unit 5Theory of Automata and formal languages Unit 5
Theory of Automata and formal languages Unit 5
Abhimanyu Mishra
 
ACM ICPC 2012 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2012 NEERC (Northeastern European Regional Contest) Problems ReviewACM ICPC 2012 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2012 NEERC (Northeastern European Regional Contest) Problems ReviewRoman Elizarov
 

What's hot (20)

Cs2303 theory of computation november december 2015
Cs2303 theory of computation november december 2015Cs2303 theory of computation november december 2015
Cs2303 theory of computation november december 2015
 
Cs6660 compiler design may june 2017 answer key
Cs6660 compiler design may june 2017  answer keyCs6660 compiler design may june 2017  answer key
Cs6660 compiler design may june 2017 answer key
 
algo1
algo1algo1
algo1
 
10_rnn.pdf
10_rnn.pdf10_rnn.pdf
10_rnn.pdf
 
15_representation.pdf
15_representation.pdf15_representation.pdf
15_representation.pdf
 
14_autoencoders.pdf
14_autoencoders.pdf14_autoencoders.pdf
14_autoencoders.pdf
 
Bron Kerbosch Algorithm - Presentation by Jun Zhai, Tianhang Qiang and Yizhen...
Bron Kerbosch Algorithm - Presentation by Jun Zhai, Tianhang Qiang and Yizhen...Bron Kerbosch Algorithm - Presentation by Jun Zhai, Tianhang Qiang and Yizhen...
Bron Kerbosch Algorithm - Presentation by Jun Zhai, Tianhang Qiang and Yizhen...
 
ACM ICPC 2014 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2014 NEERC (Northeastern European Regional Contest) Problems ReviewACM ICPC 2014 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2014 NEERC (Northeastern European Regional Contest) Problems Review
 
11 - 03 Feb - From Recursion to Dynamic Programming
11 - 03 Feb - From Recursion to Dynamic Programming11 - 03 Feb - From Recursion to Dynamic Programming
11 - 03 Feb - From Recursion to Dynamic Programming
 
[15.02.05] 타일 채우기 4
[15.02.05] 타일 채우기 4[15.02.05] 타일 채우기 4
[15.02.05] 타일 채우기 4
 
Ca notes
Ca notesCa notes
Ca notes
 
Cs 64
Cs 64Cs 64
Cs 64
 
Dsp
DspDsp
Dsp
 
Entropy-Driven Evolutionary Approaches to the Mastermind Problem
Entropy-Driven Evolutionary Approaches to the Mastermind ProblemEntropy-Driven Evolutionary Approaches to the Mastermind Problem
Entropy-Driven Evolutionary Approaches to the Mastermind Problem
 
Directed Acyclic Graph
Directed Acyclic Graph Directed Acyclic Graph
Directed Acyclic Graph
 
A Graph-based Cross-lingual Projection Approach for Spoken Language Understan...
A Graph-based Cross-lingual Projection Approach for Spoken Language Understan...A Graph-based Cross-lingual Projection Approach for Spoken Language Understan...
A Graph-based Cross-lingual Projection Approach for Spoken Language Understan...
 
Math HW/SW
Math HW/SWMath HW/SW
Math HW/SW
 
Cs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer keyCs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer key
 
Theory of Automata and formal languages Unit 5
Theory of Automata and formal languages Unit 5Theory of Automata and formal languages Unit 5
Theory of Automata and formal languages Unit 5
 
ACM ICPC 2012 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2012 NEERC (Northeastern European Regional Contest) Problems ReviewACM ICPC 2012 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2012 NEERC (Northeastern European Regional Contest) Problems Review
 

Viewers also liked

Theory of Computation Lecture Notes
Theory of Computation Lecture NotesTheory of Computation Lecture Notes
Theory of Computation Lecture Notes
FellowBuddy.com
 
Automata languages and computation
Automata languages and computationAutomata languages and computation
Automata languages and computationKarthik Velou
 
Modelo de planeamiento
Modelo de planeamientoModelo de planeamiento
Modelo de planeamiento
luz27A
 
Arishka M Curriculum Vitae final
Arishka M  Curriculum Vitae finalArishka M  Curriculum Vitae final
Arishka M Curriculum Vitae finalArishka Maharaj
 
Relatorio microdureza
Relatorio microdurezaRelatorio microdureza
Relatorio microdureza
mauricios90
 
JackGooch_Workbook
JackGooch_WorkbookJackGooch_Workbook
JackGooch_WorkbookJack Gooch
 
Trabajo final power point
Trabajo final power pointTrabajo final power point
Trabajo final power point
CAZADORAS
 
Achievers Destination Academy Partner Orientation Slide
Achievers Destination Academy Partner Orientation SlideAchievers Destination Academy Partner Orientation Slide
Achievers Destination Academy Partner Orientation Slide
ACHIEVERS DESTINATION ACADEMY
 
Hipótesis variables población y muestra licenciatura
Hipótesis  variables  población y muestra licenciaturaHipótesis  variables  población y muestra licenciatura
Hipótesis variables población y muestra licenciatura
Nieves Profe De Tecnicas De La Investigacion
 
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
Vivekananda Samiti
 
Présentation profil de liens
Présentation profil de liensPrésentation profil de liens
Présentation profil de liens
Gabriel Curtet
 

Viewers also liked (14)

Theory of Computation Lecture Notes
Theory of Computation Lecture NotesTheory of Computation Lecture Notes
Theory of Computation Lecture Notes
 
Automata languages and computation
Automata languages and computationAutomata languages and computation
Automata languages and computation
 
Fafl notes [2010] (sjbit)
Fafl notes [2010] (sjbit)Fafl notes [2010] (sjbit)
Fafl notes [2010] (sjbit)
 
Modelo de planeamiento
Modelo de planeamientoModelo de planeamiento
Modelo de planeamiento
 
sachi
sachisachi
sachi
 
Arishka M Curriculum Vitae final
Arishka M  Curriculum Vitae finalArishka M  Curriculum Vitae final
Arishka M Curriculum Vitae final
 
Relatorio microdureza
Relatorio microdurezaRelatorio microdureza
Relatorio microdureza
 
saadcv11
saadcv11saadcv11
saadcv11
 
JackGooch_Workbook
JackGooch_WorkbookJackGooch_Workbook
JackGooch_Workbook
 
Trabajo final power point
Trabajo final power pointTrabajo final power point
Trabajo final power point
 
Achievers Destination Academy Partner Orientation Slide
Achievers Destination Academy Partner Orientation SlideAchievers Destination Academy Partner Orientation Slide
Achievers Destination Academy Partner Orientation Slide
 
Hipótesis variables población y muestra licenciatura
Hipótesis  variables  población y muestra licenciaturaHipótesis  variables  población y muestra licenciatura
Hipótesis variables población y muestra licenciatura
 
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
 
Présentation profil de liens
Présentation profil de liensPrésentation profil de liens
Présentation profil de liens
 

Similar to Problem set3 | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur

Algorithm Homework Help
Algorithm Homework HelpAlgorithm Homework Help
Algorithm Homework Help
Programming Homework Help
 
Turing machines
Turing machinesTuring machines
Turing machines
surekamurali
 
KARNAUGH MAP(K-MAP)
KARNAUGH MAP(K-MAP)KARNAUGH MAP(K-MAP)
KARNAUGH MAP(K-MAP)
mihir jain
 
Computability - Tractable, Intractable and Non-computable Function
Computability - Tractable, Intractable and Non-computable FunctionComputability - Tractable, Intractable and Non-computable Function
Computability - Tractable, Intractable and Non-computable Function
Reggie Niccolo Santos
 
TOC_Solutions-Adi.pdf
TOC_Solutions-Adi.pdfTOC_Solutions-Adi.pdf
TOC_Solutions-Adi.pdf
Prof. Dr. K. Adisesha
 
TOC Solutions-Adi.pdf
TOC Solutions-Adi.pdfTOC Solutions-Adi.pdf
TOC Solutions-Adi.pdf
AdiseshaK
 
TOC_Solutions-Adi.pdf
TOC_Solutions-Adi.pdfTOC_Solutions-Adi.pdf
TOC_Solutions-Adi.pdf
AdiseshaK
 
Gate Computer Science Solved Paper 2007
Gate Computer Science Solved Paper 2007 Gate Computer Science Solved Paper 2007
Gate Computer Science Solved Paper 2007
Rohit Garg
 
Boolean Algebra
Boolean AlgebraBoolean Algebra
Boolean Algebra
SwathiSundari
 
Nbhm m. a. and m.sc. scholarship test 2012 with answer key
Nbhm m. a. and m.sc. scholarship test 2012 with answer keyNbhm m. a. and m.sc. scholarship test 2012 with answer key
Nbhm m. a. and m.sc. scholarship test 2012 with answer key
MD Kutubuddin Sardar
 
Algorithms Exam Help
Algorithms Exam HelpAlgorithms Exam Help
Algorithms Exam Help
Programming Exam Help
 
A Quest for Subexponential Time Parameterized Algorithms for Planar-k-Path: F...
A Quest for Subexponential Time Parameterized Algorithms for Planar-k-Path: F...A Quest for Subexponential Time Parameterized Algorithms for Planar-k-Path: F...
A Quest for Subexponential Time Parameterized Algorithms for Planar-k-Path: F...
cseiitgn
 
Answers withexplanations
Answers withexplanationsAnswers withexplanations
Answers withexplanations
Gopi Saiteja
 
Algorithm Assignment Help
Algorithm Assignment HelpAlgorithm Assignment Help
Algorithm Assignment Help
Programming Homework Help
 
NP completeness
NP completenessNP completeness
NP completeness
Amrinder Arora
 
V cse cs6503 model qb1 1
V  cse cs6503  model qb1 1V  cse cs6503  model qb1 1
V cse cs6503 model qb1 1
Ezhumalai p
 

Similar to Problem set3 | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur (20)

Algorithm Homework Help
Algorithm Homework HelpAlgorithm Homework Help
Algorithm Homework Help
 
Turing machines
Turing machinesTuring machines
Turing machines
 
KARNAUGH MAP(K-MAP)
KARNAUGH MAP(K-MAP)KARNAUGH MAP(K-MAP)
KARNAUGH MAP(K-MAP)
 
Daa q.paper
Daa q.paperDaa q.paper
Daa q.paper
 
Computability - Tractable, Intractable and Non-computable Function
Computability - Tractable, Intractable and Non-computable FunctionComputability - Tractable, Intractable and Non-computable Function
Computability - Tractable, Intractable and Non-computable Function
 
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
 
Gate Computer Science Solved Paper 2007
Gate Computer Science Solved Paper 2007 Gate Computer Science Solved Paper 2007
Gate Computer Science Solved Paper 2007
 
Boolean Algebra
Boolean AlgebraBoolean Algebra
Boolean Algebra
 
Nbhm m. a. and m.sc. scholarship test 2012 with answer key
Nbhm m. a. and m.sc. scholarship test 2012 with answer keyNbhm m. a. and m.sc. scholarship test 2012 with answer key
Nbhm m. a. and m.sc. scholarship test 2012 with answer key
 
Algorithms Exam Help
Algorithms Exam HelpAlgorithms Exam Help
Algorithms Exam Help
 
Mit6 006 f11_quiz1
Mit6 006 f11_quiz1Mit6 006 f11_quiz1
Mit6 006 f11_quiz1
 
A Quest for Subexponential Time Parameterized Algorithms for Planar-k-Path: F...
A Quest for Subexponential Time Parameterized Algorithms for Planar-k-Path: F...A Quest for Subexponential Time Parameterized Algorithms for Planar-k-Path: F...
A Quest for Subexponential Time Parameterized Algorithms for Planar-k-Path: F...
 
Answers withexplanations
Answers withexplanationsAnswers withexplanations
Answers withexplanations
 
Algorithm Assignment Help
Algorithm Assignment HelpAlgorithm Assignment Help
Algorithm Assignment Help
 
NP completeness
NP completenessNP completeness
NP completeness
 
Np cooks theorem
Np cooks theoremNp cooks theorem
Np cooks theorem
 
V cse cs6503 model qb1 1
V  cse cs6503  model qb1 1V  cse cs6503  model qb1 1
V cse cs6503 model qb1 1
 
Unit 3
Unit 3Unit 3
Unit 3
 

More from Vivekananda Samiti

End semester examination | MTH 653A, IITK Integral Equation
End semester examination | MTH 653A, IITK Integral Equation End semester examination | MTH 653A, IITK Integral Equation
End semester examination | MTH 653A, IITK Integral Equation
Vivekananda Samiti
 
Mth 653 a end sem paper | Integral Equation
Mth 653 a end sem paper | Integral Equation Mth 653 a end sem paper | Integral Equation
Mth 653 a end sem paper | Integral Equation
Vivekananda Samiti
 
Regression project report | Regression analysis | MTH 426 IITK
Regression project report | Regression analysis | MTH 426 IITK Regression project report | Regression analysis | MTH 426 IITK
Regression project report | Regression analysis | MTH 426 IITK
Vivekananda Samiti
 
Project co prediction Regression analysis | MTH 426 IITK
Project co prediction Regression analysis | MTH 426 IITK Project co prediction Regression analysis | MTH 426 IITK
Project co prediction Regression analysis | MTH 426 IITK
Vivekananda Samiti
 
Mth426 group13 final_report
Mth426 group13 final_reportMth426 group13 final_report
Mth426 group13 final_report
Vivekananda Samiti
 
Indian eduaction system group 13 | MTH 423A IITK
Indian eduaction system group 13 | MTH 423A IITKIndian eduaction system group 13 | MTH 423A IITK
Indian eduaction system group 13 | MTH 423A IITK
Vivekananda Samiti
 
Final presentation | MTH426A IITK
Final presentation | MTH426A IITKFinal presentation | MTH426A IITK
Final presentation | MTH426A IITK
Vivekananda Samiti
 
Mth 416A, Regression Analysis - 2016 midsem, endsem and quizes
Mth 416A, Regression Analysis - 2016   midsem, endsem and quizesMth 416A, Regression Analysis - 2016   midsem, endsem and quizes
Mth 416A, Regression Analysis - 2016 midsem, endsem and quizes
Vivekananda Samiti
 
Mth 416A end sem paper 2017, IITK
Mth 416A end sem paper 2017, IITK Mth 416A end sem paper 2017, IITK
Mth 416A end sem paper 2017, IITK
Vivekananda Samiti
 
Mth 401 IITK theory of computation 2016
Mth 401 IITK theory of computation 2016Mth 401 IITK theory of computation 2016
Mth 401 IITK theory of computation 2016
Vivekananda Samiti
 
Mth 412 IITK end sem paper 2016
Mth 412 IITK end sem paper 2016Mth 412 IITK end sem paper 2016
Mth 412 IITK end sem paper 2016
Vivekananda Samiti
 
Phy 301 a end sem paper | Energy, IIT Kanpur
Phy 301 a end sem paper | Energy, IIT KanpurPhy 301 a end sem paper | Energy, IIT Kanpur
Phy 301 a end sem paper | Energy, IIT Kanpur
Vivekananda Samiti
 
Phy 301 a Presentation
Phy 301 a Presentation Phy 301 a Presentation
Phy 301 a Presentation
Vivekananda Samiti
 
Phy 301 a | Project Report
Phy 301 a | Project ReportPhy 301 a | Project Report
Phy 301 a | Project Report
Vivekananda Samiti
 
End semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
End semexam | Theory of Computation | Akash Anand | MTH 401A | IIT KanpurEnd semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
End semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Vivekananda Samiti
 
Mth 523 end sem paper
Mth 523 end sem paper Mth 523 end sem paper
Mth 523 end sem paper
Vivekananda Samiti
 
Fluidendsem | Mth 523 Fluid Dynamics | B V Rathish Kumar | IIT Kanpur
Fluidendsem | Mth 523 Fluid Dynamics | B V Rathish Kumar | IIT KanpurFluidendsem | Mth 523 Fluid Dynamics | B V Rathish Kumar | IIT Kanpur
Fluidendsem | Mth 523 Fluid Dynamics | B V Rathish Kumar | IIT Kanpur
Vivekananda Samiti
 
Quiz3 | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Quiz3 | Theory of Computation | Akash Anand | MTH 401A | IIT KanpurQuiz3 | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Quiz3 | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Vivekananda Samiti
 
Mid semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Mid semexam | Theory of Computation | Akash Anand | MTH 401A | IIT KanpurMid semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Mid semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Vivekananda Samiti
 
Quiz2 | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Quiz2 | Theory of Computation | Akash Anand | MTH 401A | IIT KanpurQuiz2 | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Quiz2 | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Vivekananda Samiti
 

More from Vivekananda Samiti (20)

End semester examination | MTH 653A, IITK Integral Equation
End semester examination | MTH 653A, IITK Integral Equation End semester examination | MTH 653A, IITK Integral Equation
End semester examination | MTH 653A, IITK Integral Equation
 
Mth 653 a end sem paper | Integral Equation
Mth 653 a end sem paper | Integral Equation Mth 653 a end sem paper | Integral Equation
Mth 653 a end sem paper | Integral Equation
 
Regression project report | Regression analysis | MTH 426 IITK
Regression project report | Regression analysis | MTH 426 IITK Regression project report | Regression analysis | MTH 426 IITK
Regression project report | Regression analysis | MTH 426 IITK
 
Project co prediction Regression analysis | MTH 426 IITK
Project co prediction Regression analysis | MTH 426 IITK Project co prediction Regression analysis | MTH 426 IITK
Project co prediction Regression analysis | MTH 426 IITK
 
Mth426 group13 final_report
Mth426 group13 final_reportMth426 group13 final_report
Mth426 group13 final_report
 
Indian eduaction system group 13 | MTH 423A IITK
Indian eduaction system group 13 | MTH 423A IITKIndian eduaction system group 13 | MTH 423A IITK
Indian eduaction system group 13 | MTH 423A IITK
 
Final presentation | MTH426A IITK
Final presentation | MTH426A IITKFinal presentation | MTH426A IITK
Final presentation | MTH426A IITK
 
Mth 416A, Regression Analysis - 2016 midsem, endsem and quizes
Mth 416A, Regression Analysis - 2016   midsem, endsem and quizesMth 416A, Regression Analysis - 2016   midsem, endsem and quizes
Mth 416A, Regression Analysis - 2016 midsem, endsem and quizes
 
Mth 416A end sem paper 2017, IITK
Mth 416A end sem paper 2017, IITK Mth 416A end sem paper 2017, IITK
Mth 416A end sem paper 2017, IITK
 
Mth 401 IITK theory of computation 2016
Mth 401 IITK theory of computation 2016Mth 401 IITK theory of computation 2016
Mth 401 IITK theory of computation 2016
 
Mth 412 IITK end sem paper 2016
Mth 412 IITK end sem paper 2016Mth 412 IITK end sem paper 2016
Mth 412 IITK end sem paper 2016
 
Phy 301 a end sem paper | Energy, IIT Kanpur
Phy 301 a end sem paper | Energy, IIT KanpurPhy 301 a end sem paper | Energy, IIT Kanpur
Phy 301 a end sem paper | Energy, IIT Kanpur
 
Phy 301 a Presentation
Phy 301 a Presentation Phy 301 a Presentation
Phy 301 a Presentation
 
Phy 301 a | Project Report
Phy 301 a | Project ReportPhy 301 a | Project Report
Phy 301 a | Project Report
 
End semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
End semexam | Theory of Computation | Akash Anand | MTH 401A | IIT KanpurEnd semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
End semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
 
Mth 523 end sem paper
Mth 523 end sem paper Mth 523 end sem paper
Mth 523 end sem paper
 
Fluidendsem | Mth 523 Fluid Dynamics | B V Rathish Kumar | IIT Kanpur
Fluidendsem | Mth 523 Fluid Dynamics | B V Rathish Kumar | IIT KanpurFluidendsem | Mth 523 Fluid Dynamics | B V Rathish Kumar | IIT Kanpur
Fluidendsem | Mth 523 Fluid Dynamics | B V Rathish Kumar | IIT Kanpur
 
Quiz3 | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Quiz3 | Theory of Computation | Akash Anand | MTH 401A | IIT KanpurQuiz3 | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Quiz3 | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
 
Mid semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Mid semexam | Theory of Computation | Akash Anand | MTH 401A | IIT KanpurMid semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Mid semexam | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
 
Quiz2 | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Quiz2 | Theory of Computation | Akash Anand | MTH 401A | IIT KanpurQuiz2 | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
Quiz2 | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur
 

Recently uploaded

H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
ssuser9bd3ba
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
ShahidSultan24
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
abh.arya
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
PrashantGoswami42
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 

Recently uploaded (20)

H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 

Problem set3 | Theory of Computation | Akash Anand | MTH 401A | IIT Kanpur

  • 1. Department of Mathematics and Statistics, I.I.T. Kanpur MTH401 Theory of Computation - Problem Set 3 (1) Design a Turing machine for each language listed below. Note that you may choose not to provide official details (e.g., the transition diagram, etc.) of your machine but in that case you must clearly explain what constitutes your machine (e.g., alphabet/symbols, tapes/tracks, etc) along with how your machine works (e.g., a step by step description of the working of your Turing machine). (a) {0n 1n2 : n > 0}. (b) The language of odd integers written in binary. (c) {a#b#c : a, b, c ∈ {0, 1}+ and val(a) + val(b) = val(c)}. (Note that val(α) is defined to be the non-negative integer that has binary representation α) (2) For each of the language below, indicate the smallest complexity class that contains it (e.g., Regular, Deterministic Context Free, Context Free, Recursive, Recursively Enumerable, Not Recursively Enumerable). You should provide sufficient justifica- tions for your judgments. (a) {1n 0m 1m 0n : n, m > 0}. (b) The language L of all strings α over {a, b, c} such that α contain an equal number of occurrences of a’s, b’s and c’s. (c) The complement of the language L in part (b). (d) {0m : m = 2k + 1 where k > 0}. (e) {0m 10m! : m > 0}. (3) Prove that the problem of determining if the languages generated by two CFG’s are equal is undecidable. (4) For each of the following languages, state whether the language is or is not re- cursively enumerable and whether the complement of the language is or is not recursively enumerable. Justify for your answers. (a) {M : M is a Turing machine with L(M) = ∅}. (b) {M : M is a Turing machine with L(M) = Σ∗ }. (c) {M : M is a Turing machine where L(M) is a regular set}. (d) {M : M is a finite state machine with L(M) = Σ∗ }. (e) {G : G is an ambiguous context free grammar }. 1
  • 2. 2 (5) Prove that the Post Correspondence Problem is decidable for strings over the al- phabet {0}. (6) The Japanese game go-moku is played by two players, “X” and “O”, on a 19 × 19 grid. Players take turns placing markers, and the first player to achieve 5 of his markers consecutively in a row, column, or diagonal, is the winner. Consider this game generalized to an n by n board. Let GM = {P : P is a position in generalized go-moku where player “X” has a winning strategy}. A position means a board with markers on it , such as ones that may occur in the middle of a play of the game. Show that GM is in PSPACE. (7) (a) A literal is either a variable or the negation of a variable. (b) A clause is an OR of literals. (c) A Boolean formula is in Conjunctive Normal Form (CNF) if it the AND of clauses. (d) The problem CSAT refers to the yes/no question “Is a Boolean formula in CNF satisfiable?” Show that CSAT is NP-Complete. Hint : One can easily modify the proof of Cook’s theorem to product a Boolean expression in CNF. (8) If a Boolean expression is in CNF and every clause consists of exactly k literals, we say that the Boolean formula is in k-CNF and its satisfiability question an instance of k-SAT. (a) Prove that 2-SAT is in P. (b) Show that 3-SAT is NP-complete. (9) Consider the following solitaire game. You are given an m × m board where each one of the m2 positions may be empty or occupied by either a red stone or a blue stone. Initially, some configuration of stones is placed on the board. Then, for each column you must remove either all of the red stones in that column or all of the blue stones in that column. (If a column already has only red stones or only blue stones in it then you do not have to remove any further stones from that column.) The objective is to leave at least one stone in each row. Finding a solution that achieves this objective may or may not be possible depending upon the initial configuration.
  • 3. 3 Let SOLITAIRE = {G : G is a game configuration with a solution}. Prove that SOLITAIRE is NP-complete. Hint : Show that 3-SAT ≤P SOLITAIRE.