Single-digit even natural number solutions to the equation $a+b+c+d = 24$ such that $a+b > c+d$ 
Possible Duplicate:
Two algebra questions 

How to approach the below question:

How many single-digit even natural number solutions are there for the equation $a+b+c+d = 24$ such that $a+b > c+d$?

 A: The single-digit even natural numbers are $2$, $4$, $6$, $8$. The sum is $24$, quite big. So the number of possibilities is not large. Almost any careful listing will do the job. But here is a possible systematic approach. 
The average of our numbers must be $6$. If they are all $6$, we violate $a+b\gt c+d$. 
So there is at least one $8$. There can't be three $8$'s, that makes the sum too big. So the number of $8$'s is $1$ or $2$. 
Now listing should be straightforward. Do (i) one $8$ and (ii) two $8$'s.
(i) There is only one $8$, and the average is $6$, so we must have one $8$, two $6$'s, and one $4$. Where can they be? Because $a+b\gt c+d$, one of $a$ or $b$ must be $8$, and the other $6$. And therefore one of $c$ or $d$ is $6$ and the other $4$. List all cases. You should get $4$.
(ii) All yours!
A: Here is one approach you can use:
The even single-digit (presumably in base 10) natural numbers are precisely 2, 4, 6, 8.
Thus, if $y$ and $z$ are such numbers, then $4\leq y+z\leq 16$, and of course $y+z$ is even. 
Break the problem up as follows: find the number of solutions $w$, $x$ to $w+x=24$ such that $w$ and $x$ are even numbers such that $4\leq x<w\leq 16$, and then for each choice of $w$ and $x$, find the number of solutions to $a+b=w$ and the number of solutions to $c+d=x$ such that $a,b,c,d\in\{2,4,6,8\}$.
A: Here's a brute force approach:
L = (2,4,6,8)

count = 0
for a in L:
    for b in L:
        for c in L:
            for d in L:
                if (a+b+c+d)==24 and (a+b)>(c+d):
                    count = count + 1

print count

Which prints 11.
