ผลต่างระหว่างรุ่นของ "Computational complexity/hw1"
ไปยังการนำทาง
ไปยังการค้นหา
Jittat (คุย | มีส่วนร่วม) (สร้างหน้าด้วย "การบ้าน 1 มี xx ข้อ 1 (1.7) Define a ''two-dimensional'' Turing machine to be a TM where each of its tapes is an infinite grid (...") |
Jittat (คุย | มีส่วนร่วม) |
||
แถว 1: | แถว 1: | ||
การบ้าน 1 มี xx ข้อ | การบ้าน 1 มี xx ข้อ | ||
− | 1 (1.7) Define a ''two-dimensional'' Turing machine to be a TM where each of its tapes is an infinite grid (and the machine can move not only <tt>L</tt>eft and <tt>R</tt>ight, but also <tt>U</tt>p and <tt>D</tt>own). Show that for every (time-constructible) <math>T:N\rightarrow N</math> and every Boolean function <math>f</math>, if <math>f</math> can be computed in time <math>T(n)</math> using a two-dimensional TM then <math>f\in DTIME(T(n)^2)</math>. | + | 1. (AB-1.7) Define a ''two-dimensional'' Turing machine to be a TM where each of its tapes is an infinite grid (and the machine can move not only <tt>L</tt>eft and <tt>R</tt>ight, but also <tt>U</tt>p and <tt>D</tt>own). Show that for every (time-constructible) <math>T:N\rightarrow N</math> and every Boolean function <math>f</math>, if <math>f</math> can be computed in time <math>T(n)</math> using a two-dimensional TM then <math>f\in DTIME(T(n)^2)</math>. |
+ | |||
+ | 2. (AB-2.17, 1st half) In the '''Exactly One 3SAT''' problem, we are given a 3CNF formula <math>\phi</math> and need to decide if there exists a satisfying assignment <math>u</math> for <math>\phi</math> such that every clause of <math>\phi</math> has exactly one True literal. Prove that '''Exactly One 3SAT''' is '''NP'''-complete. | ||
+ | |||
+ | : ''Hint:'' Replace each occurrence of a literal <math>v_i</math> in a clause <math>C</math> by a new variable <math>z_{i,C}</math> with auxiliary variables ensuring of <math>v_i</math> is TRUE, then <math>z_{i,C}</math> can be either TRUE or FALSE, but if <math>v_i</math> is FALSE, then <math>z_{i,C}</math> must be FALSE. | ||
+ | |||
+ | 3. (AB-2.23) Prove that <math>\mathbf{P}\subseteq \mathbf{NP}\cap\mathbf{coNP}</math> |
รุ่นแก้ไขเมื่อ 15:05, 17 มีนาคม 2564
การบ้าน 1 มี xx ข้อ
1. (AB-1.7) Define a two-dimensional Turing machine to be a TM where each of its tapes is an infinite grid (and the machine can move not only Left and Right, but also Up and Down). Show that for every (time-constructible) and every Boolean function , if can be computed in time using a two-dimensional TM then .
2. (AB-2.17, 1st half) In the Exactly One 3SAT problem, we are given a 3CNF formula and need to decide if there exists a satisfying assignment for such that every clause of has exactly one True literal. Prove that Exactly One 3SAT is NP-complete.
- Hint: Replace each occurrence of a literal in a clause by a new variable with auxiliary variables ensuring of is TRUE, then can be either TRUE or FALSE, but if is FALSE, then must be FALSE.
3. (AB-2.23) Prove that