gon ngu tuang ling vdi bai toan duqc xac dinh bdi
SUBSET-SUM = {{S,t)\S =- {xụ.., x ^ } va c6 mot ho con nao
do {yu .••,yk} QS, sao cho E yi = 0- T h i du, cho {3,4,8,8,13,23,28} vk 25 la mot dQ kien bai todn. Khi do (3', 4, 8, 8,13,23,28; 25) G SUBSET-SUM, v i 4 + 8 + 13 = 25.
Hay Ivru y r^ng { x i , . . . , Xm} va { y i , . . . , yjt} dvioc xem xet 6 day la n/iỉnc/ da tap, tiic cac phan t i i cua chiing c6 t h i duoc lap lai, tham chi rat nhieu Ian. Co le bai toan nay c6 xuat x i i tH hhi toan d6i tien vdi nhflng muc dich khac nhau, trong do Xi la menh gia cua td bac va t la s6 tign can doị
D i n h ly 2.3.7
SUBSET-SUM eNP. CMng minh
o Bang each Im chon. Sau day la may Turing khong tat dinh thdi
gian da thtrc khang dinh SUBSET-SUM.
N = "Tren moi tit vao {S, t), trong do S la mot ho cac so nguyen
dtrong va t cung la mot so nguyen duong:
1. Chon trong ho 5 mot each khong tat dinh mot ho con c.
2. K i i m tra xem lieu tSng tat ca cac so cua c c6 bang t hay
khong.
3. Neu c6, t h i chap nhan; ngUdc lai, bdc bọ"
o Bhng each kiim chxtng. M6i chiing cil c la mot ho cac so nguyen
dUdng. May kigm chiJng W d&i vdi ngon ngu: SUBSET-SUM, theo
chiing cii c, dugc xay dung nhu saụ
W = "Trgn moi txl vao ((5, t),c), trong do 5 vk c la hai ho cac so
nguygn dudng, va t cung la mot so nguyen dildng:
1. Kigm tra xem lieu S c6 chiia tat ca c^c so cua c hay
khong.
2. Kigm tra xem lieu tSng tat ca cac so cua c c6 bang t hay
khong.
3. Neu ca hai viec k i i m tra dieu dung, t h i chap nhg-n; ngUdc
lai, bdc bọ"
Dinh ly duoc chiing minh.
2.3 May Turing khong tat dinh thdi gian da thUc 165