# Thread: math question - inclusion exclusion principle

1. ## math question - inclusion exclusion principle

x1+x2+x3+x4+x5=32
3 of the variable are naturals and even
2 of the variable are naturals and odd
nobody of the variables equals to 1 or 0
get the final solution

i think i need to use the inclusion exclusion principle
someone can help me with this please

2. Originally Posted by tukilala
x1+x2+x3+x4+x5=32
3 of the variable are naturals and even
2 of the variable are naturals and odd
nobody of the variables equals to 1 or 0
get the final solution

i think i need to use the inclusion exclusion principle
someone can help me with this please
tukilala,

I don't understand your problem statement.

What do you mean by "get the final solution"? Do you mean "Find the number of solutions to the equation"?

3. Originally Posted by tukilala
x1+x2+x3+x4+x5=32
3 of the variable are naturals and even
2 of the variable are naturals and odd
nobody of the variables equals to 1 or 0
get the final solution

i think i need to use the inclusion exclusion principle
someone can help me with this please
Let $\displaystyle a,b,c,d,e$ be natural numbers.

Let $\displaystyle 2a = x_1$
$\displaystyle 2b = x_2$
$\displaystyle 2c = x_3$
$\displaystyle 2d+1 = x_4$
$\displaystyle 2e+1 = x_5$

Then your equation can be expressed:

$\displaystyle 2a+2b+2c +2d+1+2e+1 = 32$

$\displaystyle 2a+2b+2c +2d+2e + 2 = 32$

$\displaystyle 2a+2b+2c +2d+2e = 30$

$\displaystyle 2(a+b+c +d+e) = 30$

$\displaystyle a+b+c +d+e = 15$

There are many solutions. To get one, just try some numbers. As long as they're natural, it doesn't matter.

Since none are 0 or 1, I'd just put all 2s until the last one, and then see what you need to make up 15.

$\displaystyle 2+2+2+2+7 = 15$

Hence
$\displaystyle a = 2$
$\displaystyle b = 2$
$\displaystyle c = 2$
$\displaystyle d = 2$
$\displaystyle e = 7$

$\displaystyle x_1 = 4$
$\displaystyle x_2 = 4$
$\displaystyle x_3 = 4$
$\displaystyle x_4 = 5$
$\displaystyle x_5 = 15$

Is a solution.

4. ## i dont understand somthing...

i dont understand why u deside that
2a=x1
2b=x2
2c=x3
2d+1=x4
2e+1=x5

you dont know wich of the variable is odd and wich is even,
you just know that there are 3 even and 2 odd
so i think that you cant decide that x4 and x5 are odd by give them the value 2d+1 and 2e+1

am i right? of not? why?
thanks

5. Originally Posted by tukilala
i dont understand why u deside that
2a=x1
2b=x2
2c=x3
2d+1=x4
2e+1=x5

you dont know wich of the variable is odd and wich is even,
you just know that there are 3 even and 2 odd
so i think that you cant decide that x4 and x5 are odd by give them the value 2d+1 and 2e+1

am i right? of not? why?
thanks
Yes.

Any odd natural number can be expressed in the form 2k+1, where k is any natural number. Any even natural number can be expressed in the form 2k, where k is any natural number. That is why i choose these.

6. but if x1 is odd? so x1 cant be equal to 2a
my point is that you dont know wich number is odd and wich is even
so how you decide that x1 is even and x5 is odd??????
so i think something missing here, no?

7. Originally Posted by tukilala
but if x1 is odd? so x1 cant be equal to 2a
my point is that you dont know wich number is odd and wich is even
so how you decide that x1 is even and x5 is odd??????
so i think something missing here, no?
It doesn't matter what you decide.

The question doesn't specify WHICH variables are odd or even, it just says that 3 are even, and 2 are odd. You are at liberty to decide which ones you want to make.

The fact of the matter is that there are hundreds of different solutions to the equation under the given requirements. It doesn't really matter what one you choose.

8. Originally Posted by Mush
Let $\displaystyle a,b,c,d,e$ be natural numbers.
Let $\displaystyle 2a = x_1$, $\displaystyle 2b = x_2$, $\displaystyle 2c = x_3$
$\displaystyle 2d+1 = x_4$, $\displaystyle 2e+1 = x_5$
So $\displaystyle a+b+c +d+e = 15$
Mush’s solution is interesting and solves the problem if we specify that $\displaystyle x_1 ,\,x_2 ,\;\& \,x_3$ are the even variables and the others are odd. However, there are more solutions that Mush seems to indicate.
For example: $\displaystyle a = 1,\,b = 3,\,c = 4,\,d = 6\;\& \,e = 1$ gives $\displaystyle x_1 = 2,\,x_2 = 6,\,x_3 = 8,\,x_4 = 13\;\& \,x_5 = 3$ which also works.

So we must count the number of solutions to $\displaystyle a+b+c +d+e = 15$ in the positive integers (each variable at least 1).
That number is $\displaystyle {{10+5-1}\choose {10}}$.
As has been pointed out, we do not know which of the variables the odd ones are.
So we to account for that consider that the two odds may be in $\displaystyle {5\choose 2}$ places.
The total then is $\displaystyle {{10+5-1}\choose {10}}$$\displaystyle {5\choose 2}$

9. but why u did: (10+5-1)C(10)
there are 15 digits
so it is not sepose to be (15+5-1)C(15)
????

10. Do you have a textbook that contains this material?

Placing N identical objects into k different cells can be done in $\displaystyle {{N+k-1} \choose {N}}$ ways.
However, some of the cells may be empty.
Like $\displaystyle a = 1,\,b = 0,\,c = 8,\,d = 6\;\& \,e = 0$ is a solution to $\displaystyle a+b+c +d+e = 15$ in the nonnegative integers.

Placing N identical objects into k different cells, with no empty cell, can be done in $\displaystyle {{N-1} \choose {N-k}}$ ways.
The solutions to $\displaystyle a+b+c +d+e = 15$ in the positive integers number $\displaystyle {{15-1} \choose {15-5}}$.