askvity

How many five-digit numbers have digits whose summation is 9?

Published in Combinatorics 2 mins read

The number of five-digit numbers whose digits sum to 9 is 495.

Here's how to arrive at that answer:

We need to find the number of solutions to the equation:

d1 + d2 + d3 + d4 + d5 = 9

where d1 is a digit from 1 to 9 (since it's the first digit of a five-digit number), and d2, d3, d4, and d5 are digits from 0 to 9.

First, let's account for the fact that d1 must be at least 1. We can do this by subtracting 1 from d1 and adding it to the right side of the equation. Let d1' = d1 - 1. Now d1' ranges from 0 to 8, and the equation becomes:

d1' + d2 + d3 + d4 + d5 = 8

Now, all the digits d1', d2, d3, d4, and d5 are non-negative integers. We can use stars and bars to find the number of solutions. We have 8 "stars" (representing the sum of 8) and we need to divide them into 5 groups (representing the 5 digits). We need 4 "bars" to divide the stars into 5 groups. Therefore, we have a total of 8 stars + 4 bars = 12 objects. We need to choose the positions for the 4 bars. The number of ways to do this is given by the combination formula:

C(n, k) = n! / (k! * (n-k)!)

In our case, n = 12 and k = 4, so we have:

C(12, 4) = 12! / (4! 8!) = (12 11 10 9) / (4 3 2 * 1) = 495

Therefore, there are 495 five-digit numbers whose digits sum to 9.

Related Articles