Está en la página 1de 9
bset-SUM < Knapsack a gkapsace is iP. . . Given inparP. TEs easy to see if total Setighh 16 ohne st UL and total pregitis ak leet VTE hake Untor Hing to add all sughh omel profit SoC ive} Het/Cake regutt Tus, 02 coy veriky se lubion ty polgne nu'e, Hind. + Pedece NP Complitt problem ( GrbSe— Sum) to rap Saue, KnapSacte ~ problewm . Inchanee 2 given mom mAgalioe Wight %) Wy). Wanel covrseponctiny pref yy Vp). v, iv Wsthere asub cer 3 ed hak Solel wtighe iS od most are) COrvES PE roliiy Fatal Proptis ar Lease Subse Guan problem ington: $n ronm negahve integer nubs 91952) °-S, and is Prerensubse eee value is Sapa to fe Creat a KneupSacit ~pre blew from Scheer cum probit as Jollow ; Ww; eM 2S; wevat \BSAT pivquel " + Cine Wes F¥5 ceny Hosce if each vertu in giver griph dan tontturte Fea ther wey EPs a can there Negrete Edie Tate pero Fe hg Kee SA bn, Rete ae Ie en” FT epee af eae Cayo eth a engi 3 Geer cables ee Guay a) Mame baying egimend? ede egane Given ec graph Ge(YsE) isthere 4 subsee of V cally! Pr eae veciagin V connect totlehues int vee 35¢t to tit by tosh « grag uy Jobs (forza. Vleral et Jorma Seat vache 1 censor ibs Ge bat all ayy cheap FS Coat alge tes meet teaver nb ras is Baume daage + sclye Hea wonneck dar negation (x not eomed ys ryetion (x not camect fy TY G hes a ReClqua , Fediqe mice hae aq uerters from sch dese yan no vertese oll ba mtgelion o} thacthen. ng ye ta 12 TROD Fle Safi Zh Pris covigghle, ottasr « Ural vm sat, awe 15 TAVE , choo contSpendtoy vers ) he Chava fojorms «ee Thay, hae wi f since Ge anbe eacrstec from Fn pelgremial Hime aoe ee eomalhina ralucien [ttm 354% Cat ee cera at gue 5 NE-GmpLhe Segue

Wink TEE Mel ee OT sermete i vi wad ¥ ¢! Even Cov EG (CEG) Fehon Sots es nother sord ves ¢ VIE VV are tunnead by on aye ¢ EG Hue V-V) . repre WL -WiT= © Hrs cine og die isc 4G SAT & p3SAT Clause hag 4 fer C7 = A Convertte G2 a@avbvoa ; (av Brye)a (av b velar clause has Chtrm Conga vt)a Cp = AVS Convertee Gi = (vbvcja (avb ve) clauge has Sharm sleip claver has morethony ¢ tera Ciya) RA CE OVA, VO, Vay Va, i=(GaVv a vy, da (9 Vay aa (Rvasv 327 (Sv auvyll a CS As Y Qs? “A 3) Show Hhat Red-Blace +e has n-internat roles hes heighted vest 2b (n+4) + Lath be tha heights BEI Tren Bs property yf BRT 1 Blade height (bh ) oy any level of tren 's at leaned Cif netics teal than half of heigntCh) , Thas bod Skeproreblee) aye a) : Prove, Sub-trat af nadei) has at least Phe) 4 ip height of xis 0 xis leat Crnil) thentix) have O nade eens dcouse 9° 9 Treduckiva: Consider note x has height h7 0, x has 2duilel with blace height is bhGd) or bKW=\ deptrel on ts color is rect or blacic Take minimun case sath beth of chil has bh(x) -1, Astum term (5 brug ssith is chilel (level height of x1). have nadessfeft chulel z | = 1 ras of right cll oo malt] x < rele of left chdel + node of right Chi + 4 (ibs sey) > ie bh : : mde Dt eet ede -1@) From (4) ancl (2), we have : mumbay o} ede x 2 ff 4 hb) < 2 byn4!) + By inductivin Baye cas show Pharin n- demenr heap, there are at most Wins! rodas have height ho. on Base case: h=0, there ane ot moct TOT leat roles Fh te True. Trduckie stap: Suppose ikistrue with h-1, Let My be the p ' lght h in T. Concid a T oy ei nodes at helght oe T. Th has Gormnad by remover We note “fi rockes Rae 2 T mum bay of nodes at eight h in T equedl to ru of Bee of height ht in 7! rt Tel [8] m

Zn) rman =0 E ohtey) S -ZailKiny;) med my 7 became Xo Yo > a, = ~ Fai) By med 1 Each poiray xy calide for seactly mm” vedlad o aay, 0 Hane, with m**! combincdions o Oe A). > Nene are exactly m™ callision So probaly lh cy of lledieny is a S Von Heng FL 1S univergeed oD Xi kW Cue a—eeeee——ee_s— ere Winaad iyanyés ae nad Wirt - atid ipmomaine FALSE aA SSiar? cee hizo S5iy = TEVE Sis = oe: 3 eon ort 3 Teer GE Tee. CCG ee i ty, Gat) ae Tenn) ee aig a3, = Ga,3) | 42,0 ‘

También podría gustarte