5

Job 1 goes to one of five, Job 2 goes to one of five, Job 3 goes to one of five. By product rule 5*5*5 = 125

Problem 20

Binomial[11 + 3, 3]

Length[
      Select[Flatten[Table[{x, y, z}, {x, 0, 11}, {y, 0, 11}, {z, 0, 11}], 
          2], (Apply[Plus, #] < 12) &]]

23

((12!)/(((2!))^6))

(* The second way is by product rule :  
          There are 12 choose 2 ways of selecting the red team,  
      there are 10 choose 2 ways of selecting green team,  
      there are 8 choose 2 ways of selecting blue team,   ...  *)

Product[Binomial[2 k, 2], {k, 6, 1, -1}]

Problem 25

Binomial[24, 5] - 6 Binomial[14, 5]

Length[
      Select[IntegerDigits[#] & /@ 
          Range[999999], (Apply[Plus, #] == 19) &]]

How about the sum is 20

Length[
      Select[IntegerDigits[#] & /@ 
          Range[999999], (Apply[Plus, #] == 20) &]]

Binomial[25, 5] - (6 Binomial[15, 5] - Binomial[6, 2])

How about the sum is 21

Length[
      Select[IntegerDigits[#] & /@ 
          Range[999999], (Apply[Plus, #] == 21) &]]

Binomial[26, 
        5] - (6 Binomial[16, 5] - 2  Binomial[6, 2])

25

Binomial[24, 5] - 6  Binomial[14, 5]

26

Binomial[13 + 5, 5] - 6  Binomial[3 + 5, 5]

Binomial[13 + 5, 5] - 6  Binomial[4 + 5, 5]

(Binomial[13 + 5, 5] - 
          6  Binomial[3 + 5, 5]) - (Binomial[13 + 5, 5] - 
          6  Binomial[4 + 5, 5])

6 Binomial[4 + 4, 4]

Length[
      Select[IntegerDigits[#] & /@ 
          Range[999999], (And[Apply[Plus, #] == 13, 
              Max[#] == 9]) &]]

27

Binomial[50 + 9, 9]

33

{O, R, O, N, O}

Binomial[3, 1]    + (3*2 + 1)    + (3*2*1 + Binomial[3, 2]*2  + 1)    + ( 
        Binomial[4, 2]*2  + Binomial[4, 3]*2 )    + ((5!)/(3!))

Problem 33

3     + 
   + 
1     +  
2*2     +  
2     +  
   + 
1     +  
Binomial[3, 2]*2      +  
Binomial[3, 1]*2      +  
   + 
Binomial[4, 
            3]*2     +  
Binomial[4, 2]*2     +  
   
Binomial[5, 3] 
        2

5!/3!

Binomial[5, 3] Binomial[2, 1]

34

How many strings of five and more characters can be formed from the letters

{s, e, e, r, e, s, s}

using 7 characters

((7!)/(3! 3!))

Using 6 characters we have the same number of strings since droping the last letter is a bijection between the set of all strings with 7 characters and the set of all strings with 6 characters

However, we can proceed and count them differently: (we use all but, s, e, r, respectively)

((6!)/(2! 3!)) + ((6!)/(2! 3!)) + ((6!)/(3! 3!))

Using five characters we have to go through all the cases: drop {e,e}, drop {e,r}, drop {e,s}, drop {r,s}, drop {s,s}

((5!)/(1! 3!)) + ((5!)/(2! 3!)) + ((5!)/(2! 2!)) + ((5!)/(3! 2!)) + ((5!)/(3! 1!))

From the strings with 5 characters we can calculate the number of strings with 7 characters counting the number of possible completions:

((5!)/(1! 3!))*1 + ((5!)/(2! 3!))*2 + ((5!)/(2! 2!))*2 + ((5!)/(3! 2!))*2 + ((5!)/(3! 1!))*1

39

We have to make 12 steps: 4 in x drection, 3 in y direction and 5 in z direction. This is exactly the same as counting the number of strings of 12 characters  {x, x, x, x, y, y, y, z, z, z, z, z}

(((4 + 3 + 5)!)/(3! 4! 5!))

(((3 + 3 + 3)!)/(3! 3! 3!))