S.O.S. Mathematics CyberBoard

Your Resource for mathematics help on the web!
It is currently Mon, 22 Dec 2014 04:23:31 UTC

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Combinatorics questions.
PostPosted: Fri, 20 Feb 2009 09:50:36 UTC 
Offline
S.O.S. Newbie
User avatar

Joined: Sun, 8 Feb 2009 00:28:41 UTC
Posts: 2
I have three questions, each of increasing difficulty level.


I. Newbie
I have a string of 7 digits. Zeros are allowed. The digits must always sum to 8. How many combinations of strings are there?

Examples
(1111112), 1+1+1+1+1+1+2=8
(8000000), 8+0+0+0+0+0+0=8
(2222000), 2+2+2+2+0+0+0=8
(1020311), 1+0+2+0+3+1+1=8



II. Intermediate.
I have string of n digits. Zeros are allowed. The digits must always sum to 8. How many combinations of strings are there?


III. Nightmare level.
I have string of n digits. Zeros are allowed. The digits must always sum to K. How many combinations of strings are there?


Top
 Profile  
 
PostPosted: Fri, 20 Feb 2009 10:31:03 UTC 
Offline
Moderator
User avatar

Joined: Mon, 29 Dec 2008 17:49:32 UTC
Posts: 7003
Location: On this day Taiwan becomes another Tiananmen under Dictator Ma.
Spoiler:
Assuming your base is >K. Biject with strings consisting of K 1's and n-1 separators. So (K+n-1 choose K).

Much harder is where your base is ≤K.


Top
 Profile  
 
PostPosted: Fri, 20 Feb 2009 16:10:03 UTC 
Offline
Member of the 'S.O.S. Math' Hall of Fame

Joined: Sun, 24 Jul 2005 20:12:39 UTC
Posts: 4365
Location: Ottawa Ontario
voskresiniye wrote:
I have a string of 7 digits. Zeros are allowed. The digits must always sum to 8. How many combinations of strings are there?

3003

from 1 to 9:
1,9,45,165,495,1287,3003,6435,12870

Go here and enter above:
http://www.research.att.com/~njas/sequences/index.html

_________________
I'm just an imagination of your figment...


Top
 Profile  
 
PostPosted: Fri, 27 Feb 2009 21:09:36 UTC 
Offline
Member of the 'S.O.S. Math' Hall of Fame

Joined: Mon, 19 May 2003 19:55:19 UTC
Posts: 8163
Location: Lexington, MA
[delete]


Last edited by Soroban on Fri, 27 Feb 2009 21:30:02 UTC, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri, 27 Feb 2009 21:29:30 UTC 
Offline
Member of the 'S.O.S. Math' Hall of Fame

Joined: Mon, 19 May 2003 19:55:19 UTC
Posts: 8163
Location: Lexington, MA
Hello, voskresiniye!

I have an approach to this problem . . . but that's all.


Quote:
I. I have a string of 7 digits. Zeros are allowed. The digits must always sum to 8.
How many combinations of strings are there?

Consider a row of eight blocks . . . with spaces before, between and after them.

. . \_\:\square\:\_\:\square\:\_\:\square\:\_\:\square\:\_\:\square\:\_\:\square\:\_\:\square\:\_\:\square\:\_

We have six "dividers" to place in any of the nine spaces.
Each configuration determines a string.


Examples

. . \square|\square|\square|\square|\square|\square| \square\:\square \quad\Rightarrow\quad 1111112

. . \square|\square\:\square||\square\:\square\: \square| \square|\square| \quad\Rightarrow\quad 1203110

. . |\square\:\square|||\square\:\square\:\square| \square\:\square|\square \quad\Rightarrow\quad 0200321

. . \square\:\square\:\square\:\square\:\square||||||\square\:\square\:\square \quad\Rightarrow\quad 5000003


I would say that there are: .9^6 \:=\:531,\!441 strings,
. . but I know that these are not unique strings.

I am presently trying to eliminate the duplication . . .



Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Contact Us | S.O.S. Mathematics Homepage
Privacy Statement | Search the "old" CyberBoard

users online during the last hour
Powered by phpBB © 2001, 2005-2011 phpBB Group.
Copyright © 1999-2013 MathMedics, LLC. All rights reserved.
Math Medics, LLC. - P.O. Box 12395 - El Paso TX 79913 - USA