Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default how many combinations in a list equal a certain total

I have a list of 479 rows. Column A is a product name, column B is cost. I
need to come up with every possible combination of pruducts that equals
$100.

For instance:
Product A $100
Product B $50
Product C $38.72
Product D $20
Product E $30
Product F $50

Possible answers a
A
B+D+E
B+F
F+E+D

Each Product can be used only once so B+B wouldn't work.

PLEASE PLEASE PLEASE help!

Sherrie


  #2   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default how many combinations in a list equal a certain total

Go to www.myweb.cableone.net/twodays
Download the "Find a numeric value" file.
--
Greeting from the Gulf Coast!
http://myweb.cableone.net/twodays
"Sherrie" wrote in message
...
I have a list of 479 rows. Column A is a product name, column B is cost. I
need to come up with every possible combination of pruducts that equals
$100.

For instance:
Product A $100
Product B $50
Product C $38.72
Product D $20
Product E $30
Product F $50

Possible answers a
A
B+D+E
B+F
F+E+D

Each Product can be used only once so B+B wouldn't work.

PLEASE PLEASE PLEASE help!

Sherrie




  #3   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default how many combinations in a list equal a certain total

Note that that will find one combination - not all combinations (unless the
file has been changed recently).

--
Regards,
Tom Ogilvy

"Jim" wrote in message
...
Go to www.myweb.cableone.net/twodays
Download the "Find a numeric value" file.
--
Greeting from the Gulf Coast!
http://myweb.cableone.net/twodays
"Sherrie" wrote in message
...
I have a list of 479 rows. Column A is a product name, column B is cost.

I
need to come up with every possible combination of pruducts that equals
$100.

For instance:
Product A $100
Product B $50
Product C $38.72
Product D $20
Product E $30
Product F $50

Possible answers a
A
B+D+E
B+F
F+E+D

Each Product can be used only once so B+B wouldn't work.

PLEASE PLEASE PLEASE help!

Sherrie






  #4   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default how many combinations in a list equal a certain total

The file will find *one* solution, which may not be the first or the best
and the solution cannot be narrowed by applying criteria. It is a really
simple file that is one possible solution.

--
Greeting from the Gulf Coast!
http://myweb.cableone.net/twodays
"Tom Ogilvy" wrote in message
...
Note that that will find one combination - not all combinations (unless

the
file has been changed recently).

--
Regards,
Tom Ogilvy

"Jim" wrote in message
...
Go to www.myweb.cableone.net/twodays
Download the "Find a numeric value" file.
--
Greeting from the Gulf Coast!
http://myweb.cableone.net/twodays
"Sherrie" wrote in message
...
I have a list of 479 rows. Column A is a product name, column B is

cost.
I
need to come up with every possible combination of pruducts that

equals
$100.

For instance:
Product A $100
Product B $50
Product C $38.72
Product D $20
Product E $30
Product F $50

Possible answers a
A
B+D+E
B+F
F+E+D

Each Product can be used only once so B+B wouldn't work.

PLEASE PLEASE PLEASE help!

Sherrie








  #5   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default how many combinations in a list equal a certain total

Is it possible to find ALL solutions? I'd need to be able to do that on a
daily basis for a list of 10 items.

"Jim" wrote in message
...
The file will find *one* solution, which may not be the first or the best
and the solution cannot be narrowed by applying criteria. It is a really
simple file that is one possible solution.

--
Greeting from the Gulf Coast!
http://myweb.cableone.net/twodays
"Tom Ogilvy" wrote in message
...
Note that that will find one combination - not all combinations (unless

the
file has been changed recently).

--
Regards,
Tom Ogilvy

"Jim" wrote in message
...
Go to www.myweb.cableone.net/twodays
Download the "Find a numeric value" file.
--
Greeting from the Gulf Coast!
http://myweb.cableone.net/twodays
"Sherrie" wrote in message
...
I have a list of 479 rows. Column A is a product name, column B is

cost.
I
need to come up with every possible combination of pruducts that

equals
$100.

For instance:
Product A $100
Product B $50
Product C $38.72
Product D $20
Product E $30
Product F $50

Possible answers a
A
B+D+E
B+F
F+E+D

Each Product can be used only once so B+B wouldn't work.

PLEASE PLEASE PLEASE help!

Sherrie












  #6   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default how many combinations in a list equal a certain total

There are 2^480 - 1 unique combinations to check. As a point of
comparison, there are only 8,640,000 seconds in 100 years (slightly larger
then 2^23) In otherwords, there isn't enough time to do an exhaustive
examination without even trying to look at the results.

You could come up with a list of Unique prices and reduce the number of rows
you need to examine. (so in your example, any solution that contains a B
could be another solution by replacing B with F)

Regards,
Tom Ogilvy


"Sherrie" wrote in message
...
I have a list of 479 rows. Column A is a product name, column B is cost. I
need to come up with every possible combination of pruducts that equals
$100.

For instance:
Product A $100
Product B $50
Product C $38.72
Product D $20
Product E $30
Product F $50

Possible answers a
A
B+D+E
B+F
F+E+D

Each Product can be used only once so B+B wouldn't work.

PLEASE PLEASE PLEASE help!

Sherrie




  #7   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default how many combinations in a list equal a certain total

Actually, there are quite a few more than 8,640,000 seconds in a hundred
years, but who's counting?! <g
60 seconds per minute, 60 minutes per hour, 24 hours per day, 365 (or so)
days per year.
=60*60*24*365*100
--
Greeting from the Gulf Coast!
http://myweb.cableone.net/twodays
"Tom Ogilvy" wrote in message
...
There are 2^480 - 1 unique combinations to check. As a point of
comparison, there are only 8,640,000 seconds in 100 years (slightly larger
then 2^23) In otherwords, there isn't enough time to do an exhaustive
examination without even trying to look at the results.

You could come up with a list of Unique prices and reduce the number of

rows
you need to examine. (so in your example, any solution that contains a B
could be another solution by replacing B with F)

Regards,
Tom Ogilvy


"Sherrie" wrote in message
...
I have a list of 479 rows. Column A is a product name, column B is cost.

I
need to come up with every possible combination of pruducts that equals
$100.

For instance:
Product A $100
Product B $50
Product C $38.72
Product D $20
Product E $30
Product F $50

Possible answers a
A
B+D+E
B+F
F+E+D

Each Product can be used only once so B+B wouldn't work.

PLEASE PLEASE PLEASE help!

Sherrie






  #8   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default how many combinations in a list equal a certain total

Damn, your right, I left out the 365 in my formula (doh) - none the less,
there still isn't enough time - but isn't life so much like that <g

--
Regards,
Tom Ogilvy

"Jim" wrote in message
...
Actually, there are quite a few more than 8,640,000 seconds in a hundred
years, but who's counting?! <g
60 seconds per minute, 60 minutes per hour, 24 hours per day, 365 (or so)
days per year.
=60*60*24*365*100
--
Greeting from the Gulf Coast!
http://myweb.cableone.net/twodays
"Tom Ogilvy" wrote in message
...
There are 2^480 - 1 unique combinations to check. As a point of
comparison, there are only 8,640,000 seconds in 100 years (slightly

larger
then 2^23) In otherwords, there isn't enough time to do an exhaustive
examination without even trying to look at the results.

You could come up with a list of Unique prices and reduce the number of

rows
you need to examine. (so in your example, any solution that contains a

B
could be another solution by replacing B with F)

Regards,
Tom Ogilvy


"Sherrie" wrote in message
...
I have a list of 479 rows. Column A is a product name, column B is

cost.
I
need to come up with every possible combination of pruducts that

equals
$100.

For instance:
Product A $100
Product B $50
Product C $38.72
Product D $20
Product E $30
Product F $50

Possible answers a
A
B+D+E
B+F
F+E+D

Each Product can be used only once so B+B wouldn't work.

PLEASE PLEASE PLEASE help!

Sherrie








  #9   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default how many combinations in a list equal a certain total

"Tom Ogilvy" wrote...
There are 2^480 - 1 unique combinations to check. As a point of
comparison, there are only 8,640,000 seconds in 100 years (slightly larger
then 2^23) . . .


Quibbles.

With 479 items, there are 2^479-1 combinations to check.

8,640,000 secons is 100 days, not years.

. . . In otherwords, there isn't enough time to do an exhaustive
examination without even trying to look at the results.

You could come up with a list of Unique prices and reduce the number of rows
you need to examine. (so in your example, any solution that contains a B
could be another solution by replacing B with F)


Add to those heuristics throwing out all individual items with prices over $100.
Also, for k = INT(100/MIN(PriceList)), k gives the largest cardinality
combinations that need to be checked. That means only 479 choose k combinations
to check. Still, this type of problem lacks practical means to achieve a
comprehensive solution.

--
Never attach files.
Snip unnecessary quoted text.
Never multipost (though crossposting is usually OK).
Don't change subject lines because it corrupts Google newsgroup archives.
  #10   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default how many combinations in a list equal a certain total

Quibbles.

With 479 items, there are 2^479-1 combinations to check.

Yes, don't know what I was thinking - thanks for the correction

8,640,000 secons is 100 days, not years.

Already admitted to that one

Have to think about your maximum combinations assertion - (not questioning
it) - thanks

--
Regards,
Tom Ogilvy

"Harlan Grove" wrote in message
...
"Tom Ogilvy" wrote...
There are 2^480 - 1 unique combinations to check. As a point of
comparison, there are only 8,640,000 seconds in 100 years (slightly

larger
then 2^23) . . .


Quibbles.

With 479 items, there are 2^479-1 combinations to check.

8,640,000 secons is 100 days, not years.

. . . In otherwords, there isn't enough time to do an exhaustive
examination without even trying to look at the results.

You could come up with a list of Unique prices and reduce the number of

rows
you need to examine. (so in your example, any solution that contains a B
could be another solution by replacing B with F)


Add to those heuristics throwing out all individual items with prices over

$100.
Also, for k = INT(100/MIN(PriceList)), k gives the largest cardinality
combinations that need to be checked. That means only 479 choose k

combinations
to check. Still, this type of problem lacks practical means to achieve a
comprehensive solution.

--
Never attach files.
Snip unnecessary quoted text.
Never multipost (though crossposting is usually OK).
Don't change subject lines because it corrupts Google newsgroup archives.





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sum up combinations of numbers from list to get specific total KMiles Excel Discussion (Misc queries) 3 May 15th 23 11:45 AM
Should grand total equal average of sub total Bonnie Excel Discussion (Misc queries) 2 January 20th 07 08:37 PM
Finding combinations to match a total Jack Sheet Excel Discussion (Misc queries) 2 January 21st 06 10:56 AM
Macro to add numbers to create combinations that equal certain amo Lauren qt314 Excel Discussion (Misc queries) 3 April 21st 05 05:57 PM
Find combinations of numbers to equal a value jubu Excel Worksheet Functions 1 March 18th 05 12:46 PM


All times are GMT +1. The time now is 04:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"