
upasamuchchay raashi samasya

upasamuchchay summ samasya (aiss. aiss. pee.) computer vigyaan mein ack nirnay samasya haye. isake sabse samanya sutrikaran mein, purnankon kaa ack bahu-samooh sootra aur ack lakshya-raashi sootra haye, aur sawal yeh taya karna haye kii kyaa purnankon kaa koee upasamuchchay sateek roop seey sootra _ 2 "kaa yog kartaa haye."samasya aine. pee.-haard key roop mein jaani jaati haye. isake alawa, isake kuchh pratibandhit roop bhee aine. pee.-poorna hain, udaaharan key liyeh
aiss. aiss. pee. koo ack anukoolan samasya key roop mein bhee maanaa jaa sakata haih ack upasamuchchay khojen jiska yog adhikatam "tii" haye, aur isake adheen, "tii" key jitna sambhav hoe utanaa karib. yeh aine. pee.-haard haye, lekin kaee algorithm hain joe ise vyavhaar mein uchit roop seey jaldi hull curr sakate hain.
aiss. aiss. pee. napsack samasya aur kaee upasamuchchay summ samasya kaa ack vishesh mamla haye.
computational kathorta.
aiss. aiss. pee. kii runn-time jatilata dou maapdandon parr nirbhar karati haih 
jaise-jaise "aine" aur "ell" donon badey hotey hain, aiss. aiss. pee. aine. pee.-haard hotaa haye. sabse prasiddh algorithm kii jatilata dou maapdandon "aine" aur "ell" mein seey chhote mein ghaatiya haye. samasya taba bhee aine. pee.-haard hoti haye jaba sabhi input purnank sakaratmak hotey hain (aur lakshya-raashi "tii" input kaa ack hissa hotaa haye). yeh 3sat seey pratyaksh kamee seey saabit kiya jaa sakata haye. ise 3-ayami milan (3dm) seey kamee dwara bhee saabit kiya jaa sakata haih
nimnalikhit roopon koo aine. pee.-haard key roop mein bhee jaanaa jaataa haih
samaan ginati samasya #ssp, joe lakshya key yog mein upasamuchchay kii sankhya koo ginane key liye kahati haye, #p-poorna haye.
ghaatiya samay algorithm.
aine" mein samay ghatank mein aiss. aiss. pee. koo hull karane key kaee tareeke hain.
samaveshan-bahishkaran.
sabse saral algorithm "aine" sankhyaon key sabhi upasamuchchay key madhyam seey chakr karna hoga aur unamen seey pratyek key liye, jaanch karein kii kyaa upasamuchchay sahee sankhya key liye yog kartaa haye. chalane kaa samay crum sootra _ 8 kaa haye, kyonki sootra _ 9 upasamuchchay hain aur, pratyek upasamuchchay kii jaanch karane key liye, hamein adhikansh "n" tatvon kaa yog karane kii aavashyakta haye.
algorithm koo dwiaadhaari vriksh kii gaharaai-pahali khoj dwara lagu kiya jaa sakata haih vriksh mein pratyek star ack input sankhya seey mell khaata haye; baain shakha sett seey sankhya koo baahar karane seey mell khaati haye, aur daaeen shakha sankhya koo shamil karane seey mell khaati haye (isaliye naam samavesh-bahishkaran). aavashyak smriti sootra _ 10 haye. runn-time koo kaee shodhon dwara behtar banaaya jaa sakata haih
horowitz aur saahani.
1974 mein, horowitz aur saahani ney ack tez ghaatiya-samay algorithm prakaashit kiya, joe samay sootra _ 11 mein chalata haye, lekin bahut adhik sthaan kii aavashyakta hoti haye-sootra _ 12. algorithm manmaane dhang seey "aine" tatvon koo sootra _ 13 key dou seton mein vibhajit kartaa haye. inn dou samuchchayon mein seey pratyek key liye, yeh apane tatvon key sabhi sootra _ 14 sambhaavit upasamuchchay key yog kii ack soochi sangraheet kartaa haye. inn donon soochiyon mein seey pratyek koo phir krambaddh kiya jaataa haye. sabse tez tulanaa chhantaai algorithm kaa upayog karate hue, iss charan key liye vilay samay sootra 15 legaa. haalaanki, sootra 16 tatvon key liye yog kii ack krambaddh soochi koo dekhate hue, soochi koo ack (sootra 17) vein tatva kii shuruat key saath dou krambaddh soochiyon mein vistaarit kiya jaa sakata haye, aur inn dou krambaddh soochiyon koo samay sootra 18 mein vilay kiya jaa sakata haye. iss prakaar, pratyek soochi koo samay sootra 19 mein krambaddh roop mein utpann kiya jaa sakata haye. dou krambaddh soochiyon koo dekhate hue, algorithm yeh jaanch sakata haye kii kyaa pahali sarani kaa ack tatva aur doosari sarani kaa ack tatva samay sootra 19 mein "t" taka haye. aisaa karane key liye, algorithm ghatate crum (sabse badey tatva seey shuru hocker) aur doosari sarani koo badhate crum mein (sabse chhote tatva seey shuru hocker) gujarta haye. jaba bhee pahali sarani mein vartamaan tatva kaa yog aur doosari sarani mein vartamaan tatva "tii" seey adhik hotaa haye, tou algorithm pahali sarani mein agale tatva kii or badhata haye. yadi yeh "tii" seey cumm haye, tou algorithm dusare sarani mein agale tatva parr chalaa jaataa haye. yadi dou tatva paae jaate hain joe "tii" key yog hain, tou yeh rook jaataa haye. (dou tatvon key liye upa-samasya koo dou-raashi key roop mein jaanaa jaataa haye.)
shropal aur shameer.
1981 mein, shroppel aur shameer ney horowitz aur saanjhi parr adharit ack algorithm prastut kiya, jisake liye samaan runtime-formula _ 21, bahut cumm sthaan-formula _ 22 kii aavashyakta hoti haye. "n"/2 tatvon key sabhi upasamuchchay koo pahale seey utpann karane aur sangraheet karane key bajaay, way tatvon koo "n"/4 tatvon key 4 seton mein vibhajit karate hain, aur ack mini heep kaa upayog karke gatishil roop seey "n"/2 tatva jode key upasamuchchay utpann karate hain, joe uparokt samay aur sthaan jatilataon koo utpann kartaa haye kyonki yeh sootra _ 23 aur sthaan sootra _ 24 mein kiya jaa sakata haye, jisamen lambai k kii 4 soochiyaan dee gaee hain.
sthaan aavashyaktaon key kaaran, hs algorithm lagbhag 50 purnankon key liye vyaavhaarik haye, aur ss algorithm 100 purnankon key liye vyaavhaarik haye.
hougrave-abraham aur joux.
2010 mein, kaise grave-abraham aur joux ney ack sambhaavit algorithm prastut kiya joe pichhale sabhi kii tulanaa mein teji seey chalata haye-samay sootra mein _ 25 mein space formula _ 26 kaa upayog karke. yeh kewal nirnay samasya koo hull kartaa haye, yeh saabit naheen curr sakata haye kii diye gaye yog key liye koee samadhan naheen haye, aur sabse karibi upasamuchchay raashi "t" koo vaapas naheen kartaa haye.
baad mein kaise grave-abraham aur joux kii takneekon koo vistaarit kiya gayaa, jisase samay-jatilata sootra _ 27 mein aaa gaee.
chhadm-bahupad samay gatishil prograaming samadhan.
aiss. aiss. pee. koo gatishil prograaming kaa upayog karke chhadm-bahupad samay mein hull kiya jaa sakata haye. maan leejiye kii hamaare paas ack udaaharan mein tatvon kaa nimnalikhit crum haih
humm ack "avastha" koo purnankon kii ack jodee ("i", "s") key roop mein paribhaashit karate hain. yeh raajya iss tathya kaa pratinidhitva kartaa haye kii
pratyek raajya ("i", "s") key dou agale raajya hainh
praarambhik avastha (0,0) seey shuru karate hue, kissy bhee graph khoj algorithm (ee.jee. bfs) raajya ("n", "t") kii khoj karane key liye. yadi raajya paaya jaataa haye, tou peechhe hatkar humm thheek "tii" key yog key saath ack upasamuchchay paa sakate hain.
iss algorithm kaa runn-time avasthaon kii sankhya mein sabse adhik raikhik haye. raajyon kii sankhya adhikatam "aine" gunaa vibhinn sambhaavit rashiyon kii sankhya haye. maan leejiye kii nakaratmak moolyon kaa yog aur sakaratmak moolyon kaa yog; vibhinn sambhaavit yogon kii sankhya adhikatam "b"-"a" haye, isaliye kull runtime sootra _ 33 mein haye. udaaharan key liye, yadi sabhi input moolya sakaratmak hain aur kuchh sthiraank "c" seey bandhe hain, tou "b" adhikatam "n c" haye, isaliye aavashyak samay sootra _ 34 haye.
yeh samadhan jatilata siddhant mein bahupad samay key roop mein naheen ginaa jaataa haye kyonki sootra _ 35 samasya key "aakar" mein bahupad naheen haye, joe ise pradarshit karane key liye upayog kiye jaane vaale bits kii sankhya haye. yeh algorithm aur key moolyon mein bahupad haye, joe unake bits kii sankhya mein ghaatiya hain. haalaanki, "unary" mein kootbaddh upasamuchchay raashi pee mein haye, taba seey kootlekhan kaa aakar bee-aeye mein raikhik haye. isaliye, upasamuchchay raashi kewal "kamjor" aine. pee.-poorna haye.
iss mamle key liye kii pratyek sootra _ 36 sakaratmak haye aur ack nishchit sthiraank seey ghiraa huaa haye, 1999 mein, pissinger ney ack raikhik samay algorithm paaya jisamen samay jatilata sootra _ 37 thaa (dhyaan dein kii yeh samasya key sanskaran key liye haye jahaan lakshya raashi aavashyak roop seey shoonya naheen haye, anyatha samasya tuchchh hogi). 2015 mein, koiliris aur zuu ney subset summ samasya key liye ack nirdhaarak sootra _ 38 algorithm paaya, jahan hamein yog khojane kii aavashyakta haye. 2017 mein, lyon ney ack yaadrichhik sootra _ 39 samay algorithm paaya.
2014 mein, curtis aur sanch ney simmed machines mein ack saral punaravritti paaya jisamen sootra _ 40 samay aur sootra _ 41 sthaan thaa, jahaan prasanskaran tatvon kii sankhya haye, sootra _ 42 aur sootra _ 43 sabse cumm purnank haye. yeh abb taka gyaat sabse achchi saiddhaantik samanantar jatilata haye.
vyaavhaarik parinamon kii tulanaa aur aiss. aiss. pee. key kathin udaharanon key samadhan parr curtis aur sainch dwara charcha kii jaati haye.
bahupad samay sanniktan algorithm.
maan leejiye kii sabhi nivesh sakaratmak hain. aiss. aiss. pee. key liye ack sanniktan algorithm kaa uddeshya "aiss" key ack upasamuchchay koo adhikatam "tii" key yog key saath aur cumm seey cumm "aar" gunaa ishtatam yog key saath khojana haye, jahaan "aar" (0,1) mein ack sankhya haye jise "sanniktan anupaat" kahaa jaataa haye.
saral 1/2-pratigrahan.
nimnalikhit bahut hii saral algorithm kaa anumaanit anupaat 1/2 haih
jaba yeh algorithm samaapt hoe jaataa haye, tou yaa tou sabhi input subset mein hotey hain (joe spasht roop seey ishtatam haye), yaa ack input hotaa haye joe fitt naheen hotaa haye. iss tarah kaa pahala input pichhale sabhi input kii tulanaa mein chhota haye joe subset mein hain aur subset mein input kaa yog "t"/2 seey adhik haye anyatha input bhee t/2 seey cumm haye aur yeh sett mein fitt hoga. aisaa yog t/2 seey adhik spasht roop seey opt/2 seey adhik haye.
poorna-bahupad samay sanniktan yojana.
nimnalikhit algorithm praapt kartaa haye, pratyek sootra _ 44 key liye, sootra _ 45 kaa ack anumaanit anupaat. iska runn time bahupad aur sootra _ 46 haye. yaad rakhein kii "n" input kii sankhya haye aur "t" upasamuchchay yog key liye oopari baadhya haye.
 ack tatva 0 rakhane key liye ack soochi "l" koo aarambh karein.
 pratyek "aaee" key liye 1 seey "aine" taka
 maan leejiye kii "ui" ack soochi hoe jisamen "l" mein sabhi tatva "y" houn, aur "l" mein sabhi "y" key liye sabhi yog "xi" + "y" houn.
 yuu. aaee". koo aarohi crum mein chhanten
 ell" koo khaali karein 
 y" koo "ui" kaa sabse chhota tatva honey dein."
 y" koo "l" mein jodein"
 pratyek tatva "z" key liye "ui" key crum mein badhaate hue karein
 //ack dusare key karib kii sankhya koo samaapt karke soochi koo kaaten
 //aur lakshya raashi "tii" seey adhik tatvon koo baahar fenk dein.
 yadi "y" + "εt"/"n" <"z" ≤ "t" tou
 "y" "=" "z" ""
 z" koo "l" mein jodein"
 l" mein sabse badaa tatva vaapas karein."
dhyaan dein kii chhantai charan (pratyek loop key liye aantarik) key binaa, soochi "l" mein input key sabhi sootra _ 9 upasamuchchay key yog honge. chhantaai kaa kadam dou kaam kartaa haih
yeye guna ack saath guaranti dete hain kii soochi mein sootra _ 49 tatvon seey adhik naheen haye; isaliye runn-time sootra _ 49 mein bahupad haye.
jaba algorithm samaapt hoe jaataa haye, yadi ishtatam yog mein haye, tou yeh vaapas curr diyaa jaataa haye aur humm curr lete hain. anyatha, ise pichhale chhantai charan mein hataa diyaa gayaa hoga. pratyek trim karane kaa charan adhikansh sootra _ 48 kii ack yogaatmak truti kaa parichay detaa haye, isaliye ack saath kadam adhik seey adhik sootra _ 52 kii ack truti kaa parichay dete hain. isaliye, vaapas kiya gayaa samadhan cumm seey cumm sootra _ 53 haye joe cumm seey cumm sootra _ 54 haye.
uparokt algorithm aiss. aiss. pee. key liye ack "sateek" samadhan pradaan kartaa haye yadi input sankhyaaen chhoti (aur gair-nakaratmak) hain. yadi sankhyaon kaa koee bhee yog adhikansh bits key saath nirdisht kiya jaa sakata haye, tou lagbhag sootra _ 55 key saath samasya koo hull karna ise thheek seey hull karane key barabar haye. phir, anumaanit upasamuchchay yog key liye bahupad samay algorithm ack sateek algorithm bunn jaataa haye jisamen samay bahupad aur sootra _ 56 (i) hotaa haye.ee., ghaatiya).
keller, mansini, perferchy aur speranza aur keller, perferchy aur pissinger upasamuchchay raashi key liye anya aff. pee. tii. aiss. prastut karate hain.