Question

a) Suppose that computer A executes 1 billion instructions per second, and computer B executes 10...

a) Suppose that computer A executes 1 billion instructions per second, and computer B executes 10 million instructions per second, i.e, Computer A is 100 times faster than computer B in raw computing power. Suppose an expert programmer implements insertion sort in machine language for computer A, and the resulting code requires 2 * n2 instructions to sort n numbers. Suppose an average programmer implements merge sort, using a high-level language on computer B, with the resulting code taking 5 * n *log2n instruction. How long does computer A and computer B take to sort 10 million numbers respectively?

b) For each of the following functions, either f (n) is in O(g(n)), f (n) is in Ω(g(n)), or f (n) is in Θ(g(n)). For each pair shown in the following table, determine which relationship is correct:

f(n)

g(n)

Relationship f (n) = ____ g(n)

Logn2

logn + 5

nlogn + n

logn

log2n

logn

10

log10

2n

10n2

2n

3n

Table 1: Relationship of pair of functions.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

instaue Honssecond сomputed A s instuctins sec computes В sec ond Cinser tion sost)= Оn A 222instuehons fok Питьers ) - 1о 2f

Add a comment
Know the answer?
Add Answer to:
a) Suppose that computer A executes 1 billion instructions per second, and computer B executes 10...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT