You are not logged in.
login | register

Discussion: All Topics
Topic: optimization problem... Need help...

Post a new topic to the General Discussion on Mathematica discussion
<< see all messages in this topic
     next message >

Subject:   optimization problem... Need help...
Author: Estelle001
Date: Jul 7 2006
Hi there!

I have a problem.... I need to solve a quite difficult mathematical problem (to
me anyhow). I've been browsing the web for quite some hours now and still am
puzzeled how to solve this problem (would like to create a php program for this)
or to find the mathematical solution. I've read about the knapsack problem, but
I'm not sure I'm on the right track as my problem has no "weight" (I think...

So, this is my challenge:
I have an unlimited number of coins, let's hypothetically say with value 5, 7,
10, 15, 25 and 50 (let's suppose this would exist in USD).
I want to fill my purse with a number of coins and the total value should be for
example 71 USD with that restriction that I want 12 coins in my purse or a
number of coins as close to 12. If 71 can not be composed with 12 coins, I need
to find the combination of coins as close to 71 (but not higher !) with a number
of coins as close to 12 (slightly below or slightly above).

Hm, even formulating the problem is not easy. I hope you understand the problem.
Is this a knapsack problem??? Or should I look in another direction? Can s.o.
give me a clue how to solve this? Even better.. If anyone would know a php
program (or java or so) for it, that would be GREAT!? or the formula...

Maybe this problem is easier to you than to me (hope so).
thans to all !

Reply to this message          Quote this message when replying?
yes  no
Post a new topic to the General Discussion on Mathematica discussion
Visit related discussions:

Discussion Help