Key Concepts and Formulas
- Stars and Bars Method: The number of non-negative integer solutions to x1+x2+⋯+xk=n is given by (k−1n+k−1)=(nn+k−1).
- Lower Bound Constraints: If xi≥a, substitute yi=xi−a to obtain a non-negative variable yi≥0.
- Principle of Inclusion-Exclusion (PIE): For two conditions A and B, the number of solutions satisfying neither is N(Total)−[N(A)+N(B)]+N(A∩B).
Step-by-Step Solution
Step 1: Problem Setup and Initial Equation
We want to distribute 30 identical candies among four children C1,C2,C3, and C4. Let x1,x2,x3,x4 represent the number of candies each child receives, respectively. We are given the equation:
x1+x2+x3+x4=30
with the constraints:
- x1≥0
- 4≤x2≤7
- 2≤x3≤6
- x4≥0
Step 2: Handling Lower Bound Constraints
To apply Stars and Bars, we need all variables to be non-negative. We handle the lower bounds for x2 and x3 by substitution:
- Let y2=x2−4. Then x2=y2+4 and y2≥0.
- Let y3=x3−2. Then x3=y3+2 and y3≥0.
Substituting these into the equation gives:
x1+(y2+4)+(y3+2)+x4=30
x1+y2+y3+x4=30−4−2=24
Now we have x1+y2+y3+x4=24 with x1,y2,y3,x4≥0.
We also need to update the upper bound constraints:
- x2≤7⇒y2+4≤7⇒y2≤3
- x3≤6⇒y3+2≤6⇒y3≤4
So now we have x1+y2+y3+x4=24 with constraints y2≤3 and y3≤4.
Step 3: Calculate Total Solutions Without Upper Bounds
Ignoring the upper bounds y2≤3 and y3≤4, the number of non-negative integer solutions to x1+y2+y3+x4=24 is:
(4−124+4−1)=(327)=3×2×127×26×25=2925
Step 4: Applying the Principle of Inclusion-Exclusion
Let A be the set of solutions where y2≥4 (violating y2≤3), and B be the set of solutions where y3≥5 (violating y3≤4). We want to find the number of solutions that satisfy neither A nor B. By PIE:
N(Desired)=N(Total)−[N(A)+N(B)]+N(A∩B)
Step 5: Calculate N(A)
If y2≥4, let z2=y2−4. Then y2=z2+4 and z2≥0. Substituting into x1+y2+y3+x4=24:
x1+(z2+4)+y3+x4=24
x1+z2+y3+x4=20
The number of solutions is (4−120+4−1)=(323)=3×2×123×22×21=1771. So N(A)=1771.
Step 6: Calculate N(B)
If y3≥5, let z3=y3−5. Then y3=z3+5 and z3≥0. Substituting into x1+y2+y3+x4=24:
x1+y2+(z3+5)+x4=24
x1+y2+z3+x4=19
The number of solutions is (4−119+4−1)=(322)=3×2×122×21×20=1540. So N(B)=1540.
Step 7: Calculate N(A ∩ B)
If y2≥4 and y3≥5, let z2=y2−4 and z3=y3−5. Then y2=z2+4 and y3=z3+5. Substituting into x1+y2+y3+x4=24:
x1+(z2+4)+(z3+5)+x4=24
x1+z2+z3+x4=15
The number of solutions is (4−115+4−1)=(318)=3×2×118×17×16=816. So N(A∩B)=816.
Step 8: Final Calculation
Using PIE:
N(Desired)=2925−(1771+1540)+816=2925−3311+816=430
Common Mistakes & Tips
- Always make the variables non-negative before applying Stars and Bars.
- Remember to adjust upper bounds after making substitutions for lower bounds.
- Be careful with the signs in the Principle of Inclusion-Exclusion.
Summary
By applying the Stars and Bars method and the Principle of Inclusion-Exclusion, we found the number of ways to distribute the candies according to the given constraints. The final answer is 430.
Final Answer
The final answer is \boxed{430}, which corresponds to option (D).