
linn-karnighan shodhaatmak

sanyojan anukoolan mein, linn-karnighan samamit yatra vikreta samasya koo hull karane key liye sabse achche shodh mein seey ack haye. yeh sthaaniya khoj algorithm key varg seey sambandhit haye, joe input key hisse key roop mein ack daura (hamiltonian chakr) letaa haye aur diye gaye daure key pados mein ack chhote daure key liye khoj karke ise sudhaarne kaa prayaas kartaa haye, aur ack koo khojane parr usa nae seey prakriya koo dohrata haye, jaba taka kii sthaaniya nyuntam kaa saamana naa hoe jaae. jaisa kii sambandhit 2-opt aur 3-opt algorithm key mamle mein, dou tooron key beach "doori" kaa praasangik upaay kinaaron kii sankhya haye joe ack mein hain lekin dusare mein naheen hain; nae tour puraane tour key tukadon koo ack alag crum mein phir seey jodkar banaae jaate hain, kabhi-kabhi usa disha koo badalate hain jisamen ack upa-tour koo paar kiya jaataa haye. linn-karnighan anukuli haye aur ack charan mein badalane key liye kinaaron kii koee nishchit sankhya naheen haye, lekin 2 yaa 3 jaisi chhoti sankhya kaa samarthan kartaa haye.
vyutpatti.
yatra vikreta samasya key diye gaye udaaharan sootra _ 1 key liye, paryatan vishisht roop seey unake kinaaron key sett dwara nirdhaarit kiye jaate hain, isaliye humm unhein iss tarah seey kootbaddh bhee curr sakate hain. sthaaniya khoj key mukhya loop mein, hamaare paas ack vartamaan tour formula _ 2 haye aur humm nae tour formula _ 3 kii talash curr rahey hain jaise kii samamit antar formula _ 4 bahut badaa naa hoe aur nae tour kaa lambai formula _ 5 vartamaan tour key lambai formula _ 6 seey cumm hoe. choonki sootra _ 7 aamtaur parr sootra _ 8 aur sootra _ 9 seey bahut chhota hotaa haye, isaliye matra parr vichaar karna suvidhajanak haye.
choonki sootra _ 13: vartamaan tour formula _ 8 nae tour formula _ 9 kii tulanaa mein kitna lamba haye. saral sootra _ 16-opt koo sabhi formula _ 11 kii jaanch key roop mein maanaa jaa sakata haye jisamen bilkul formula _ 18 tatva (formula _ 8 mein formula _ 16 lekin formula _ 9 mein naheen, aur formula _ 9 mein ack aur formula _ 16 lekin formula _ 8 mein naheen) jaise kii formula _ 25 phir seey ack daura haye, aise sett kii talash mein jisamen formula _ 26 haye. halanki una parikshanon koo vipareet crum mein karna aasaan haih pahale sakaratmak laabh key saath prashansaniya formula _ 27 kii khoj karein, aur kewal doosara jaanch karein kii kyaa formula _ 25 vaastav mein ack daura haye.
yadi isake kinare kramshah sootra _ 8 mein naheen balki sootra _ 8 mein baari-baari seey hain tou ack pagadandi koo sootra _ 29 mein baari-baari seey (sootra _ 8 key sambandh mein) paribhaashit karein. kyonki upgraph sootra 33 aur sootra 34 sootra 35-niyamit hain, upgraph sootra 36 mein kewal degree sootra 37, sootra 35 aur sootra 39 key sheersh honge, aur pratyek sheersh parr sootra 8 seey utane hii ghatana kinare hain jitane sootra 9 seey hain. isaliye (anivarya roop seey ularian circuit khojane key liye hierholzer key algorithm dwara) graph sootra 42 bund baari-baari seey trails mein vighatit hoe jaataa haye. sootra 11 nirdhaarit kartaa haye joe kuchh tour sootra key liye sootra 4 koo santusht curr sakata haye _ 9 iss prakaar sootra 29 mein bund vaikalpik pagadandiyon kii ganana karke paaya jaa sakata haye, bhale hii harr bund vaikalpik pagadandiyon kaa sootra 25 koo ack daure mein naheen banaata hoe; yeh vaikalpik roop seey ack disconnect sootra _ 35-niyamit upgraph hoe sakata haye.
mukhya vichaar.
vaikalpik maarg (bund yaa khule) ack chhote vaikalpik maarg kaa vistaar karke banaae jaate hain, isaliye jaba vartamaan tour formula _ 8 key pados kii khoj kii jaati haye, tou ack vaikalpik maargon key khoj vriksh kii khoj kii jaati haye. linn-karnighan algorithm kaa mukhya vichaar iss pedh seey sabhi vaikalpik pagadandiyon koo hataana haye jinamen laabh sootra _ 51 haye. yeh nimnalikhit lemma kii badaulat sakaratmak laabh key saath harr bund pagdand koo khojane seey naheen rokta haye.
lemma. "yadi sootra _ 52 aisee sankhyaaen hain joe sootra _ 53 hain, tou inn sankhyaon kaa ack chakreeya kramparivartan aisaa haye kii sabhi aanshik yog bhee sakaratmak hain, i.ee.kuchh sootra _ 16 aisaa haye kii "
ack bund vaikalpik trail sootra _ 57 key liye, koee sootra _ 58 koo paribhaashit curr sakata haye yadi sootra _ 59 aur sootra _ 60 yadi sootra _ 61 haye; yog sootra _ 62 taba laabh sootra _ 63 haye. yahaan lemma kaa tatparya haye kii sakaratmak laabh key saath pratyek bund vaikalpik trail key liye cumm seey cumm ack praarambhik sheersh sootra _ 64 maujood haye jisake liye aanshik trail key sabhi laabh bhee sakaratmak hain, isaliye sootra _ 7 taba paaya jaayega jaba khoj sootra _ 64 seey shuru honey vaale vaikalpik trail kii shakha kii khoj karati haye. (isase pahale khoj ney sootra _ 7 key anya upa-trail koo anya sheershon seey shuru karane parr vichaar kiya hoga, lekin peechhe hutt gayaa hoga kyonki kuchh upa-trail sakaratmak laabh baadha mein whiffle rahey.) shaakhaon kii sankhya koo cumm karane seey seedhe runtime mein kamee aatee haye, aur jitani jaldi ack shakha kii chhantai kii jaa sakati haye, utanaa hii behtar haye.
yeh graph mein sabhi bund, sakaratmak laabh vaikalpik maargon koo khojane key liye nimnalikhit algorithm detaa haye.
ack ganana algorithm key roop mein yeh thodaa trutipurna haye, kyonki yeh ack hii pagadandi koo kaee baar report curr sakata haye, alag-alag shuruati binduon key saath, lekin linn-karnighan parwah naheen kartaa haye kyonki yeh jyaadaatar pahale hitt koo khojane key baad ganana koo samaapt curr detaa haye. haalaanki yeh tippani kii jaani chaahiye kih
buniyaadi linn-karnighan algorithm.
linn-karnighan algorithm kaa mool roop naa kewal uparokt ganana kaa ack sthaaniya khoj samkaksh kartaa haye, balki yeh dou maapdandon kaa bhee parichay detaa haye joe khoj koo sankuchit karate hain.
kyonki lambai sootra 95 key formula 99 vaikalpik trails hain, aur algorithm key antim daur koo yeh nishkarsh nikaalane seey pahale una sabhi kii jaanch karni parh sakati haye kii vartamaan daura sthaaniya roop seey ishtatam haye, hamein algorithm jatilata key pratipaadak parr ack nimn seema key roop mein formula 101 (maanak moolya sootra 35) milata haye. linn aur karnighan ney apane algorithm key liye ausat samagr chalane key samay mein sootra _ 104 key ack anubhavjanya pratipaadak key roop mein sootra _ 103 kii report kii, lekin anya karyanvayankartaon koo usa parinam koo punah utpann karane mein pareshani hui haye. yeh sambhavana naheen haye kii sabse kharaab sthiti mein chalane kaa samay bahupad haye.
oopar diye gaye stack key sandarbh mein, algorithm haih
iss prakaar vichaar kiye jaane vaale vaikalpik maargon kii lambai spasht roop seey seemit naheen haye, lekin backtracking gaharaai sootra seey parey vartamaan maarg koo vistaarit karane kaa ack seey adhik tarika naheen maanaa jaataa haye, joe siddhant roop mein una anveshanon koo runtime jatilata mein ghatank koo badhaane seey rokta haye.
seemaaen.
uparokt vidhi dwara paae jaane vaale bund vaikalpik maarg sabhi judey hue hain, lekin dou bhramnon key samamit antar sootra _ 147 kii aavashyakta naheen haye, isaliye samanya roop seey vaikalpik maargon kii yeh vidhi ack trail sootra _ 8 key poore pados kaa pataa naheen lagaa sakati haye. linn-karnighan shodh parr saahitya una logon key liye "anukramik" adaan-pradaan shabd kaa upayog kartaa haye joe ack ekal vaikalpik maarg dwara varnit hain. sabse chhota gair-kramik vinimay halanki 4 kinaaron koo badal dega aur isamen pratyek 4 kinaaron key dou chakr shamil honge (2 kinare jode gaye, 2 hataae gaye), isaliye yeh vishisht linn-karnighan vinimay kii tulanaa mein lamba haye, aur inmein seey kuchh 4-kinare vaale adaan-pradaan key poorna sett kii tulanaa mein hain.
linn aind kernighan dwara cumm seey cumm ack karyanvayan mein sthaaniya roop seey ishtatam daure kii ghoshana karane seey pahale 4 kinaaron key aise gair-kramik adaan-pradaan parr vichaar karate hue ack atirikt antim kadam thaa, jiska arth hoga kii paryatan 4-vikalp hain jaba taka kii koee khoj parr aur baadhaaen naheen daaltaa (joe vaastav mein linn aur kernighan ney kiya). saahitya iss baat parr aspasht haye kii linn-karnighan shodhaatmak uchit mein kyaa shamil haye, aur aage kyaa parishkaran haye.
asmamit" tii. aiss. pee. key liye, anukool adaan-pradaan khojane key liye sakaratmak laabh vaikalpik maargon kaa upayog karane kaa vichaar cumm upayogi haye, kyonki aise cumm tareeke hain jinamen daure key tukadon koo nae daure dene key liye punarvyavasthit kiya jaa sakata haye jaba koee ack tukade key abhivinyas koo ulat naheen sakata haye. mool daure koo punah prastut karane key liye kewal dou tukadon koo ack saath patch kiya jaa sakata haye. teen tukadon koo ack saath patch kiya jaa sakata haye taaki kewal ack hii tarah seey ack alag daura banaaya jaa sakey, aur sambandhit vaikalpik pagadandi chaar tukadon koo ack nae daure mein punarvyavasthit karane key liye ack bund pagadandi taka naheen faili haye. chaar tukadon koo punarvyavasthit karane key liye, ack gair-anukramik vinimay kii aavashyakta hoti haye.
hamiltonsity kii jaanch karna.
linn-karnighan shodh dou binduon parr tour candidates formula _ 25 kii vaidhata kii jaanch kartaa haih jahir haye kii jaba yeh taya kiya jaataa haye kii kyaa ack behtar tour paaya gayaa haye, lekin khoj tree mein utarane key liye ack baadha key roop mein bhee, jaisa kii infasiabिलिटी depth formula _ 97 key madhyam seey niyantrit kiya jaataa haye. thhos roop seey, khoj mein badee gaharaai parr ack vertex formula _ 151 kewal vaikalpik trail mein jodaa jaataa haye yadi formula _ 152 ack tour haye. design dwara kii kinaaron kaa sett sootra 153 mein ack 2-kaarak kaa gathan kartaa haye, isaliye yeh nirdhaarit karane kii aavashyakta haye kii kyaa usa 2-kaarak mein ack hii hamiltonian chakr hotaa haye, yaa isake bajaay kaee chakron seey banaa hotaa haye.
yadi iss upa-samasya koo saralata seey sootra key 104 kinaaron key sett koo input key roop mein ack upa-rutain dene key roop mein prastut kiya jaataa haye, tou iss jaanch key liye samay jatilata key roop mein sootra 88 key saath samaapt hotaa haye, kyonki yeh nirdhaarit karane mein saksham honey seey pahale kii yeh vaastav mein ack hamiltonian chakr haye, poore daure key aspas chalana aavashyak haye. yeh iss pareekshan key dusare upayog key liye bahut dheema haye, joe sootra _ 8 seey sootra _ 35 kinaaron seey adhik key saath pratyek vaikalpik pagadandi key liye kiya jaataa haye. yadi adhik jaankaari kaa dhyaan rakhaa jaataa haye, tou pareekshan koo nirantar samay mein kiya jaa sakata haye.
yahaan swatantrata kii ack upayogi degree yeh haye kii koee usa crum koo chuna sakata haye jisamen sabhi sheershon parr charan 2.3.2 punaravritti hotaa haye; vishesh roop seey, koee gyaat tour sootra kaa paalan curr sakata haye. sootra _ 8 seey sootra _ 16 kinaaron koo chunane key baad, shesh upgraph sootra _ 161 mein sootra _ 16 path hotey hain. sootra _ 163vein kinare key sootra _ 164 parr vichaar karate samay kiye gaye hamiltonsity pareekshan kaa parinam kewal iss baat parr nirbhar kartaa haye kii inmein seey kiss maarg mein sootra _ 165 rahata haye aur kyaa sootra _ 155 sootra _ 165 seey pahale yaa baad mein haye. isaliye sootra _ 169 key liye charan 2.3.2 kaa pradarshan karane key hisse key roop mein sootra _ 168 vibhinn mamalon kii jaanch karane key liye paryaapt hoga; jahan taka sootra _ 151 kaa sambandh haye, iss pareekshan kaa parinam kuchh aisee cheez key bajaay viraasat mein millie jaankaari hoe sakati haye jisaki ganana taaja kii jaani haye.

