Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Implement Fibonacci Min-Heaps in your favorite language. Your program should take in a list of n integers. For every function of the Fibonacci min-heap (insert,

image text in transcribed

Implement Fibonacci Min-Heaps in your favorite language. Your program should take in a list of n integers. For every function of the Fibonacci min-heap (insert, extract-min, decrease- key*), print the min as well as a visualization of what the entire structure looks like. This can be as simple as printing a list of arrays, e. g. Min: 1, Fib-Heap: (2,5,7], [5], [11], [4,7,5,9,8,6,6], [1,2] or as pretty as you want to make it. The TAs will give 10 bonus points per section to the prettiest output. While we didn't go over decrease-key in class, it is straight-forward and in the book. For this assignment, strict Fibonacci is not necessary. Turn in a printout of a sample session that shows you: (a) Building a Fibonacci help using a random permutation of the numbers 1-40 (b) Extracting the min (c) Adding a 55 (d) Extracting the min again (e) Adding a 0 (f) Decreasing keys from the largest subtree (g) Extracting the min again Implement Fibonacci Min-Heaps in your favorite language. Your program should take in a list of n integers. For every function of the Fibonacci min-heap (insert, extract-min, decrease- key*), print the min as well as a visualization of what the entire structure looks like. This can be as simple as printing a list of arrays, e. g. Min: 1, Fib-Heap: (2,5,7], [5], [11], [4,7,5,9,8,6,6], [1,2] or as pretty as you want to make it. The TAs will give 10 bonus points per section to the prettiest output. While we didn't go over decrease-key in class, it is straight-forward and in the book. For this assignment, strict Fibonacci is not necessary. Turn in a printout of a sample session that shows you: (a) Building a Fibonacci help using a random permutation of the numbers 1-40 (b) Extracting the min (c) Adding a 55 (d) Extracting the min again (e) Adding a 0 (f) Decreasing keys from the largest subtree (g) Extracting the min again

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions