Henc e dou ble sat is in n p ii dou ble sat is nphard

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: tanc e of LP AT H ” If ⟨G; a; b⟩ 2 U H AM P AT H , then G has a Hamiltonian path of length k from a to b . That is , ⟨G; a; b; k⟩ 2 LP AT H . On the other hand, if ⟨G; a; b; k⟩ 2 LP AT H , then G mus t c ontain a s imple path of length k from a to b . Howev er, s inc e G has only k nodes , the path mus t be Hamiltonian. There, ⟨G; a; b⟩ 2 U H AM P AT H : Henc e, U H AM P AT H Ôp LP AT H : Ac c ording to the abov e, LP AT H is NP­Complete. 7.21 i.) DOU BLE À SAT 2 N P On input of a Boolean formula, an NTM c ould gues s two different Boolean as s ignments nondeterminis tic ally and ac c ept if both of the as s ignments s atis fy the formula. Henc e, DOU BLE À SAT is in N P : ii.) DOU BLE À SAT is NP­hard SAT c an be reduc ed to DOU BLE À SAT by c ons truc ting a TM F that c omputes the reduc tion f as follows . F = ”On input of a Boolean formula (¶) with v ariables x1 ; x2 ; :::; xk 1. Let ¶0 = ¶ ^ (x _ x) by introduc ing a new v ariable x 2. Output (¶0) with v ariables x1 ; x2 ; :::; xk; x ” If ¶ 2 SAT , its s atis fy ing as s ignment plus x = true or x = true c an s erv e as the two s atis fy ing as s ignments of ¶0: On the other hand, if ¶0 2 DOU BLE À SAT is s atis fiable, ¶ c an be s atis fied by the as s ignment where the new v ariables x and x are remov ed. Therefore, DOU BLE À SAT is NP­hard. Ac c ording to i. and ii., DOU BLE À SAT is NP­Complete. 7.24 a.) In a c laus e of an = as s ignment, there is one literal s et true or two literals s et true. Thus , the = negation of a the c laus e will s till induc e a c laus e with one literal s et true or two literals s et true. Sinc e a negated c laus e is als o a c laus e of an = as s ignment, the negation of an = as s ignment is = = too an = as s ignment. = b.) Let ¶ be a 3c nf­formula of an ins tanc e of 3 SAT and ¶0 be a 3c nf­formula of an ins tanc e of = SAT : The reduc tion of replac ing a c laus e ci (y1 _ y2 _ y3 ) of ¶ with two c laus es = (y1 _ y2 _ zi) ^ (zi_ y3 _ b) of ¶0 c an be c omputed in poly nomial time for s ure. Nex t, we s how ¶ is s atis fiable iff ¶0 has the c orres ponding = as s ignment. = If ¶ is s atis fiable, either y1 = ture and y2 = ture , or only y3 = true . In the former c as e, s et zi fa...
View Full Document

This note was uploaded on 10/26/2013 for the course CS 22C:135 taught by Professor Zhang during the Spring '13 term at University of Iowa.

Ask a homework question - tutors are online