... Let An = {a, a2, ..., an} be a finite set of distinct coin types...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
... Let An = {a₁, a2, ..., an} be a finite set of distinct coin types (e.g., a₁= 50 cents, a2= 25 cents, a3= 10 cents etc.). We assume each a; is an integer and that a₁ > a₂ > . > an. Each type is available in unlimited quantity. The coin changing problem is to make up an exact amount C using a minimum total number of coins. C is an integer > 0. (a) Explain that if a, ‡ 1 then there exists a finite set of coin types and a C for which there is no solution to the coin changing problem. (b) When an = 1 a greedy solution to the problem will make change by using the coin types in the order a₁, a2, ..., an. When coin type a; is being considered, as many coins of this type as possible will be given. Write an algorithm based on this strategy. (c) Give a counterexample to show that the algorithm in (b) doesn't necessarily generate solutions that use the minimum total number of coins. (d) Show that if An = { k-1, k-2, kº } for some k > 1 then the greedy method in (b) always yields solutions with a minimum number of coins. ... Let An = {a₁, a2, ..., an} be a finite set of distinct coin types (e.g., a₁= 50 cents, a2= 25 cents, a3= 10 cents etc.). We assume each a; is an integer and that a₁ > a₂ > . > an. Each type is available in unlimited quantity. The coin changing problem is to make up an exact amount C using a minimum total number of coins. C is an integer > 0. (a) Explain that if a, ‡ 1 then there exists a finite set of coin types and a C for which there is no solution to the coin changing problem. (b) When an = 1 a greedy solution to the problem will make change by using the coin types in the order a₁, a2, ..., an. When coin type a; is being considered, as many coins of this type as possible will be given. Write an algorithm based on this strategy. (c) Give a counterexample to show that the algorithm in (b) doesn't necessarily generate solutions that use the minimum total number of coins. (d) Show that if An = { k-1, k-2, kº } for some k > 1 then the greedy method in (b) always yields solutions with a minimum number of coins.
Expert Answer:
Answer rating: 100% (QA)
a Explanation If an isnt 1 then there can be certain amounts C for which no combination of the coin types in set An would give a solution For example ... View the full answer
Related Book For
Discrete and Combinatorial Mathematics An Applied Introduction
ISBN: 978-0201726343
5th edition
Authors: Ralph P. Grimaldi
Posted Date:
Students also viewed these programming questions
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
List three specific parts of the Case Guide, Objectives and Strategy Section (See below) that you had the most difficulty understanding. Describe your current understanding of these parts. Provide...
-
1. a. b. C. d. e. MULTIPLE CHOICE The ratio percentage of earnings retained is the same as that termed: dividend yield dividend payout 2. a. b. C. d. e. UIBS C. d. e. 4. a. b. C. d. e. Class Work 1...
-
By how much should a pair of light rays from a common source differ in distance traveled to produce destructive interference?
-
If stem-cell research is restricted, then future cures will not materialize. If future cures do not materialize, then people will die prematurely. Therefore, if stem-cell research is restricted, then...
-
For symmetrical blading, the degree of reaction is _____.
-
During two recent years Perez Construction, Inc., disposed of the following plant and equipment: Required: 1. Determine the cash flow from the sale of property for each year that would be reported in...
-
An AVL tree is a binary search tree that is height balanced: for each node x, the heights of the left and right subtrees of x differ by at most 1. To implement an AVL tree, we maintain an extra...
-
Figure 2 shows the support structure for a suspended apparatus in a laboratory. The apparatus is hung from the 1/4" A36 plate that is welded to the 3/8" plate using E70XX electrodes. Assuming that...
-
what is the output of this algorithm? Print(Good morning) Print (please enter the 1st number) Read(Number1) Print (please enter the 2nd number) Read(Number2) If(Number1>Number2) Then Begin Print...
-
In September, ABC Company receives a special order for 38,000 machines at $162 each from a major coffee shop franchise. Acceptance of the order would result in $13,000 of shipping costs but no...
-
On 1 January 2023, Bob Teo set up Safe Pte Ltd to manufacture and sell face masks. He manages the company single-handedly and at the end of the year, he prepared the following income statement for...
-
Lin Corporation has a single product whose selling price is $ 1 3 6 per unit and whose variable expense is $ 6 8 per unit. The company s monthly fixed expense is $ 3 2 , 4 0 0 . Required: Calculate...
-
Laker Company reported the following January purchases and sales data for its only product. For specific identification, ending inventory consists of 2 7 0 units from the January 3 0 purchase, 5...
-
(10 pts) An overzealous physics student claims she can climbs an 9.5 - m vertical rope in 6s at a constant speed. What is her power output?
-
Futura Company purchases the 70,000 starters that it installs in its standard line of farm tractors from a supplier for the price of $11.70 per unit. Due to a reduction in output, the company now has...
-
Which provision could best be justified as encouraging small business? a. Ordinary loss allowed on $ 1244 stuck. b. Percentage depletion. c. Domestic production activates deductions. d. Interest...
-
Let if be the sample space for an experiment and let A, B be events from , where Pr(A) = 0.4, Pr(B) = 0.3, and Pr(A B) = 0.2. Determine Pr(), Pr(), Pr(A U B), Pr(A U ), and Pr( U B). Sf
-
Urn 1 contains 14 envelopes (of the same size) - six each contain $1 and the other eight each contain $5. Urn 2 contains eight envelopes (of the same size as those in urn 1) - three each contain $1...
-
One of the most common uses for the recursive definition of sets is to define the well-formed formulae in various mathematical systems. For example, in the study of logic we can define the...
-
The overall process of creating a capital budget proposal has a lot of similarities to writing a business plan for a start-up company. Describe three aspects of the similarities between a budget...
-
There are three general categories of capital budget scenarios: replacement, expansion, and investment in a NewCo. Describe the overall decision-making context for each. How do they draw on similar...
-
In analysis, some focus seems to be on the need for NPV equations to be applied to projects that are mutually exclusive. But in practice we find that the lines are blurred in capital budgeting....
Study smarter with the SolutionInn App