Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Combination question

This is shameless I know, but I'm stuck with my daughter's homework
question. Here's the question -

"Nine eggs numbered 1 to 9. Put the nine eggs into three baskets. The total
of the numbers on the eggs in each basket must be the same. How many
different ways are there to do it?"

As it's not stated to the contrary, I assume each basket can contain any
number of eggs, though each basket must contain at least one egg and hence a
maximum of seven eggs.

No doubt can be solved with VBA, but here's the rub - this is for a twelve
year! There's got to be a catch ?

Anyone interested in a virtual merit...

Regards,
Peter T


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Combination question





4




--
Gary''s Student - gsnu200715


"Peter T" wrote:

This is shameless I know, but I'm stuck with my daughter's homework
question. Here's the question -

"Nine eggs numbered 1 to 9. Put the nine eggs into three baskets. The total
of the numbers on the eggs in each basket must be the same. How many
different ways are there to do it?"

As it's not stated to the contrary, I assume each basket can contain any
number of eggs, though each basket must contain at least one egg and hence a
maximum of seven eggs.

No doubt can be solved with VBA, but here's the rub - this is for a twelve
year! There's got to be a catch ?

Anyone interested in a virtual merit...

Regards,
Peter T



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,393
Default Combination question

Peter,
Not to be a grump on such a sunny day (in Nova Scotia) but you are depriving
daughter of a chance of discovering the fun of math! Let her look at this
and see if she can find more. Give her 9 pieces of paper with digits 1 thru
9, and three plates. Then go play golf.

sum Any three of these ways
5 5 4+1 2+3 1
6 6 5+1 4+2 1
7 7 6+1 5+2 4+3 4
8 8 7+1 6+2 5+3 4
9 9 8+1 7+2 6+3 5+4 10
10 9+1 8+2 6+4 1
10 9+1 6+4 5+3+2 1
11 9+2 8+3 7+4 6+5 4
12 9+3 8+4 7+5 6+4+2 4
13 9+4 8+5 7+6 7+3+2+1 4
14 9+5 8+6 7+4+3 7+4+2+1 4
15 9+6 8+7 1+2+3+4+5 1

best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Peter T" <peter_t@discussions wrote in message
...
This is shameless I know, but I'm stuck with my daughter's homework
question. Here's the question -

"Nine eggs numbered 1 to 9. Put the nine eggs into three baskets. The
total
of the numbers on the eggs in each basket must be the same. How many
different ways are there to do it?"

As it's not stated to the contrary, I assume each basket can contain any
number of eggs, though each basket must contain at least one egg and hence
a
maximum of seven eggs.

No doubt can be solved with VBA, but here's the rub - this is for a twelve
year! There's got to be a catch ?

Anyone interested in a virtual merit...

Regards,
Peter T




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Combination question

Thanks, Bernard,

Previously shameless, now shamed! On all counts, abuse of the group,
depriving my daughter of the 'fun of maths', and (worryingly) not seeing the
obvious.

Well, it's been a beautiful sunny and unseasonably warm day here too (in the
UK). I'll blame my aberration on that, too much golf, and global warming!

Thanks also Gary''s Student.

Regards,
Peter T

"Bernard Liengme" wrote in message
...
Peter,
Not to be a grump on such a sunny day (in Nova Scotia) but you are

depriving
daughter of a chance of discovering the fun of math! Let her look at this
and see if she can find more. Give her 9 pieces of paper with digits 1

thru
9, and three plates. Then go play golf.

sum Any three of these ways
5 5 4+1 2+3 1
6 6 5+1 4+2 1
7 7 6+1 5+2 4+3 4
8 8 7+1 6+2 5+3 4
9 9 8+1 7+2 6+3 5+4 10
10 9+1 8+2 6+4 1
10 9+1 6+4 5+3+2 1
11 9+2 8+3 7+4 6+5 4
12 9+3 8+4 7+5 6+4+2 4
13 9+4 8+5 7+6 7+3+2+1 4
14 9+5 8+6 7+4+3 7+4+2+1 4
15 9+6 8+7 1+2+3+4+5 1

best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Peter T" <peter_t@discussions wrote in message
...
This is shameless I know, but I'm stuck with my daughter's homework
question. Here's the question -

"Nine eggs numbered 1 to 9. Put the nine eggs into three baskets. The
total
of the numbers on the eggs in each basket must be the same. How many
different ways are there to do it?"

As it's not stated to the contrary, I assume each basket can contain any
number of eggs, though each basket must contain at least one egg and

hence
a
maximum of seven eggs.

No doubt can be solved with VBA, but here's the rub - this is for a

twelve
year! There's got to be a catch ?

Anyone interested in a virtual merit...

Regards,
Peter T






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 947
Default Combination question

Hmmm. They all sum to 15.

Select[KSetPartitions[r,3], Equal@@Total/@#1 &]

{{1,5,9},{2,6,7},{3,4,8}},
{{1,5,9},{2,3,4,6},{7,8}},
{{1,6,8},{2,4,9},{3,5,7}},
{{1,2,3,9},{4,5,6},{7,8}},
{{1,2,4,8},{3,5,7},{6,9}},
{{1,2,5,7},{3,4,8},{6,9}},
{{1,3,4,7},{2,5,8},{6,9}},
{{1,3,5,6},{2,4,9},{7,8}},
{{1,2,3,4,5},{6,9},{7,8}}

(Math Program)
--
Dana DeLouis

"Bernard Liengme" wrote in message
...
Peter,
Not to be a grump on such a sunny day (in Nova Scotia) but you are
depriving daughter of a chance of discovering the fun of math! Let her
look at this and see if she can find more. Give her 9 pieces of paper with
digits 1 thru 9, and three plates. Then go play golf.

sum Any three of these ways
5 5 4+1 2+3 1
6 6 5+1 4+2 1
7 7 6+1 5+2 4+3 4
8 8 7+1 6+2 5+3 4
9 9 8+1 7+2 6+3 5+4 10
10 9+1 8+2 6+4 1
10 9+1 6+4 5+3+2 1
11 9+2 8+3 7+4 6+5 4
12 9+3 8+4 7+5 6+4+2 4
13 9+4 8+5 7+6 7+3+2+1 4
14 9+5 8+6 7+4+3 7+4+2+1 4
15 9+6 8+7 1+2+3+4+5 1

best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Peter T" <peter_t@discussions wrote in message
...
This is shameless I know, but I'm stuck with my daughter's homework
question. Here's the question -

"Nine eggs numbered 1 to 9. Put the nine eggs into three baskets. The
total
of the numbers on the eggs in each basket must be the same. How many
different ways are there to do it?"

As it's not stated to the contrary, I assume each basket can contain any
number of eggs, though each basket must contain at least one egg and
hence a
maximum of seven eggs.

No doubt can be solved with VBA, but here's the rub - this is for a
twelve
year! There's got to be a catch ?

Anyone interested in a virtual merit...

Regards,
Peter T








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Combination question

She got the 15's with Bernard's approach, but only six of them. A small
correction to be done before it's handed in in the morning, thanks to you!

I wonder if there's not another way to get that solution without resort to
bits of paper on plates, 'Math Program' or VBA. It's back to school for me I
think <g

Regards,
Peter T

PS to Bernard

I showed your reply to my daughter, this bit -
"a chance of discovering the fun of math!"
- got a very loud "huh" !


"Dana DeLouis" wrote in message
...
Hmmm. They all sum to 15.

Select[KSetPartitions[r,3], Equal@@Total/@#1 &]

{{1,5,9},{2,6,7},{3,4,8}},
{{1,5,9},{2,3,4,6},{7,8}},
{{1,6,8},{2,4,9},{3,5,7}},
{{1,2,3,9},{4,5,6},{7,8}},
{{1,2,4,8},{3,5,7},{6,9}},
{{1,2,5,7},{3,4,8},{6,9}},
{{1,3,4,7},{2,5,8},{6,9}},
{{1,3,5,6},{2,4,9},{7,8}},
{{1,2,3,4,5},{6,9},{7,8}}

(Math Program)
--
Dana DeLouis

"Bernard Liengme" wrote in message
...
Peter,
Not to be a grump on such a sunny day (in Nova Scotia) but you are
depriving daughter of a chance of discovering the fun of math! Let her
look at this and see if she can find more. Give her 9 pieces of paper

with
digits 1 thru 9, and three plates. Then go play golf.

sum Any three of these ways
5 5 4+1 2+3 1
6 6 5+1 4+2 1
7 7 6+1 5+2 4+3 4
8 8 7+1 6+2 5+3 4
9 9 8+1 7+2 6+3 5+4 10
10 9+1 8+2 6+4 1
10 9+1 6+4 5+3+2 1
11 9+2 8+3 7+4 6+5 4
12 9+3 8+4 7+5 6+4+2 4
13 9+4 8+5 7+6 7+3+2+1 4
14 9+5 8+6 7+4+3 7+4+2+1 4
15 9+6 8+7 1+2+3+4+5 1

best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Peter T" <peter_t@discussions wrote in message
...
This is shameless I know, but I'm stuck with my daughter's homework
question. Here's the question -

"Nine eggs numbered 1 to 9. Put the nine eggs into three baskets. The
total
of the numbers on the eggs in each basket must be the same. How many
different ways are there to do it?"

As it's not stated to the contrary, I assume each basket can contain

any
number of eggs, though each basket must contain at least one egg and
hence a
maximum of seven eggs.

No doubt can be solved with VBA, but here's the rub - this is for a
twelve
year! There's got to be a catch ?

Anyone interested in a virtual merit...

Regards,
Peter T








  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 947
Default Combination question

I wonder if there's not another way to get that solution

If you want the total # of solutions in order to check an algorithm,
then under //Check in both programs pulled up A112972

http://www.research.att.com/~njas/sequences/A112972

ie when n=9, there should be 9 solutions.
--
HTH :)
Dana DeLouis
Windows XP & Office 2007


"Peter T" <peter_t@discussions wrote in message
...
She got the 15's with Bernard's approach, but only six of them. A small
correction to be done before it's handed in in the morning, thanks to you!

I wonder if there's not another way to get that solution without resort to
bits of paper on plates, 'Math Program' or VBA. It's back to school for me
I
think <g

Regards,
Peter T

PS to Bernard

I showed your reply to my daughter, this bit -
"a chance of discovering the fun of math!"
- got a very loud "huh" !


"Dana DeLouis" wrote in message
...
Hmmm. They all sum to 15.

Select[KSetPartitions[r,3], Equal@@Total/@#1 &]

{{1,5,9},{2,6,7},{3,4,8}},
{{1,5,9},{2,3,4,6},{7,8}},
{{1,6,8},{2,4,9},{3,5,7}},
{{1,2,3,9},{4,5,6},{7,8}},
{{1,2,4,8},{3,5,7},{6,9}},
{{1,2,5,7},{3,4,8},{6,9}},
{{1,3,4,7},{2,5,8},{6,9}},
{{1,3,5,6},{2,4,9},{7,8}},
{{1,2,3,4,5},{6,9},{7,8}}

(Math Program)
--
Dana DeLouis

"Bernard Liengme" wrote in message
...
Peter,
Not to be a grump on such a sunny day (in Nova Scotia) but you are
depriving daughter of a chance of discovering the fun of math! Let her
look at this and see if she can find more. Give her 9 pieces of paper

with
digits 1 thru 9, and three plates. Then go play golf.

sum Any three of these ways
5 5 4+1 2+3 1
6 6 5+1 4+2 1
7 7 6+1 5+2 4+3 4
8 8 7+1 6+2 5+3 4
9 9 8+1 7+2 6+3 5+4 10
10 9+1 8+2 6+4 1
10 9+1 6+4 5+3+2 1
11 9+2 8+3 7+4 6+5 4
12 9+3 8+4 7+5 6+4+2 4
13 9+4 8+5 7+6 7+3+2+1 4
14 9+5 8+6 7+4+3 7+4+2+1 4
15 9+6 8+7 1+2+3+4+5 1

best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Peter T" <peter_t@discussions wrote in message
...
This is shameless I know, but I'm stuck with my daughter's homework
question. Here's the question -

"Nine eggs numbered 1 to 9. Put the nine eggs into three baskets. The
total
of the numbers on the eggs in each basket must be the same. How many
different ways are there to do it?"

As it's not stated to the contrary, I assume each basket can contain

any
number of eggs, though each basket must contain at least one egg and
hence a
maximum of seven eggs.

No doubt can be solved with VBA, but here's the rub - this is for a
twelve
year! There's got to be a catch ?

Anyone interested in a virtual merit...

Regards,
Peter T










  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Combination question

Hi Dana,

An interesting link, thanks.

From what I gather quite a few dad's got roped into helping with this one!

FWIW, the other related homework questions had 'think out of the box' type
solutions which, perversely, threw me on this one!

Regards,
Peter T

"Dana DeLouis" wrote in message
...
I wonder if there's not another way to get that solution


If you want the total # of solutions in order to check an algorithm,
then under //Check in both programs pulled up A112972

http://www.research.att.com/~njas/sequences/A112972

ie when n=9, there should be 9 solutions.
--
HTH :)
Dana DeLouis
Windows XP & Office 2007


"Peter T" <peter_t@discussions wrote in message
...
She got the 15's with Bernard's approach, but only six of them. A small
correction to be done before it's handed in in the morning, thanks to

you!

I wonder if there's not another way to get that solution without resort

to
bits of paper on plates, 'Math Program' or VBA. It's back to school for

me
I
think <g

Regards,
Peter T

PS to Bernard

I showed your reply to my daughter, this bit -
"a chance of discovering the fun of math!"
- got a very loud "huh" !


"Dana DeLouis" wrote in message
...
Hmmm. They all sum to 15.

Select[KSetPartitions[r,3], Equal@@Total/@#1 &]

{{1,5,9},{2,6,7},{3,4,8}},
{{1,5,9},{2,3,4,6},{7,8}},
{{1,6,8},{2,4,9},{3,5,7}},
{{1,2,3,9},{4,5,6},{7,8}},
{{1,2,4,8},{3,5,7},{6,9}},
{{1,2,5,7},{3,4,8},{6,9}},
{{1,3,4,7},{2,5,8},{6,9}},
{{1,3,5,6},{2,4,9},{7,8}},
{{1,2,3,4,5},{6,9},{7,8}}

(Math Program)
--
Dana DeLouis

"Bernard Liengme" wrote in message
...
Peter,
Not to be a grump on such a sunny day (in Nova Scotia) but you are
depriving daughter of a chance of discovering the fun of math! Let

her
look at this and see if she can find more. Give her 9 pieces of paper

with
digits 1 thru 9, and three plates. Then go play golf.

sum Any three of these ways
5 5 4+1 2+3 1
6 6 5+1 4+2 1
7 7 6+1 5+2 4+3 4
8 8 7+1 6+2 5+3 4
9 9 8+1 7+2 6+3 5+4 10
10 9+1 8+2 6+4 1
10 9+1 6+4 5+3+2 1
11 9+2 8+3 7+4 6+5 4
12 9+3 8+4 7+5 6+4+2 4
13 9+4 8+5 7+6 7+3+2+1 4
14 9+5 8+6 7+4+3 7+4+2+1 4
15 9+6 8+7 1+2+3+4+5 1

best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Peter T" <peter_t@discussions wrote in message
...
This is shameless I know, but I'm stuck with my daughter's homework
question. Here's the question -

"Nine eggs numbered 1 to 9. Put the nine eggs into three baskets.

The
total
of the numbers on the eggs in each basket must be the same. How many
different ways are there to do it?"

As it's not stated to the contrary, I assume each basket can contain

any
number of eggs, though each basket must contain at least one egg and
hence a
maximum of seven eggs.

No doubt can be solved with VBA, but here's the rub - this is for a
twelve
year! There's got to be a catch ?

Anyone interested in a virtual merit...

Regards,
Peter T












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
Combination Sum [email protected] Excel Worksheet Functions 4 June 27th 08 03:56 PM
combination combination? Excel Discussion (Misc queries) 10 January 13th 07 04:08 AM
Combination UsGrant_75 Charts and Charting in Excel 1 October 27th 06 08:04 PM
combination deco Excel Programming 1 October 18th 05 06:40 PM
combination of vlookup and match question Nelson Excel Worksheet Functions 3 June 24th 05 08:18 AM


All times are GMT +1. The time now is 03:51 PM.

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

About Us

"It's about Microsoft Excel"