I worked out a solution but don't know if its the right one. Is this the right way to approach the problem? Any help would be appreciated.
First, the number of non-negative integer solutions for $W+X+Y+Z = 15$ can be calculated using stars and bars:
$$\binom{n+k-1}{n} = \binom{15+4-1}{15}$$
Now, when value of W exceeds 6; i.e., for value of 7 violets the rule of the upper limit for W. That means the number of violations W can have is among 15-7 = 8 identical items in 4 distinct bins.
Equation for violations becomes W+X+Y+Z = 15-7 = 8
As a result, total number of violations for W = C (n+k-1, k-1) = C (8+4-1, 4-1) = C (11, 3)
⸫ Total number of violations for all 4 bins when 1 bin cross upper limit = C (11, 3) × 4
Since, number of violations 8 is >n/2=15/2=7.5; we need to add in the subtracted repetitions.
When 2 bins cross above upper limit; W+X+Y+Z = 15-7-7 = 1
⸫ Total number of repetitions for all 4 bins when 2 bin cross upper limit = C (1+4-1, 4-1) × 4 = C (4, 3) × 4
When 3 bins cross above upper limit; W+X+Y+Z = 15-7-7-7 = -6 i.e., not possible.
Therefore, the number of integer solutions for $W+X+Y+Z = 15$ where $W, X, Y, Z \leq 6$ is $$\binom{18}{3} – \binom{11}{3} \times 4 + \binom43\times 4$$