14101992
no of 1st variety of pastry: a
no of 2nd variety of pastry: b
no of 3rd variety of pastry: c
no of 4th variety of pastry: d
So, we have a+b+c+d=10 (where a,b,c,d>0)
Remember: Number of positive integer solution of x+y+z+... (r terms) = n is (n-1)C(r-1)So, the answer to the question would be (10-1)C(4-1) = 9C3 = 84.------------------------------------
P.S. Don't forget to give kudos

Ok, your explanation sounds perfect.
My approach was:-
In a non restrictive way when a person buys 10 pastries but it is not compulsory to buy all four pastries:-apple+banana+cherry+dark chocolate =10 (four types of pastries should add up to 10)
Now a person can choose to ignore a or b or c or d completely
In that case the a or b or c or d can be zero
But since John need to buy atleast one pastry of each type therefore a,b,c,d cannot be 0
Therefore:- IN JOHN's CASE
(1+a)+(1+b)+(1+c)+(1+d)=10
a+b+c+d=10-4
a+b+c+d=6
Then I used P&C partition method
3 partitions needed to make 6
| | | | | | P P P (Total object to chose from= 9 ; 6 of them are
| and 3 of them are P)
therefore total unique way = nCr = 9C3 =\(\frac{9!}{3!6!}\)
==>\(\frac{9*8*7}{3*2*1}\)
==> \(\frac{504}{6}= 84\)
Is there a derivative proof for the easy method you used
Number of positive integer solution of x+y+z+... (r terms) = n is (n-1)C(r-1)