0 votes
0 votes

Can some one please tell me how are we finding solutions, for example when x = 3 how is number of solutions of y + z is 20.

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.

in Quantitative Aptitude
133 views

1 Answer

0 votes
0 votes
Let's take x to be the variable ≤ 3; x∈{0,1,2,3}

When x = 0
y + z = 30
by IODB number of arrangements (solutions) possible are $^{30+2-1}$C$_{2-1}$ = 31 ways
(Can check by brute force as well, putting values of y, z in y = 30 - z)

Similarly when x = 1
y + z = 29
Number of solutions are $^{29+2-1}$C$_{2-1}$ = 30 ways

When x = 2
y + z = 28
Number of solutions = $^{28+2-1}$C$_{2-1}$ = 29 ways
 

x = 3
y + z = 27
Number of solutions = $^{27+2-1}$C$_{2-1}$ = 28 ways

118 solutions in total.

But we also have to make sure that no 2 variables are having same value.
When x = 0; y = 15 = z should be removed as well as y = 0 and z = 0(3 solutions)
When x = 1; y and z can't have same value , but either can be = x when 1, remove y = 1, z = 1 (2 solutions)
When x = 2; Remove y = 2, z = 2, y = 14 = z (3 solutions)
When x = 3; Remove y = 3, z = 3 (2 solutions)
 

118 - 3 - 2 - 3 - 2 = 108
edited by
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true