Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

a.) State the definition of the fact that f(n)is O(g(n)), where f(n) andg(n) are functions from the set of positive integers to the set of real numbers.

b.) Use the definition of the fact that f(n)isO(g(n))directly to prove or disprove that n2+18n+107is O(n3).

c.) Use the definition of the fact that f(n)isO(g(n))directly to prove or disprove thatn3isO(n2+18n+107).

Short Answer

Expert verified

a.) f(x) is O(g(x)) if there exists constants and such that|f(x)|C|g(x)| wheneverx>k

b.) n2+18n+107isO(n3).

c.) n3is not O(n2+18n+107)

Step by step solution

01

(a)Step 1: State the definition of the fact that f(n) is  O(g(n)), where f(n)  and g(n) are functions from the set of positive integers to the set of real numbers

Big-O Notation: f(x) is O(g(x))if there exists constants and such that

|f(x)|C|g(x)|

whenever x>k

02

(b)Step 2: Prove or disprove that n2+18n+107 is O(n3)

Let us assume k=107. For n>k, we then obatain:

|n2+18n+107|=n2+18n+107

n2+nn+n=n2+n2+n=2n2+n=2n2+n1<2n2+nn=2n2+n2=3n2<3n2=3|n3|

We then need to take atleast C.Thus let us take C=3.

By the definition of the Big- notation, we have then shown thatn2+18n+107 isO(n3) with k=107 andC=3

03

(c)Step 3: Prove or disprove that n3  is O(n2+18n+107)

PROOF BY CONTRADICTION

Let us assume that n3is O(n2+18n+107). Then there exists constants k and C such that

|n3|C|n2+18n+107|

whenever n>k

Since k is a lower bound for the -values, we can assume that k is atleast 1 without loss of generality (because if the statement is true for k<1, the it will also be true for any value of k that is at least 1 )

k1

Since n>k1, we then obtain:

|n3|C|n2+18n+107|C|n2+18n2+107n2|=C|126n2|=126C|n2|

Dividing both side of the inequality by n2, we then obtain:

|n|<126C

n3is not O(n2+18n+107)

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

See all solutions

Recommended explanations on Math Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free