1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Goryan [66]
4 years ago
12

Assume you have functions f and g such that f(n) is O(g(n)). For each of the following statements, decide whether you think it i

s true or false and give a proof or counterexample. a) f(n) 2 is O(g(n) 2 ) b) 2f(n) is O(2g(n) )
Computers and Technology
1 answer:
irakobra [83]4 years ago
8 0

Answer:

1. By assumption there exist N ∈ N and c ∈ R>0 such that for all n ∈ N with n ≥ N we

have

0 ≤ f(n) ≤ cg(n).

But then, since log2

is order-preserving:

log2 f(n) ≤ log2

cg(n)

= log2

c + log2

g(n).

That looks almost OK. We want to find a d ∈ R>0 such that log2 f(n) ≤ d log2

g(n).

Using the previous, it is sufficient to show:

log2

c + log2

g(n) ≤ d log2

g(n).

And this is OK, if:

log2

c

log2

g(n)

+ 1 ≤ d.

However, log2

g(n) might get closer and closer to 0 while n gets bigger. This leads us

to the following counterexample:

2(1 + 1

n

) ∈ O(1 + 1

n

),

but

log2 2 + log2

(1 + 1

n

) ∈/ O(log2

(1 + 1

n

)).

2. We have 2n ∈ O(n), however we saw last week that 22n ∈/ O(2n

).

3. By assumption there exist N ∈ N and c ∈ R>0 such that for all n ∈ N with n ≥ N we

have

0 ≤ f(n) ≤ cg(n).

But then, since squaring is order-preserving (on positive values), also:

0 = 02 ≤ f(n)

2 ≤ (cg(n))2

= c

2

g(n)

2

.

Thus f

2 ∈ O(g

2

).

You might be interested in
PushBullet is an app to talk with people. Look it up and let me know u got it.
lisov135 [29]

Answer:

k

Explanation:

5 0
3 years ago
Read 2 more answers
Which feature of a typical professional networking site helps users add professional details to their profile?
BigorU [14]
That's a good question I think it's LinkedIn where they have professional profiles
5 0
3 years ago
Read 2 more answers
Which of the following is an example of a tracking
Vikentia [17]
22222222222222222222
5 0
3 years ago
Read 2 more answers
Which key toggles between insert mode and overtype mode?
andrew-mc [135]
The keyboard key that toggles between insert mode and overtype mode is the INSERT key.
7 0
3 years ago
Robert complains that the cursor on his laptop screen often jumps around unexpectedly when he’s typing. What can he do to solve
Aneli [31]

Answer:

Disable the touchpad

Explanation:

3 0
4 years ago
Other questions:
  • ___ is the technology used by smart phones to send text messages.
    6·1 answer
  • When parallel sections of oxygen and fuel gas hoses are taped together, only _____ inches out of 12 inches should be covered by
    8·2 answers
  • Which type of market are you in if your firm, along with three other firms, controls 95% of the total music industry?
    13·1 answer
  • A device has an IP address of 10.1.10.186 and a subnet mask of 255.255.255.0. What is true about the network on which this devic
    9·1 answer
  • While performing Before Operations PMCS, you notice the front right tire appears slightly underinflated. What is the proper acti
    11·1 answer
  • Its an HTML5 anyone kwons
    15·1 answer
  • Question 1
    10·1 answer
  • Several people work with data at Erica’s office. She enters data. One of her coworkers enters new product numbers. Another cowor
    5·1 answer
  • To configure a router/modem, what type of IP interface configuration should you apply to the computer you are using to access th
    10·1 answer
  • What type of degree do web masters tend to have?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!