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

Find function f and g form the set of positive integers to the set of real numbers such that fn is notOgn andgn is not Ofn.

Short Answer

Expert verified

We have to find the function f and g such that f (n) is not O (g(n)) and g(n) is not O(f(n)) .

Step by step solution

Achieve better grades quicker with Premium

  • Unlimited AI interaction
  • Study offline
  • Say goodbye to ads
  • Export flashcards

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

01

Step 1:

In the question it is given that f and g form the set of positive integers to the set of real numbers.

So, f,g:\user1Z\user1+\user1R

Now let’s look at the function

f(n) = {20

g(n) =n2

02

Step 2:

Let’s say, n is odd, then

f(n) =n3

g(n) = n2

If n > k then, f(n) > g(n)

Now, by applying the definition of Big-O Notation,|f(x)|a|g(x)|

If we compare the two expressions, f(n) > g(n) and |f(x)|a|g(x)|

We can say that f(n) is not O(g(n)).

03

Step 3:

Let’s say, n is even, then

f(n) = n

g(n) = n2

If n > k then, f(n) < g(n)

Now, by applying the definition of Big-O Notation,|f(x)|a|g(x)|

If we compare the two expressions, f(n)<g(n) and|f(x)|a|g(x)|

We can say that g(n) is not O(f(n)).

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