0 Up votes0 Down votes

4 views3 pagesFeb 25, 2014

© Attribution Non-Commercial (BY-NC)

DOC, PDF, TXT or read online from Scribd

Attribution Non-Commercial (BY-NC)

4 views

Attribution Non-Commercial (BY-NC)

- The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
- Sapiens: A Brief History of Humankind
- How To Win Friends and Influence People
- American Gods: The Tenth Anniversary Edition: A Novel
- A Wrinkle in Time: The Graphic Novel
- A Wrinkle in Time
- A Wrinkle in Time: 50th Anniversary Commemorative Edition
- The Heir
- Neuromancer
- Shatter Me
- Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
- Principles: Life and Work
- Principles: Life and Work
- Steve Jobs
- Cruel Crown
- Wheel of Time
- NIV, Holy Bible, eBook
- NIV, Holy Bible, New Testament, eBook, Red Letter Edition

You are on page 1of 3

3n g(n)=n" Solution# $ccor%ing to the %efinition of O( )& we nee% to fin% 'ositive real ()s n* + c so that f(n),=c-g(n) for all n.=n* Pick n*=1 + c=1*/ f + cg are e0ual at n=1& an% g rises 1ore 0uickl2 than f after that. 3. f(n)=n!2nlogn g(n)=nlogn Solution# n*=2 + c=1* --4 think 4 sai% n*=1 + c=1* in class& 3ut that won)t work/ sorr2# consi%er w5 f(1)=1!2-1-log1=1!2-1-*=1 g(1)=1-log1=1-*=* so f(1) . 1*-g(1) --6he values we choose %o %e'en% on the 3ase of the log/ here we)ll assu1e 3ase 2 c. f(n)=1*** g(n)=3n3 Solution# n*=1 + c="** works %. f(n)= n g(n)=n51* Solution# n*=1 + c=1** works 2. 6rue or false& + e7'lain a. f(n) is 8(g(n)) i1'lies g(n) is 8(f(n)) Solution# 6rue# 4ntuitivel2& 8 is an e0uals& an% so is s211etric. 9ore s'ecificall2& we know f is O(g) + f is :(g) so 6here e7ist 'ositive ( c& c)& n* + n*) such that f(n),=cg(n) for all n.=n* an% f(n).=c)g(n) for all n.=n*) so

g(n),=f(n)5c) for all n.=n*) an% g(n).=f(n)5c for all n.=n* so g is O(f) an% g is :(f) so g is 8(f) 3. f(n) is 8(g(n)) i1'lies f(n) is O(g(n)) Solution# 6rue# ;ase% on the %efinition of 8& f(n) is O(g(n)) c. f(n) is :(g(n)) i1'lies f(n) is O(g(n)) Solution# <alse# Counter e7a1'le# f(n)=n2 + g(n)=n/ f(n) is :(g(n))& 3ut f(n) is =O6 O(g(n)) 3. <in% functions f(n) an% g(n) such that f(n) is O(g(n)) an% the constant c for the %efinition of O( ) 1ust 3e .1. 6hat is& fin% f + g such that c 1ust 3e greater than 1& as there is no sufficient n* when c=1. Solution# Consi%er f(n)=n!1 g(n)=n we know f(n) is O(g(n))/ 3oth run in linear ti1e >et f(n).g(n) for all values of n/ no n* we 'ick will hel' with this if we set c=1. 4nstea%& we nee% to 'ick c to 3e so1ething else/ sa2& 2. n!1 ,= 2n for n.=1 ". Write the O( ) run?ti1e of the functions with the following recurrence relations a. 6(n)=3!6(n?1)& where 6(*)=1 Solution# 6(n)=3!3!6(n?2)=3!3!3!6(n?3)=@=3k!6(*)=3k!1& where k=n& so O(n) ti1e. 3. 6(n)=3!6(n52) & where 6(1)=1 Solution# 6(n)=3!3!6(n5")=3!3!3!6(n5A)=@=3k!6(n52k) we want n52k=1 (since we know what 6(1) is)& so k=log2n so 6(n)=3logn!1& so O(logn) ti1e. c. 6(n)=3!6(n?1)!6(n?1) & where 6(*)=1 Solution# 6(n)=3 ! (3!6(n?2)) ! (3!6(n?2))= 3 ! (3!(3!6(n?3))!(3!6(n?3))) ! (3!(3!6(n?3))!(3!6(n?3))) We can tell the ( of calls to 6( ) is %ou3ling ever2 ti1e we e7'an% it further& so it runs in O(2n) ti1e. B. What)s the O( ) run?ti1e of this co%e frag1ent in ter1s of n#

int 7=*/ for(int i=n/i.=*/i??) if((iC3)==*) 3reak/ else 7!=i/ Solution# $t a glance we see a loo' an% it looks like it shoul% 3e O(n)/ it looks like we go through the loo' n ti1es. However& that D3reak) 1akes things a 3it weir%er. Consi%er how the loo' will work for an2 real %ata/ we start at so1e n& count 3ackwar%s until the value is a 1ulti'le of 3& at which 'oint we 3reak. So the loo')s co%e will run at 1ost 3 ti1es (not a function of n)/ so the whole thing is O(1). --Eecall that DC) is the re1ain%er o'erator/ iC3 %ivi%es i 32 3 an% returns the re1ain%er (which will 3e *& 1 or 2).

- A Historian Looks Back - The Calculus as Algebra and Selected Writings.pdfUploaded byMonal Bhoyar
- Advanced Engineering Mathematics PDFUploaded byDAVID
- Sequence and Series Test Paper (Easy)Uploaded byShehbaz Thakur
- tssolexsheet3.pdfUploaded byaset999
- Chebyshevs Theorem (1)Uploaded byseesawupndown
- Calculus RelatedRates ProblemWithSolutionsUploaded byEdrian A. Mañalong
- Newton Raphson VariableUploaded bySachin Mathpati
- EM_Lab_2Uploaded byAmrYassin
- 1.4 Inverse FunctionsUploaded byOng Kee Siong
- Lecture 9Uploaded byYazid Abouchihabeddine
- PROPOSED PROBLEMSUploaded byMia Amalia
- My DataUploaded byv4vix
- zihaanUploaded bymohammad rashid tk
- Chapter 5 301Uploaded byak
- Geometrical TransformsUploaded byLaura Ileana Stoilescu
- Lang RangeUploaded byrenjurt
- en5Uploaded byp001
- 1977_Stable Adaptive Controller Design Part I- Direct Control (Narendra)Uploaded byademargcjunior
- Transformations Combinations WS SolutionsUploaded bynoursec
- 11 Maths Impq 08 Binomial Theorem KvsUploaded byEzhilarasiPazhanivel
- Prob_S12Uploaded bynadeem_sk
- SU Date Sheet May2015 (1)Uploaded byNaveen Jaswal
- Date Structure AssignmentUploaded bytathagatgupta
- EGR280 Mechanics 4Uploaded byafiqzero
- Brake Orbits Type Solutions to Some Class of Semilinear Elliptic Equations_(Alessio)Uploaded byLurzizare
- pipeline project paperUploaded byapi-258741388
- Potwe 13 Ae Np 01 sUploaded byscribd-in-action
- general mathematicsUploaded byTrixsha Tapsirul
- Copy of Pugh Matrix TemplateUploaded bysuganthiaravind
- HW12SOLFA07Uploaded byAndréOliver

- Common Chord ProgressionsUploaded byEugene Quah
- Edad.txtUploaded byTabitha Howard
- Evaporimetrothe LeafletUploaded byTabitha Howard
- Https Videos Mmm EnglhisUploaded byTabitha Howard
- BBl_DWP.xlsUploaded byTabitha Howard
- Demystifying Google HacksUploaded byMikhail Miguel
- Rice Farming Education and TechnologyUploaded byTabitha Howard
- Present Continuous Tense - Quiz 2 _ SchoologyUploaded byTabitha Howard
- natamicina.pdfUploaded byTabitha Howard
- blackberry-quick-tips.docUploaded byTabitha Howard
- English Exercises_ the Present Continuous Tense2Uploaded byTabitha Howard
- pornerUploaded byTabitha Howard
- Every Day ActivitiesUploaded byTabitha Howard
- TermsUploaded byTabitha Howard
- asi asi.docxUploaded byTabitha Howard
- Publication 20150617182349867Uploaded byTabitha Howard
- Principio Del FormularioUploaded byTabitha Howard
- Mass Transfer OperationsUploaded byTabitha Howard
- NormalUploaded byTabitha Howard
- Pinturas Tremen JUploaded byTabitha Howard
- Crack ChecadUploaded byTabitha Howard
- Custom Key InfoUploaded byanon-922531
- argcis 10.3Uploaded byTabitha Howard
- 11Uploaded byTabitha Howard
- REVITUploaded byTabitha Howard
- DC Motor AnalysisUploaded byKevin Maniego Calanno
- Msg 01114Uploaded byamalinaishah
- 2008-11-NKK-Press-Release-FINAL.docUploaded byTabitha Howard
- Blues ImprovUploaded bywaner

- ADLIB_WhitePaper-Contract-Analytics.pdfUploaded byfoliox
- Geosynthetics in Pavement DesignUploaded byLuli
- MUSCLE RDX CASE.pdfUploaded byneyra789
- A Comparative Analysis o Crrnt Crdt Rsk MdlsUploaded byGeorge Akishbaia
- Sales GimenaUploaded byJuris Mendoza
- Assignment 1 EPC3UNIT1Uploaded byshabarimarathe
- Types of LayoutUploaded bymuneerpp
- Duke-Energy-Carolinas,-LLC-BPM-Net-Revenues-and-NFPPT-Revenues-Adjustment-RiderUploaded byGenability
- Island Eye News - November 27, 2009Uploaded byLucky_Dog_Publishing
- Absorb Features Blatant WebUploaded byRégis Vargas
- 1 Anatomy of WeldUploaded byMarlon Ty Manalo
- 30 MW Tender_Document 1st March 2017Uploaded byjaiprakashgupta1947
- Impact of Data Normalization on Stock IndexUploaded byGhilescu Daniil
- Presentation on the Topic of Industrial Microbiology by Mariya - CopyUploaded byShubham Mishra
- Bayer CropScience AG v. Dow AgroSciences LLC, C.A. No. 10-1045 (RMB/JS) (D. Del. June 7, 2012).Uploaded byYCSTBlog
- Execware v. Wal-Mart Stores et. al.Uploaded byPriorSmart
- MSc Tech Indus MathsUploaded byjayantbildani
- MB0044 Slides Unit 05Uploaded bySaagar Karande
- 2006-Int-ANSYS-Conf-37.pdfUploaded byعلياسماعيل
- EC Service ManualUploaded bynascales
- MicroprocessorsUploaded byVignesh Meganathan
- TAM3-2Uploaded byTarun Bhatia
- Alex Sharpe's Portfolio StudyUploaded byanusha
- Ch 01 SolutionsUploaded byRemy Birmingham
- How to Repair Kiln Tire and Roller WearUploaded bymahreza189
- Sec a Grp 3 Production Function of Private BanksUploaded byHashim Shamsudeen
- 12qq.2015(1)Uploaded bybrainhub50
- ECE 3741Uploaded byjohn
- January 2014 PGS Boot Camp Governance Value and Development MindsetUploaded byisaphilippines
- CDCS Specimen Simulation 3Uploaded bysreeks456

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.