Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Turning a Sequence into a List?
Replies: 4   Last Post: Apr 25, 2013 2:51 AM

 Messages: [ Previous | Next ]
 Dana DeLouis Posts: 24 Registered: 11/18/12
Re: Turning a Sequence into a List?
Posted: Apr 25, 2013 2:51 AM

On Tuesday, April 16, 2013 12:34:27 AM UTC-4, Rob wrote:
> Hello, I'm playing with a problem with minimum coins to make change.
>
> Here's a problem spot where I look at ways to make up 52 and 53 cents
>
> (later I'll use v = Range[1,99].
>
> v=Range[52,53];
>
> sol=(Reduce[25q+10d+5n+p==# &&0<=p<5 &&0<=n<2 &&0<=d<3
>
> &&0<=q<4,{q,d,n,p},Integers])& /@v
>
> (* which gives {(q == 1 && d == 2 && n == 1 && p == 2) || (q == 2 && d
>
> == 0 &&
>
> n == 0 && p == 2), (q == 1 && d == 2 && n == 1 &&
>
> p == 3) || (q == 2 && d == 0 && n == 0 && p == 3)} *)
>

< snip>

Hello. Does this idea help?

coins={p,n,d,q};

{4,{p->2,n->0,d->0,q->2}}

{5,{p->3,n->0,d->0,q->2}}

As a side note, there are 49 ways to make 52 with the given coins.

equ=1/((1-x) (1-x^5) (1-x^10) (1-x^25) );

SeriesCoefficient[equ,{x,0,52}]
49

= = = = = = =
HTH :>)
Dana DeLouis
Mac & Math 9

Date Subject Author
4/16/13 Bob Hanlon
4/18/13 Alexei Boulbitch
4/19/13 debguy
4/25/13 Dana DeLouis