Provide a greedy algorithmfor making change of n units

Assignment Help Data Structure & Algorithms
Reference no: EM13850707

Question:

In the United States, coins are minted with denominations of 1,5,10,25, and cents. Now consider a country whose coins are minted with denominations of fd1; :::; dkg units. They seek an algorithm that will enable them to make change of n units using the minimum number of coins.

a) The greedy algorithm for making change repeatedly uses the biggest coin smaller than the amount to be changed until it is zero. Provide a greedy algorithmfor making change of n units using US denominations. Prove its correctness and analyze its time complexity.

b) Show that the greedy algorithm does not always give the minimum number of coins in a country whose denominations are f1; 6; 10g.

c) Give an efficient algorithm that correctly determines the minimum number of coins needed to make change of n units using denominations fd1; :::; dkg. Analyze its running time.

Reference no: EM13850707

Questions Cloud

Bond surrogate-compare these exercises to annuity-perpetuity : Choice Properties REIT equity is a candidate for a “bond surrogate” because it pays a stable dividend supported by collecting rent on grocery stores. What is the current dividend (per share) of Choice Properties REIT? How often do they pay? Compare t..
About the relative attractiveness : Max Colvin has equally attractive job offers in Miami and Los Angeles. The rent ratios in the cities are 8 and 20, respectively. Max would really like to buy rather than rent a home after he moves. Explain how to interpret the rent ratio and what it ..
Leverage and eps : (Leverage and EPS) You have developed the following pro forma income statement for your corporation: Sales $45,703,000. Variable costs (22,716,000). Revenue before fixed costs $22,987,000. Fixed costs(9,182,000). If sales should decrease by 30 percen..
Conducting and analyzing statistical tests : Examine the relationship between student anxiety for an exam and the number of hours studied - Conducting and Analyzing Statistical Tests
Provide a greedy algorithmfor making change of n units : Provide a greedy algorithmfor making change of n units using US denominations. Prove its correctness and analyze its time complexity.
Perform an internet search for low-cost provider : Perform an Internet search for "low-cost provider." Identify three (3) companies that are pursuing a low-cost strategy in their respective industries, and briefly explain how these firms achieve competitive advantage
The carrier frequency : The output voltage of an AM transmitter is given by 500(1+.4sin3140t)sin6.28x107t. This voltage is fed to a load of 800 ohms. Determine the following. The carrier frequency The modulating frequency
What do you think googles rationale was for starting books : What do you think Google's rationale was for starting its Google Books library Project? Of all the issues discussed in this case, which issue is the most disconcerting to you. Why?
Identify the strengths and weakness of the nist programs : Compare the ISO/IEC 27001 outline with the NIST documents discussed in this chapter. Which areas, if any, are missing from the NIST documents? Identify the strengths and weakness of the NIST programs compared to the ISO standard.

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  How do these control lines actually become asserted

The ALU has various control lines that determine which operation to perform - "How do these control lines actually become asserted?"

  Doubly linked list

Write a class that maintains the top 10 scores for a game application, implementing the add and remove methods but using a doubly linked list instead of an array. Program has to be written in java

  Draw a diagram of how the stacks might look

Two stacks of positive integers are needed, both containing integers with values less than or equal to 1000. One stack contains even integers; the other contains odd integers.

  Define how to building a binary search tree

Three of these operations (all but add) must visit every node in the tree. One of these must use preorder traversal, one must use inorder traversal, and one must use postorder traversal.

  Creating database for charity event

Your Project is to organize a charity event. You must use at least two events, one of which must be a Windows program such as Word, WordPad, or Paint.

  System analyst

A huge, well regarded supplier of key raw materials to your corporation's production process requires a year-end summary report of totals purchased from it.

  Design and write the client and server programs

Each client requests multiple CPU and I/O bursts from the keyboard. This information and the private FIFO are sent to the server through a common FIFO. The server responds to each client using private FIFOs.

  Your final project is a script which performs a fundamental

your final project will utilize many of the various skills that you have learned throughout this course. the final

  Using channel to implement the back up

Think about an organization, which has a rented communications channel in two buildings, building A and building B. They have a set of servers in building A,

  Calculate the total weights and values of each subset

Use the decrease-by-one technique to generate the power set and calculate the total weights and values of each subset, then find the largest value that fits into the knapsack and output that value.

  To program using the functional programming paradigm

A function (addBinary binaryList) that takes a list of binary numbers and returns their decimal sum. (addBinary '(1101 111 10 101)) returns 27.

  Computing available storage space

There are twenty gigabyte of space on a computer's hard disk. I transfer information via a telephone line (connection) at the rate of 14,400 bits per second.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd