Number of 6 digit natural numbers with even sum of digits

kubek

New member
Joined
Dec 7, 2016
Messages
6
Hello everybody,

we've been working on this problem in class: "How many 6 digit natural numbers there are with even sum of digits?".

I thought this was fairly simple and straightforward problem:
  1. The first digit can be 1-9 (not 0, we are considering decimals); so 9 options
  2. Second to fifth can be any; so 10 options
  3. Sum of any 5 natural number (first 5 digits) is either even or odd natural number, so in order the "even stays even" and "odd becomes even", we need to add even last digit for even sum and odd last digit to odd sum; so exactly half possible numbers in both cases - 5 options

So the number of numbers would be 9*10*10*10*10*5.

But the examiner told me I need to count the number of even and odd digits and approach the problem completely differently without explaining what's wrong with mine. I tried to find some flaws in it, but I can't. Why is it more complicated than it seems? Thank you!
 
Last edited:
Hello everybody,

we've been working on this problem in class: "How many 6 digit natural numbers there are with even sum of digits?".

I thought this was fairly simple and straightforward problem:
  1. The first digit can be 1-9 (not 0, we are considering decimals); so 9 options
  2. Second to fifth can be any; so 10 options
  3. Sum of any 5 natural number (first 5 digits) is either even or odd natural number, so in order the "even stays even" and "odd becomes even", we need to add even last digit for even sum and odd last digit to odd sum; so exactly half possible numbers in both cases - 5 options

So the number of numbers would be 9*10*10*10*10*5.

But the examiner told me I need to count the number of even and odd digits and approach the problem completely differently without explaining what's wrong with mine. I tried to find some flaws in it, but I can't. Why is it more complicated than it seems? Thank you!

I agree fully with your answer. If you want to be sure, I would try doing what you were told to do (dividing the count into two cases, as I understand it), and see if you get the same answer. If you do, then you know that he was wrong.
 
I've just calculated the results, and it does indeed lead to the same result.

She was actually doing something like this:
  1. 0 even digits - 4*5*5*5*5*5
  2. 1 even digit - not possible
  3. 2 even digits - 1st is odd - 5*5*5*5*5*5*C(5, 1)
  4. 2 even digits - 1st is even - 4*5*5*5*5*5*C(5, 2)
  5. 3 even digits - not possible
  6. ...

This is obviously quite time consuming, complicated way to solve that. We will have another exam in a week so I guess I'll politely let her know in case there is a similar problem.

Anyway, thank you for your time Dr.Peterson!
 
I've just calculated the results, and it does indeed lead to the same result.

She was actually doing something like this:
  1. 0 even digits - 4*5*5*5*5*5
  2. 1 even digit - not possible
  3. 2 even digits - 1st is odd - 5*5*5*5*5*5*C(5, 1)
  4. 2 even digits - 1st is even - 4*5*5*5*5*5*C(5, 2)
  5. 3 even digits - not possible
  6. ...

This is obviously quite time consuming, complicated way to solve that. We will have another exam in a week so I guess I'll politely let her know in case there is a similar problem.

Anyway, thank you for your time Dr.Peterson!

Wow! I considered the possibility of breaking it into that many cases, but didn't consider actually doing it.

The way you did it was exactly what I had in mind when I saw the problem. As an intermediate alternative, I thought of this:

Last 5 digits: numbers 00000 through 99999: 100,000 possibilities, half with even sum and half with odd sum (which could be justified in several ways).

Odd sum: first digit must be 1, 3, 5, 7, 9: 5*50,000 = 250,000 possibilities
Even sum: first digit must be 2, 4, 6, 8: 4*50,000 = 200,000 possibilities
Total: 450,000

Definitely do it your way in the future; and trust your instincts (within reason). I often say that I never trust an answer in combinatorics until I can get it two ways.
 
Thank you for help and encouragement, I appreciate that! I am not sure what's the common way to mark solved problems here, so I've changed the icon to :thumbsup: :)
 
Thank you for help and encouragement, I appreciate that! I am not sure what's the common way to mark solved problems here, so I've changed the icon to :thumbsup: :)
Sometimes problems on here can go on and on long after the correct answer is obtained.

More importantly, you method of doing the problem is exactly as I would have done it. Great job!
 
Last 5 digits: numbers 00000 through 99999: 100,000 possibilities, half with even sum and half with odd sum (which could be justified in several ways).
Dr.Peterson, if you have the time can you please show me a proof that 1/2 the numbers will have an even sum. Thanks!
 
Dr.Peterson, if you have the time can you please show me a proof that 1/2 the numbers will have an even sum. Thanks!

Here's one way: Each five-digit number (allowing leading zeros) can be paired up with its nines-complement (that is, replace each digit d with 9-d, so that 00000 becomes 99999, 00001 becomes 99998, and so on). The nines-complement always has opposite parity (even sum becomes odd, odd sum becomes even). So the 50,000 pairs we create each consist of a number whose digit sum is odd, and one that is even. Clearly, then, there are an equal number of each.

I'm sure there is also a very simple combinatoric way to show this, but this is the first thing I see. Maybe I'm odd ...
 
Here's one way: Each five-digit number (allowing leading zeros) can be paired up with its nines-complement (that is, replace each digit d with 9-d, so that 00000 becomes 99999, 00001 becomes 99998, and so on). The nines-complement always has opposite parity (even sum becomes odd, odd sum becomes even). So the 50,000 pairs we create each consist of a number whose digit sum is odd, and one that is even. Clearly, then, there are an equal number of each.

I'm sure there is also a very simple combinatoric way to show this, but this is the first thing I see. Maybe I'm odd ...
OK, I understand what you are saying. I should have seen that myself. I even vaguely remember showing that once to someone years ago. I appreciate your time. Thank you.
 
Top