Efficient algorithm?
- From: "Ez_Alg" <virtualrealtor@xxxxxxxxx>
- Date: 18 Mar 2007 19:12:51 -0700
Given an unlimited supply of coins of denominations x1; x2; : : : ;
xn, we wish to make change for a value v using at most k coins; that
is, we wish to find a set of k coins whose total value is v.
This might not be possible: for instance, if the denominations are 5
and 10 and k = 6, then we can make change for 55 but not for 65. what
is an efficient dynamic-programming algorithm for the following
problem.
Input: x1; : : : ; xn; k; v.
Question: Is it possible to make change for v using at most k coins,
of denominations x1; : : : ; xn?
any help would be appriciated.
.
- Follow-Ups:
- Re: Efficient algorithm?
- From: Mitch
- Re: Efficient algorithm?
- From: Googmeister
- Re: Efficient algorithm?
- Prev by Date: Intractability Problem (reduction form 3SAT)
- Next by Date: Re: "compilation" and "semantics" difference between RPC and ordinary procedure call
- Previous by thread: Intractability Problem (reduction form 3SAT)
- Next by thread: Re: Efficient algorithm?
- Index(es):