Fund. Algorithm Design and Analysis Takehome Quiz 1As mentioned in the syllabus, we have 6 short takehome assignments (I called them takehome quizzes in the syllabus). For each one of these...

1 answer below »
Fund. Algorithm Design and Analysis Takehome Quiz 1As mentioned in the syllabus, we have 6 short takehome assignments (I called them takehome quizzes in the syllabus). For each one of these assignments there will be two parts for you to complete. Each takehome quiz is 5% of your total grade.In Part-A, you will have to write short descriptions for the given concepts;In Part-B, you will solve a problem that might involve writing short computer programs/scripts.You have to submit your work on Blackboard by Sunday 11:59pm.When submitting the document, make sure you include all the answers in a single file (such as MSWord) and use the following filename format:YourFullName_TakehomeQuiz1.doc
Part-A:In a few sentences:What is an algorithm? (25 pts)What algorithms and data structures do you think you would need most if you worked for Facebook? (25 pts)
Part-B:Chapter 1, Slide 3, Euclid’s algorithm finds the gcd of two numbers m and n. See the program at: https://colab.research.google.com/drive/1oQddnPfkVozHvriqotuZD2yE5BuoFQHY?usp=sharingIn this Part-B, run the program that plots the runtime of the Euclid's algorithm (the one with the while loop on Page 3 of the slides) as follows:
1. Randomly pick a positive random integers m and n2. Start the timer3. Run Euclid's algorithm4. Stop the timer and compute the elapsed time t5. Compute the input size of the input as s = log2(n)+log2(m) The reason we do that is as explained in class, we measure time complexity as a function of the size of the input.Repeat Steps 1 to 5 for a large number of time (say 1000 times) populate the s and t values for each run and then display the plot of s versus t.If we replace the Euclid’s algorithm with the Bad (slow) algorithm, the plot curves up quickly. Briefly discuss what you learn from this exercise. (50 pts)
Answered Same DayAug 27, 2021

Answer To: Fund. Algorithm Design and Analysis Takehome Quiz 1As mentioned in the syllabus, we have 6 short...

Swapnil answered on Aug 28 2021
146 Votes
Part-A:
    A
    Algorithm is a step by step procedure to solve a computational problem. Generally, alg
orithms play a key role in software problems solving. Some are like binary heap it is data structure used to store tasks in priority and in binary tree structure. Insertions and deletions are easy to perform. So using algorithms we can analyse programmes it time complexity and space complexity. Shortest path finding we use travelling sales man algorithms. Prims and kruskals algorithm for graph data structures. Knapsack algorithms for greedy problems. There are plenty of algorithms over there to speed up the computing tasks.
    B
    Graph data structures are more useful in Facebook friend recommendations. Facebook data analysis and finding...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here