Can you explain me this problem of combinatorics? Yesterday was my final test of Discrete Mathematics and the second question was:  
Wath is the cardinality of these sets:
a) Integers with 4 different digits and its digits increase, decrease and then increase again.
Eg. 1308 is valid
    1300 is not valid
    1320 is not valid  
b) Integers $4000\le n<7000$ even and all its digits are different.  
c) Positive integers $n<10000$ such that the sum of its digits is 15.  
Could you explain me this question?

For (b), which is the easiest of the three problems:
Let the digits from left to right be $D(1),D(2),D(3),D(4).$
If each of the $3$ cases $D(4)=0$ or $D(4)=2$ or $D(4)=8,$ there are $3$ choices ($4,5$,or $6$) for $D(1)$. This gives $(3)(3)=9$ choices for the pair $(D(1),D(4)).$ For each  pair there are $8$ choices of $D(2)$.  There are 7 choices of $D(3)$ for each triplet $(D(1),D(2),D(4)).$ This gives $(9)(8)(7)=504$ values when $D(4)$ is $0,2$,or $8$.
In each of the $2$ cases $D(4)=4$ or $D(4)=6$ there are only $2$ choices for $D(1).$ (That is, $D(1)=5$ or $6$ when $D(4)=4$; and $D(1)=4$ or $5$ when $D(4)=6$). This gives $(2)(2)=4$ choices for the pair $(D(1),D(4)).$   There are $8$ choices of $D(2)$ for each pair $(D(1),D(4))$ and  7 choices of $D(3)$ for each triplet $(D(1),D(2),D(4)).$ This gives $(4)(8)(7)=224$ values when $D(4)$ is $4$ or $6.$
Altogether we have a total of $504+224=728$  values.
