Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Final Exam Questions in Computer Science - Prof. Hantao Zhang, Exams of Computer Science

The questions for a final exam in computer science, covering topics such as decidability of languages, set splitting, sorting and computing averages, and probabilistic polynomial time. Students are expected to solve problems related to these topics, some of which involve providing algorithms or proving formal results.

Typology: Exams

Pre 2010

Uploaded on 09/17/2009

koofers-user-g7t-1
koofers-user-g7t-1 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
22C:131 Final Exam
Close books and notes, except three sheets of notes
Total points = 100
1. (30) Decide if the following language L1is decidable. If yes, provide an algorithm to solve
the problem; if not, prove it formally (you may assume any undecidable language discussed
in the class).
L1={hM, si | Mis a TM, sis a state to be used by M}
2. (30) Let SET-SPLITTING ={hS, Ci | Sis a finite set and C={C1, ..., Ck}is a collection
of subsets of S, for some k > 0, such that elements of Scan be colored red or blue so that
no Cihas all its elements colored with the same color.}Show that (a) SET-SPLITTING
is in NP; (b) 3SAT PSET-SPLITTING.
3. (20) Given a set X={x1, x2, ..., xn}of nreal numbers, we have two computation jobs to
perform on X:
(a) sort X;
(b) compute P1i,jnxixj/n2.
Show that there exists a function f(n) such that one job is in TIME(f(n)) but the other
job is not in TIME(f(n)).
4. (20) Let Mbe a probabilistic polynomial time turing machine and let Cbe a language
where, for some fixed 0 < 1< 2<1,
(a) w6∈ Cimplies Pr[Maccepts w]1, and
(b) wCimplies Pr[Maccepts w]2.
Show that CBPP.
1

Partial preview of the text

Download Final Exam Questions in Computer Science - Prof. Hantao Zhang and more Exams Computer Science in PDF only on Docsity!

22C:131 Final Exam Close books and notes, except three sheets of notes Total points = 100

  1. (30) Decide if the following language L 1 is decidable. If yes, provide an algorithm to solve the problem; if not, prove it formally (you may assume any undecidable language discussed in the class).

L 1 = {〈M, s〉 | M is a TM, s is a state to be used by M }

  1. (30) Let SET-SPLITTING = {〈S, C〉 | S is a finite set and C = {C 1 , ..., Ck} is a collection of subsets of S, for some k > 0, such that elements of S can be colored red or blue so that no Ci has all its elements colored with the same color.} Show that (a) SET-SPLITTING is in NP; (b) 3SAT ≤P SET-SPLITTING.
  2. (20) Given a set X = {x 1 , x 2 , ..., xn} of n real numbers, we have two computation jobs to perform on X:

(a) sort X; (b) compute

∑ 1 ≤i,j≤n

√x ixj /n^2.

Show that there exists a function f (n) such that one job is in TIME(f (n)) but the other job is not in TIME(f (n)).

  1. (20) Let M be a probabilistic polynomial time turing machine and let C be a language where, for some fixed 0 <  1 <  2 < 1,

(a) w 6 ∈ C implies Pr[M accepts w] ≤  1 , and (b) w ∈ C implies Pr[M accepts w] ≥  2.

Show that C ∈ BPP.