Question & Answer: a) Suppose that it takes 0.004 seconds to run a program on a te sot of size n 20o. Assume that the number of items in the actual da t α sot is 4000…..

Hi i need help some of the questions. Make sure you read the instructions before answering each question. And I want it to be typed up. Please do not handwritten it. I want it to be typed up. And please do all the problems that I assign. If you do not do all the problem that I assign. If you don’t do all the problems that I assign then do not mind answering the question. Becuse I am running out of questions and my homework is going to be due tomorrow. So I need all the questions answered that I assign to you. And please give me a little explanation how you arrived with your answer. Thank you.
a) Suppose that it takes 0.004 seconds to run a program on a te sot of size n 20o. Assume that the number of items in the actual da t α sot is 4000 , hat would be the oxpec ted run-time (show your work) if the program is applied to the actual data set and the under lying algorithn ist 5 Assume that it takes 0.0012 seconds to run a program on a teot data of size n = 50 Assume that the number of items in the actual ata set is 80,000. What would be the expooted run-time (show your work) if the proor am is applied to the actual data set and the underlying algor ithm isi a. OCn) b. o(n) 6. Assume that an algorithm consists of two parte, one part is on and the other i o(n). What is the 8ig-0 run-time for the entire algorithm ? 7. The Paradox of Speed: Suppose that computers become 16 times faster. If the same amount of computer time is to be used, how müch can the data set size be increased if the underlying algorithm is: 2 a. O( n) b. o(n ) e. Determine the answer and explain why it is the answer: a. O( n) ( n) b. O( n) +O(n c. O log n) o(n) ? 2 I need help with question 4 letters A AND B. And question number 8 letters A,B AND C.
media%2F6e3%2F6e3e75d2-18ff-4fb0-aac1-16I need help with question 4 letters A,B,C AND ALSO D
media%2Fd01%2Fd0138a04-b7ce-4ec2-ac80-92With data types and data structures I need help with question 4 and with abstract data type I need help with questions 2 and 3. Please make your answer short. Do not make your answer long. Try to make it short.
Thank you very much, I appreciate it

a) Suppose that it takes 0.004 seconds to run a program on a te sot of size n 20o. Assume that the number of items in the actual da t α sot is 4000 , “hat would be the oxpec ted run-time (show your work) if the program is applied to the actual data set and the under lying algorithn ist 5 Assume that it takes 0.0012 seconds to run a program on a teot data of size n = 50 Assume that the number of items in the actual ata set is 80,000. What would be the expooted run-time (show your work) if the proor am is applied to the actual data set and the underlying algor ithm isi a. OCn) b. o(n) 6. Assume that an algorithm consists of two parte, one part is on and the other i o(n). What is the 8ig-0 run-time for the entire algorithm ? 7. The Paradox of Speed: Suppose that computers become 16 times faster. If the same amount of computer time is to be used, how müch can the data set size be increased if the underlying algorithm is: 2 a. O( n) b. o(n ) e. Determine the answer and explain why it is the answer: a. O( n) ( n) b. O( n) +O(n c. O log n) o(n) ? 2

Expert Answer

 

8
O(n) + O(n) = O(n)
O(n) + O(n^2) = O(n^2)
O(logn) + O(n) = O(n)

4
for O(n)
for 200 inputs time = 0.004 sec
for 4000inputs time = 0.08 sec (linear 0.004/200 * 4000)

for O(n^2)
for 200 inputs time = 0.004 sec
for 4000inputs time = 1.6 sec (linear 0.004/200^2 * 4000^2)

4.
for 100 inputs time = 0.002 sec
for 10000inputs time = 0.002 sec (O(1))
for 10000inputs time = 0.2 sec(O(n))
for 10000inputs time = 20 sec (O(n^2))
for 10000inpits time = 0.004 (O(logn)) 0.002 / log(100) * log(1000)

ADT
2. Encapsulation refers to data hiding. In encapsulation, the variables of a class will be hidden from other classes, and can be accessed only through the methods of their current class.
3.Implementaion of ADT reffers to creation of real usecase using the ADT. For example we can use Node ADT to create binary tree etc

Still stressed from student homework?
Get quality assistance from academic writers!