Download as pdf
Download as pdf
You are on page 1of 12
DATA _STRUCTURES AND _ALGORITEMS. ASSIGNMENT _Ot wo NAME: IDR YAKSHAYA KANNAN oe REGISTRATION NUMBER: 2202000877 SCHOOL: scHOOL OF COMPUTING: ASD DATA GCIENCE 1 SEMESTER: TOO : EMaALL Te vidiyoKsnayat-26 @oeae-saiunWeraeH-SII 2 O}ie & i orgy ana g io OCH» Hen F IF, OC). TRANGITIVITY OF BIG O: 3 MIVEN: £° is OQ) 9 is och) mere CHS concrans C70 * Nez To PROVE: fis OC 4 OLF E CTH fOr aN Awe PROOF: According 40 the definition oF BIQ~O NOraHor™ eis 5 Oca? iF *nere exer constants ey and mo 2° suck *hot Oc BS CEA For at H>%- gince’ ¢ is OCG) and gis oth) caiven, there exist Constants c.0, 7° and nen, 20 such tak peed for aM nom O and Qe for ot “2% © we ehoose No Max LNs}. TREN? WS Find constant ROVER FS ch for atl Noho. Je sue thot | using inequairnes O £@, we KNOW anet for an n>o> Fe AGE acer) ee — ice EY o a mW sia raking @ a muttipiing bom Wo OADM. gg O° QOM2ZO Noids: ECOL S SLI N=2,5 genr= 4(2I- BH BBs Qn? ON? tues for © holds. That ia, wee CWS WRiniter, MACY a However, 4n73 'S Sot WHE FIN) Da.q*@mZO Holds. ~L.(N, Bince for every NIB» +e we camo od re gcny FO roids @ constant co For whic) #07 +rUS. From the graphs # (S evicert |tnat for every varuce oF 5 greater than 3, gin) Upper Pounds FCM) and 4herefore F0N) #-20QOO). alee! the above conjecture 1S : aise. - wv Bowe using any mretnod (aeFinMon or Vien): quer? Cd SNtogh + BNP = OCNLEgh) . usimo DEFINITION: © Accosalirg to tre dofinitton oF BY © notation, 46>) ts Clary if these exist constants co and 20 such that OF FEM = CQOY For a 2NMO- Hese, PCN) = SnLogn +*3rn gem =ntogn Oz Ssniwogn *38n 4 e-nlogn (using definition) Dividing both stcles of the inequatity By mogn: 5 +3 2c tog > choosing % =10 ond C =a, tus: 5 + 3 = 6+3 =8 tg 10 TT QaHs: & \ = wa ee a - Torey yaQtuea ee 7 gia so tre inequality holds +eUe, ov AUN dno, on, eonetame c>O and he >0 Therefose, Here exiat euch thot for atk NNO» oS Fond € CQ). wence, SnLogn +3n = ocntiog”. 2: USING LIMITS we KNOW senate ip um FON) =O, een Fen) (2 nee “96m aan). urn sntogn +30, nee Ntogn , Urn snlgn 4 3H , ( nlogn gn) i) +3" = 003) ASSES | USING DEFINITION ACCOTAUNG to the definition of BLqQ O NotAtton» POO) is acgtnd te +e exiSt constants CVO and Mp2 | Such that © € HCMC SACOM ow Ql OSM. | yew, pin) 2a +3 awn) = 3° og anxa? 2 03™, Por at dn, Cay definition) } Dividing bow eidos ap +e inequauityg by 3 ao 4 a 20, foe al N>Ne 3" ar o ay? ALEC, for AL N2No 3 and oc =¥e4? Choosing No =t (gyi evewe 3 pane a ree cm >i soltnd inequality horas = etUe- ayr+l = c2) = wee eo Ge +1 = -aaea and so on. Therefor, rove SxXISt CoNStaANtS C>oO And ny >O0 | Such that Oe 70h) ce-gim for QU N30 - Hence FON) = OC9CN)), that io a M+g™=0(9"). OWL UBINg the defindiona. Sn? = won) ACCOSHNG +0 the definttion ce Little omega notation, few anY Poattive coretant O>0, tres exists a constant Mor® suor that Of cigun < Ft al nn. Hove, = FON = G3 QO) =a 02 OL Chr ENS —cwy doriniton) ene end “sett j ay bY Dividling pot eides of the inequatty een fos n2N0 Ane requaity HOSE +70 aiue of Cc» the 0 4 onren? Choosing @ =8 and n=! Cleasiy, foe eveny positive vu BSS a gongtant WH BUdh tat foo all Ny». Hence, m3 =coln*). Damar gud ACCOBAIINg to the definition op ute Ermega. POEGtON, Fen? to wat» & por every CSO » trhewe exicts H Conetant heso such that O¢a.gem< FEM. foe al NynNo. Heve, pen) = and+Th gon) = O£0-4M «4 Btn) CBY defintthony Of ent. 4n2+7H) Divtating by > on both giclee: a eg a. fos atl M>2hNe ASN approaches 0, gu4, Howevet, the above tnequarity dees not how +sue fos atl values of a. Choosing 6 =I No =1: | Sc aan b= a does Mot Hod +o. urn ee DOCS DOE HOI Se: me ‘Lal — e—bohRe ee ‘aa ° uf SSeS Since “ARO TS noqualhy OSS hotel te, Guy Of e-G0n) < Fem Coes hot | # wena Al Positive Latues FO, 4n247K4 Pro) ' Xe that ocginy a PCAC) EO the empty set. HO above Conjeatute can be prove by conteraatetion, tet us aag UME, +o the Contrasy, that ocgtny 4 wl ginn) | S not the Null” gor - vot | tM) e ecginy Awl(gmy, we i Knew that cn) te wlotry) & ard ony 4 gor) ia ©CFCHY). This i9 becouse: | #0n) ts wogin) P Pos qt odo thew exISte hp SO Such that puns SANZO for all Nhe. 7 } F#m) SIM 36 pos al N3no | Dividing the tnequauity by © on koth | svdles , fn) > 90) 20 fos al Nino. ¢ 0 € 90M < Fim) for all NINM0. e Lok © € gin) 4K-Pth) for GH NBM. | | gem) = OC#tN)), by the aefintion op Lite O- » Y | pen = ocgtn)) by assumption, quis Wyle Wor fin) = OCFED), ines UNE oS qransinve in Natur%e: ‘nic meange thot for at corecarts 70> gor) £ of) Aces NOt howd: However, fos O<4. PON < Fl) Hence, Thewfowe, ue aveive a & conenaatetion: ecginy) A w(lgcny) = >. aug cr) but rot on). Lim F00)_ =20 tren Pim cs nO gin) GEN: um 60 7% no “gon ro prove: fen) = -ECqeN FM ¢ OCgcr) PROOF: en Rie) =o foo GU Mo Here existe qn xc 0 nyo S aot FOOYM for at DEDNy Adcorcting, tO the definition ap Umi . um PCM) == 0 Ciniven) nn gm) Sem PM fot OW ODN. ae) en) >) M- gon) fos al XN . (ue Krow that FON)>0,90MI0, M>0,ND0) | (cortd of LOS Page) | eT Sateen ae @liar fen) ona gon be asymptotically postive punetone: PRONE ©® digproe each of tre folowing conjectusee: = ocren): yy fon = ocgth) emnpuies ach) ved veing coun the ale conjectu7? oa po aiepe© example. Accoraing tO Ane definition of Big O 40) 2ocgtn) trove exists constants © ana. Ne SO such that OS ft EOQIy for ah N20: Oemscer? “ty frow «ftN) =n ond qm = defunttion) oencer® (8y | | Dividing the inequatity by ne oct 66 for at Noho n the ineguatity heide +sue for No =! ard ¢=l- Treweper®, 90m) =OCQCN)- gen) =OCHCNY ep thew exist coneta me 020 and 020 Quoh that 0 6 fom ce-gtn) fow at hho 2 0 eh%eon By AEfintKon) Dividrng ne inequatity by nt nee me gbove moquauty does Hot hota for ne qresefote, gin) FOCFON). J Hones, pcr) =OCqcry)_ does not empty gen aem?. Ha. per) = OCg tm) eMmpites Log #007 = 0 (tog (gin, where tog Q(n)2! and #00 = por ll suPADIently targa n. | cE a eT ee coe ete el Ee The Qibove conjectuve can be proved using are definttion of Bq O- PUN) = OCGENY EP there exist Constarte 0 and he>O Ch that Of PIN ce qtr) fow aL >No. log fm) = “0 ( toglgind)) impues 0 ¢ tog CANE &t0g (Qin). © € p(n) € @-gGCM) hotdes, since & LS Quen that Pin) = OC4 (nd). Takting log on beth sides, Of LogcFtny « Log Cogan) OC Log CFM ¢ Loge +tog (Qe). since L094 (4tn)) >1 pou lowge nN» LOG © £ Log Qin) wolf < k- Log (Qin, for au ftetent y _ Lawqe Therefore, Log (#th)) = 0 (tog (gCn%). 3. FEN) = OCGCNY Empulbg giny = C#CHY), gen) = OCG) LF there exist. conetants C>O ANd N20 gsuoh that Of FINE @-Qin)d for at Odho- since & is given that gen) = OC4Cr), © eFn< egin -O gw) = -LUCFIN) =P +thex@ exiat constanie odo and Mo SO SUCH that Qin) > CFO) 20 foe AL Ndr. gi) S afCH)SO F QON)=-—LCFtHy @ © £ Pine Og) (FIOM O) eG Divicling tne inequaLery bY oc FO) £90: c vet Yo =k" of4 wpend 4 go> woheve K70- gin) 3 KEEN) 5 O- Je that Qc”) = CF) (FON ©), Thig ompue! | pty = OFC) ACCOTALNG tO the dofinition of Sq Weta etn) io elqQim) LP there Oxi St constants C190, @.>0 and Fedo SUH that O £ Agim £F0M) 4 GQ gQCM), TOT Qu m2ne. The above corjectuTe 00% be digetoved ustng Q counteteXampe: pen) =a” gin) = a =O) = EC 4th), then these exists constants ¢>e wo pin oe (gaa, os CoO AMA ne sO Such tae e:2M2 , Pow a mdhoe- Thew ave No vaulea OF Gr Rho for which thio hoida ¢vue “Therefore, Pin) + efF(M/a)), | | jo ® | CONTINUED | [This implies anot thew exiate CONMstants o>o | and no x0 | | ACCOTALNG, Suen eae FCN) DH QON Foe a NBM. Howe, no =N &£ C=N, to the detinition of Btq Orreqa nota “ton, Fin) is =ACQe BW tev CX Qoy, S (Oo and M020 suam® tat FON) SP-QiNd 20 | fos au AM. Since we Neciee! touna an OPpPropmate ANd Oo, PtH) =-ACgmy,

You might also like