Three variables x,y,z have sum of 30. All three of them are non-negative integers. If any two variables don't have same value and exactly one variable has a value less than or equal to three, then find the number of possible solution for variables.
Solution (By Examveda Team)
Let three variables are X, Y and Z.Let, X = 3 then , Y +Z = 27.
Now put different value of Y and Z, you will get 20 solutions.
X = 2, you will get 23 solutions,
X =1, you will get 26 solutions.
X = 0, you will get 29 solutions.
Therefore, total no of solution = 27 + 23 + 26 + 29 = 98 solution.
Similarly, For Y = 3 To 0 you will get 98 solutions.
And For Z = 3 to 0, you also will get 98 solutions.
So, required no of total solution = 98 + 98 + 98 = 294.
This answer is not correct as it's specified in the question that exactly one variable have the value less than or equal to 3. In cases after a variable is having value less than 3 you have taken other 2 variables below 3 as well, which are not correct cases to consider.
Answer of this will be 252.
20 solution for first 2 cases and 22 solutions for last 2 cases.
20+20+22+22 = 84.
Same cases will be formed for other two variables.
hence, 84*3 = 252.
X=2,y=4 to 24...
Here we will have the possiblity of y=12,x=12
Shouldn't we exlcude that solution,since no 2 variables can have the same value?????
This is wrong as it is already mentioned only one variable can be less than or equal to 3.
x+y+z=30
x=0, y = 4 to 26 : 23-1=22
x=1, y+z=29, y=4 to 25, 22
x=2, y+z=28, y : 4 to 24, : 20
x=3, y+z=27, y: 4 to 23 : 20
Total (22+22+20+20)*3 = 252
Did you get solution 27 come from where?
not understood examveda.How there is 23,26,29 solution?