Looking for ANALISIS Y DISENO DE ALGORITMOS test answers and solutions? Browse our comprehensive collection of verified answers for ANALISIS Y DISENO DE ALGORITMOS at online.upr.edu.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
In this part of the project, the student must submit a PDF document answering the followin questions:
What did you learn about:
The document must :
Compare:
Algorithms
Consider a dynamically-sized array to which we append items. It starts with capacity 1, and doubles its capacity whenever it becomes full. Suppose the cost of inserting an item is ๐(1), and the cost of doubling from ๐ to 2๐ is ๐(m) .
Let the potential function be:ย \phi = 2*n - capacity , where n are the items in the array at that moment in time.
What is the Amortized Cost for the operations?
An operating system has a Priority Queue implemented that when there are resources available takes a task from the queue and executes it.ย The priority queue is based on the priorities assigned to each task.ย If you decide to build a heap for the below task list, what will be the correct heap from the list below?ย ย
Assume the smallest number in the task priority means it has the higher priority.
| Task | Priority |
|---|---|
| 1 | 30 |
| 2 | 25 |
| 3 | 8 |
| 4 | 42 |
| 5 | 17 |
| 6 | 33 |
A Binomial Heap maintains a pointer to the minimum element in the heap.
Consider a dynamically-sized array to which we append items. It starts with capacity 1, and doubles its capacity whenever it becomes full. Suppose the cost of inserting an item is ๐(1), and the cost of doubling from ๐ to 2๐ is ๐(m) .
Let the potential function be:ย ฯ=2โnโcapacityฯ=2โnโcapacity \phi = 2*n - capacity , where n are the items in the array at that moment in time.
What is the Amortized Cost for the operations?
Which imbalances were found when inserting these keys on an empty AVL tree?:ย ย
Keys: 48, 22, 27, 23, 12, 42
Using the cycle detection algorithm discussed in the class videos, what will be the resulting non-cycle version for the below graphย assuming we want to minimize the overall weights?
Optional: Attach exam procedures in case you may want to get partial points if you get an answer wrong.
A Binomial Heap contains 3 binomial trees of degrees 11, 7, and 2.ย How many elements does the heap contain?ย
You need to insert the following keys into a Red Black balanced tree:ย [7, 45, 12, 3, 94, 64, 43, 79].ย After all the keys are inserted, which specific rotations were performed during the insertion process?ย Remember, rotations are performed when double red violations are encountered.