# Thread: Discrete Maths part /insert number here.../

1. ## Discrete Maths part /insert number here.../

Heya again,

i ve found a couple of interesting problems for h/w , i have found solutions, although i am not entirely sure whether i am right or not.

1) In how many ways can we distribute 8 same balls into 3 Boxes:

1. So that none of the boxes is empty?
2. The 3rd box should have odd number of balls
3. None of the boxes is empty AND the 3rd box must have odd number of balls.

1. =21
2. =20
3. =18

I used the type of combinations with repetition. Due to many calcualtions i decided not to post my whole answer here , but if i am completely wrong ill post it here later.

2) There is a message that consists of 12 different symbols.This message is going to be sent through a transmition channel. The transmitter will additionally send 45 spaces between the symbols, with at least 3 spaces between each pair of symbols. In how many ways can the emitter send such a message?

My asnwer is: (again using combinations with repetition)

$\frac{(11+12-1)!}{12!(11-1)!}. = 646,646
$

2. Hi primeimplicant,

Q1 parts 1) and 2) are correct.

3. $
\frac{(2+7-1)!}{7!(2-1)!} + \frac{(2+5-1)!}{5!(2-1)!} + \frac{(2+3-1)!}{3!(2-1)!} = 8 +6 +4 = 18
$

I used 1 less case than part 2) , in order to cover the "None of the boxes are empty"

case 1 = odd number 1
case 2 = odd number 3
case 3 = odd number 5
case 4 = odd number 7
(4 cases) .

That means that in part 2) i used 4 cases, since there was no restriction, and for part 3) i used 3 cases (for odd numbers 1/3/5) in order the cover the restriction "None of the boxes are empty"

Where am i mistaken?

4. I count 12

With 1 in the 3rd box, the other 2 box's contents must sum to 7
o|oooooo
The red line can be placed in 6 positions.

With 3 in the 3rd box, the others must sum to 5
o|oooo
The red line can have 4 positions.

With 5 in the 3rd box, the others must sum to 3
o|oo
the red line has only 2 positions.

The possibilities are....

3rd box contains 1
611
161
521
251
431
341

3rd box contains 3
413
143
323
233

3rd box contains 5
125
215

5. Bah stupid me, bad momentum from the 2) question.
True you are right, i just realised that the way i did it, i left empty boxes.

So its indeed 12 because:

$
\frac{(2+1-1)!}{1!(2-1)!} + \frac{(2+3-1)!}{3!(2-1)!} + \frac{(2+5-1)!}{5!(2-1)!} = 2 +4 +6 = 12
$

Anyone checked my 2nd question (with message and transmition), or i need to rephrase it, just in case u cant understand it what i am trying to tell.

6. A message must have 3 spaces between each pair of symbols.
Hence, for any 12-symbol message, there are 12 remaining spaces, all indistinguishable, that can be placed in the 11 intervening positions.
45-11(3)=45-33=12

Following is how the extra 12 spaces may be distributed throughout the message symbols

All 12 spaces can be placed in any of the 11 positions... $\binom{11}{1}$ possibilities

11 spaces can be placed between any pair of symbols
and the 12th space can be placed in any of the remaining 10 places..... $\binom{11}{2}2!$

10 spaces placed between any pair, 2 in any other of 10 remaining positions.... $\binom{11}{2}2!$
10 between any pair, 1 in another position, 1 in another.... $\binom{11}{3}\frac{3!}{2!}$

9, 3.... $\binom{11}{2}2!$
9, 2, 1.... $\binom{11}{3}3!$
9, 1, 1, 1... $\binom{11}{4}\frac{4!}{3!}$

8, 4...... $\binom{11}{2}2!$
8, 3, 1.... $\binom{11}{3}3!$
8, 2, 2.... $\binom{11}{3}\frac{3!}{2!}$
8, 2, 1, 1.... $\binom{11}{4}\frac{4!}{2!}$
8, 1, 1, 1, 1.... $\binom{11}{5}\frac{5!}{4!}$

7, 5..... $\binom{11}{2}2!$
7, 4, 1.... $\binom{11}{3}3!$
7, 3, 2.... $\binom{11}{3}3!$
7, 3, 1, 1.... $\binom{11}{4}\frac{4!}{2!}$
7, 2, 2, 1.... $\binom{11}{4}\frac{4!}{2!}$
7, 2, 1, 1, 1..... $\binom{11}{5}\frac{5!}{3!}$
7, 1, 1, 1, 1, 1.... $\binom{11}{6}\frac{6!}{5!}$

6, 6..... $\binom{11}{2}$
6, 5, 1.... $\binom{11}{3}3!$
6, 4, 2.... $\binom{11}{3}3!$
6, 4, 1, 1.... $\binom{11}{4}\frac{4!}{2!}$
6, 3, 3.... $\binom{11}{3}\frac{3!}{2!}$
6, 3, 2, 1.... $\binom{11}{4}4!$
6, 3, 1, 1, 1.... $\binom{11}{5}\frac{5!}{3!}$
6, 2, 1, 1, 1, 1.... $\binom{11}{6}\frac{6!}{4!}$
6, 1, 1, 1, 1, 1, 1.... $\binom{11}{7}\frac{7!}{6!}$

5, 7 counted,
5, 6, 1 counted
5, 5, 2.... $\binom{11}{3}\frac{3!}{2!}$
5, 5, 1, 1.... $\binom{11}{4}\frac{4!}{2!2!}$
5, 4, 3..... $\binom{11}{3}3!$
5, 4, 2, 1.... $\binom{11}{4}4!$
5, 4, 1, 1, 1... $\binom{11}{5}\frac{5!}{3!}$
5, 3, 2, 2......... $\binom{11}{4}\frac{4!}{2!}$
5, 3, 2, 1, 1.... $\binom{11}{5}\frac{5!}{2!}$
5, 3, 1, 1, 1, 1.... $\binom{11}{6}\frac{6!}{4!}$
5, 2, 2, 2, 1.......... $\binom{11}{5}\frac{5!}{3!}$
5, 2, 2, 1, 1, 1......... $\binom{11}{6}\frac{6!}{2!3!}$
5, 2, 1, 1, 1, 1, 1... $\binom{11}{7}\frac{7!}{5!}$
5, 1, 1, 1, 1, 1, 1, 1.. $\binom{11}{8}\frac{8!}{7!}$

4, 8 counted
4, 7, 1 counted
4, 6, 2 counted
4, 5, 3 counted
4, 4, 4.............. $\binom{11}{3}$
4, 4, 3, 1.............. $\binom{11}{4}\frac{4!}{2!}$
4, 4, 2, 2.................. $\binom{11}{4}\frac{4!}{2!2!}$
4, 4, 2, 1, 1................. $\binom{11}{5}\frac{5!}{2!2!}$
4, 4, 1, 1, 1, 1................. $\binom{11}{6}\frac{6!}{2!4!}$
4, 3, 3, 2.......................... $\binom{11}{4}\frac{4!}{2!}$
4, 3, 3, 1, 1........................ $\binom{11}{5}\frac{5!}{2!2!}$
4, 3, 2, 2, 1.......................... $\binom{11}{5}\frac{5!}{2!}$
4, 3, 2, 1, 1, 1........................... $\binom{11}{6}\frac{6!}{3!}$
4, 3, 1, 1, 1, 1, 1.......................... $\binom{11}{7}\frac{7!}{5!}$
4, 2, 2, 2, 2............ $\binom{11}{5}\frac{5!}{4!}$
4, 2, 2, 2, 1, 1............. $\binom{11}{6}\frac{6!}{3!2!}$
4, 2, 2, 1, 1, 1, 1............ $\binom{11}{6}\frac{7!}{2!4!}$
4, 2, 1, 1, 1, 1, 1, 1........... $\binom{11}{8}\frac{8!}{6!}$
4, 1, 1, 1, 1, 1, 1, 1, 1.......... $\binom{11}{9}\frac{9!}{8!}$

3, 3, 3, 3....... $\binom{11}{4}$
3, 3, 3, 2, 1....... $\binom{11}{5}\frac{5!}{3!}$
3, 3, 3, 1, 1, 1..... $\binom{11}{6}\frac{6!}{3!3!}$
3, 3, 2, 1, 1, 1, 1..... $\binom{11}{7}\frac{7!}{2!4!}$
3, 3, 1, 1, 1, 1, 1, 1..... $\binom{11}{8}\frac{8!}{2!6!}$
3, 2, 1, 1, 1, 1, 1, 1, 1..... $\binom{11}{9}\frac{9!}{7!}$
3, 1, 1, 1, 1, 1, 1, 1, 1, 1.... $\binom{11}{10}\frac{10!}{9!}$

2, 2, 2, 2, 2, 2...... $\binom{11}{6}$
2, 2, 2, 2, 2, 1, 1.... $\binom{11}{7}\frac{7!}{5!2!}$
2, 2, 2, 2, 1, 1, 1, 1... $\binom{11}{8}\frac{8!}{4!4!}$
2, 2, 2, 1, 1, 1, 1, 1, 1... $\binom{11}{9}\frac{9!}{3!6!}$
2, 2, 1, 1, 1, 1, 1, 1, 1, 1... $\binom{11}{10}\frac{10!}{2!8!}$
2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.... $\binom{11}{11}\frac{11!}{10!}$

All possibilities are now accounted for,
a bit of adding up to do yet..

507,386

There's got to be a quicker way!!!