# 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 $a,b,c,d,e$ be natural numbers.

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

Then your equation can be expressed:

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

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

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

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

$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.

$2+2+2+2+7 = 15$

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

$x_1 = 4$
$x_2 = 4$
$x_3 = 4$
$x_4 = 5$
$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 $a,b,c,d,e$ be natural numbers.
Let $2a = x_1$, $2b = x_2$, $2c = x_3$
$2d+1 = x_4$, $2e+1 = x_5$
So $a+b+c +d+e = 15$
Mush’s solution is interesting and solves the problem if we specify that $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: $a = 1,\,b = 3,\,c = 4,\,d = 6\;\& \,e = 1$ gives $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 $a+b+c +d+e = 15$ in the positive integers (each variable at least 1).
That number is ${{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 ${5\choose 2}$ places.
The total then is ${{10+5-1}\choose {10}}$ ${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 ${{N+k-1} \choose {N}}$ ways.
However, some of the cells may be empty.
Like $a = 1,\,b = 0,\,c = 8,\,d = 6\;\& \,e = 0$ is a solution to $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 ${{N-1} \choose {N-k}}$ ways.
The solutions to $a+b+c +d+e = 15$ in the positive integers number ${{15-1} \choose {15-5}}$.