Question

In: Computer Science

Instructions: Answer the following questions. Submit your answers to questions 1-5 as a Rich Text Format...

Instructions:

Answer the following questions. Submit your answers to questions 1-5 as a Rich Text Format file (.rtf), Word document (.doc), or ASCII text file (.txt). For problem 6 submit an excel sheet containing your chart.

1. (12 points) State the order of magnitude for each of the following mathematical functions. (Hint: Find the dominant term and drop its coefficient)

  1. 5n2 + 105 nlogn
  2. 5n3 – 7n + 30
  3. (n2 / logn)+ 40000n + 1000
  4. (5n2 + 8n + 3n) / 7
  5. 5n + 6n!
  6. Log(logn) + logn

2. (12 points) Assume you have two algorithms, A and B, both of which perform the same function, although their implementations differ. Assume that algorithm A has a running time of O(N3 + 2N2 +6N +10) and algorithm B has a running time of O(6N2 + 3N +10 ). Also assume that the value of N is restricted to the set of Natural numbers i.e., {1, 2, 3, ...}. Answer the follow­ing questions:

  1. For what values of N Algorithm A is more efficient than algorithm B?

  1. For what values of N Algorithm B is more efficient than algorithm A?

  1. For what values of N might both algorithms be expected to operate with the same efficiency?

3. (8 points)Put the following growth-rate functions in order from the most efficient to the least efficient:

  1. 5000N!                     c. 106 N2
  2. 5N                          d. N3/logN
  3. 100NlogN

Solutions

Expert Solution


Related Solutions

Instructions: Answer the following questions. Submit your answers to questions 1-5 as a Rich Text Format...
Instructions: Answer the following questions. Submit your answers to questions 1-5 as a Rich Text Format file (.rtf), Word document (.doc), or ASCII text file (.txt). For problem 6 submit an excel sheet containing your chart. 4. (40 points) Determine the number of statement executions (precise big-Oh) for each of the following sample code, as described in the lecture. Your answers should be in the form of a Big-Oh polynomial (e.g., O(3N2 + 7N + 6)). Sample #1: for (int...
Read the following case study and answer the questions that follow. Submit your answers to this...
Read the following case study and answer the questions that follow. Submit your answers to this Dropbox. The Case of the Coughing Housewife Jessica, a fifty-nine year old mother of four, moved from a ranch in Colorado to Los Angeles, after the death of her husband, to be closer to her oldest son and his family. She has been in Los Angeles for 18 months and has noticed that she is experiencing shortness of breath which has worsened over the...
Instructions: Read the problemn and complete all the questions included below. Submit your answers on a...
Instructions: Read the problemn and complete all the questions included below. Submit your answers on a Word (.doc) or Excel (.xls) document Check the Rubric As a consultant for Acme Engineering you have been able to establish the following parameters from their Financial Statements: Item Amount Cash $200,000 Securities $90,000 Accounts Receivable $300,000 Inventories $400,000 Prepaid Expenses $16,000 Accounts Payable $630,000 Other Liabilities $180,000 Calculate the following parameters: Total Assets Total Liabilities Working Capital Current Ratio Acid Test Ratio
Read the article assigned for this week’s reading and answer the following questions. Submit your answers...
Read the article assigned for this week’s reading and answer the following questions. Submit your answers in an APA format summary. a. What is the definition of a medication error? b. What are "high-alert" medications? c. What abbreviations are dangerous? Are these evidence based? d. What drug names are frequently confused? e. How should tall man lettering be applied to differentiate look-alike/soundalike drug names?
Review the following scenario, and answer the questions. Create a Word document for your answers, submit...
Review the following scenario, and answer the questions. Create a Word document for your answers, submit via submission link. A 28-year-old primigravida at 41 weeks’ gestation is admitted to the L&D unit for early labor at 2 cm, 70% effaced, and 0 station. How can the nurse best describe to this patient the latent phase of labor? How will the cardinal movements of labor facilitate the birth of the fetus?
Answer the following questions and upload to Canvas. Submit in Word or PDF format.  Show your work...
Answer the following questions and upload to Canvas. Submit in Word or PDF format.  Show your work and upload the Excel sheet as well. All the writing parts must be your original writing, don't quote, write in your own words. The following table presents the orders of Samson Company for the last 36 months (3 years). Month Order Year 1 Order Year 2 Order Year 3 January 502 614 712 February 408 592 698 March 491 584 686 April 456 532...
Instructions: Answer any ONE of the following essay questions. Your response should be in essay format....
Instructions: Answer any ONE of the following essay questions. Your response should be in essay format. Write as much as possible telling me who, what, where, when, and why. Use complete sentences and multiple paragraphs; 3-5-7 total. Your response is worth up to 20 points. Discuss American foreign policy in the 1970s under President Richard Nixon. What was his strategy for the Cold War? Did he do things different or were his efforts similar to his predecessors? Was he successful,...
Answer the following questions and submit answers in Microsoft Word. Be sure to fully answer each...
Answer the following questions and submit answers in Microsoft Word. Be sure to fully answer each question. 1. Does a precedent system operate in your social group, at work or in making your personal decisions? Explain. 2. Burglar Bob breaks into Vince Victim’s house. Bob steals a flat screen television and laptop and does a significant amount of damage to the property before he leaves. Fortunately, Vince has a state-of-the-art security system. It captures excellent images of Bob, who is...
Please just submit text answers for questions a) b) and c) a) Use the “ls -lt...
Please just submit text answers for questions a) b) and c) a) Use the “ls -lt filesize2.c” command to see what the size is reported by OS for this file. In the file “filesize2.c”, the following code segment was originally commented out: Uncomment this block of code. /* fseek(fd, 10L, SEEK_SET); putc(-1, fd); rewind(fd); */ //try uncomment this block, to see what it does. b) Think about what this code segment does. c) Then compile and run the code with...
Answer the following questions and submit as a PDF on Webcourses. The assignment is worth 5%...
Answer the following questions and submit as a PDF on Webcourses. The assignment is worth 5% of your grade . For the TCP/IP model, describe 2 types of vulnerabilities commonly attacked for each layer. (40 points) Can two network interfaces have the same MAC address? Why or why not? Also, can two network interfaces have the same IP address? Why or why not? (10 points) Most modern TCP implementations use pseudo-random number generators (PRNG) to determine starting sequence numbers for...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT