Your Perfect Assignment is Just a Click Away
We Write Custom Academic Papers

100% Original, Plagiarism Free, Customized to your instructions!

glass
pen
clip
papers
heaphones

COSC 5313 Analysis of Algorithms

COSC 5313 Analysis of Algorithms

COSC 5313 Analysis of Algorithms

Assignment 9

Due: 23:59:00pm, 11/09/2020 (Monday)

1. (30 points) Please use a greedy algorithm to solve the following change problem. Is your solution optimal?

To make $19.99 use the fewest US bills and coins.

2. (40 points) Consider the 8*8 image below, please create the Huffman code tree and show the Huffman

code for each value. Please compute the compression ratio assuming that each value needs 3 bits using

fixed-length code before Huffman compression. Please show detailed steps for full credits.

(Hint: calculate the frequency for each number in the image, and then apply Huffman coding)

3. (30 points) A good way to pick pivot for QUICKSORT is ‘Median of three elements’. Assume an input

array has n elements with indexes from 1 to n. PARTITION function uses the median of the following

THREE elements as the pivot: the first element, the last element, and the element with index

floor((1+n)/2). (floor(A) function returns the greatest integer that is less than or equal to A)

Please sort the array below using QUICKSORT with the pivots found by ‘Median of three elements’

(Please show all iterations to get the final sorted array).

[65 28 75 60 32 45 90 95]

Order Solution Now

Our Service Charter

1. Professional & Expert Writers: Nurse Papers only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Nurse Papers are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Nurse Papers is known for timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Nurse Papers , we have put in place a team of experts who answer to all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.