




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
The final examination questions for a university-level computer science course, cs 215. The questions cover topics such as regular languages, pda, turing machines, vertex cover, and p vs npspace. Students are required to answer the first six questions within a total of 60 points, and the seventh question is optional for bonus points.
Typology: Exams
1 / 8
This page cannot be seen from the preview
Don't miss anything!
Name: SSN:
This is an open book exam, but you may only consult the textbook and lecture notes during the exam. You must answer the first 6 questions with 60 points in total. The 7th question is optional. You may use any results given in class or the text book without providing a definition or proof. All constructions can be described informally.
Question Score
QUESTION 1. [10 pts] Given a language
, let
In other words,
contains all words obtained from each word in
by dividing it into two (possibly empty) pieces and exchanging these pieces. (The exchange can also be thought of as a rotation operation.)
Prove that if
is regular, so is
QUESTION 3. [10 pts] Prove that it is undecidable whether a TM loops on an infinite number of distinct input strings.
QUESTION 4. [10 pts] Prove that the following variant of Vertex Cover (VC) is NP-complete: SQRT-VC
NP-complete language is also PSPACE-complete, then NP = PSPACE.
Optional QUESTION 7. [10 bonus pts] We claimed in class that optimization problems and decision prob- lems are equivalent as far as polynomial-time solvability is concerned. Suppose that the language HAMPATH is in P. Show how to find a Hamilton path in graph
given instance