Solve Combinatorics Problem with 3 & 5 Digits: Help Needed!

  • Context: MHB 
  • Thread starter Thread starter Puzzles
  • Start date Start date
  • Tags Tags
    Combinatorics
Click For Summary

Discussion Overview

The discussion revolves around a combinatorics problem concerning the calculation of the number of different n-digit numbers that contain the digits 3 and 5. Participants explore various approaches to solving the problem, including the use of total counts, exclusions, and inclusion-exclusion principles.

Discussion Character

  • Exploratory
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant suggests that the total number of n-digit numbers is 10^n, and proposes eliminating those that do not contain 3 or 5, but expresses uncertainty about their approach.
  • Another participant proposes that the number of n-digit numbers containing only the digits 3 and 5 is 2^n, while also noting that leading zeros are not allowed, leading to a total of 9·10^(n-1) n-digit numbers.
  • A later reply elaborates on the inclusion-exclusion method, calculating the total of n-digit numbers containing at least one 3 and one 5, arriving at the expression 9·10^(n-1) - 16·9^(n-1) + 7·8^(n-1).
  • One participant confirms the correctness of the inclusion-exclusion approach presented by another, indicating agreement on that specific method.

Areas of Agreement / Disagreement

While there is some agreement on the use of the inclusion-exclusion principle, multiple competing views exist regarding the initial approaches to the problem, and the discussion remains unresolved on the best method to calculate the desired count.

Contextual Notes

Participants express uncertainty about the initial calculations and assumptions regarding leading zeros, which may affect the total counts discussed.

Puzzles
Messages
21
Reaction score
0
Hi! I've been stuck with this problem:

How many different n digit numbers are there that contain the numbers 3 and 5?

I've approached it like this: There are 10^n different n digit numbers in total - variations made from the digits 0,...,9. There are 8^n of those that don't contain 3 and 5 which we have to eliminate from those. Now we have to eliminate the numbers that start with one zero, so there are 10^(n-1) of those, then there are 10^(n-2) that start with two zeros, etc, up until the 1 n digit number that is made out of n zeros.

I'm stuck. This isn't right, but I can't seem to see what I'm doing wrong. Please help me if you can!
 
Physics news on Phys.org
Puzzles said:
How many different n digit numbers are there that contain the numbers 3 and 5?
Isn't it $2^n$?

When we say "an $n$-digit number", it is usually assumed that leading zeros are not allowed. So there are $9\cdot10^{n-1}$ $n$-digit decimal numbers.
 
Evgeny.Makarov said:
Isn't it $2^n$?

When we say "an $n$-digit number", it is usually assumed that leading zeros are not allowed. So there are $9\cdot10^{n-1}$ $n$-digit decimal numbers.

I think that's the number of n-digit different numbers made up of only 3s and 5s.
 
Puzzles said:
Hi! I've been stuck with this problem:

How many different n digit numbers are there that contain the numbers 3 and 5?

I've approached it like this: There are 10^n different n digit numbers in total - variations made from the digits 0,...,9. There are 8^n of those that don't contain 3 and 5 which we have to eliminate from those. Now we have to eliminate the numbers that start with one zero, so there are 10^(n-1) of those, then there are 10^(n-2) that start with two zeros, etc, up until the 1 n digit number that is made out of n zeros.

I'm stuck. This isn't right, but I can't seem to see what I'm doing wrong. Please help me if you can!
I would use an inclusion-exclusion method for this.

There are $9\cdot10^{n-1}$ $n$-digit numbers. If we look for $n$-digit numbers that do not contain a $3$ then we only have nine digits to use (and only eight choices for the first digit, since that cannot be $0$). So there are $8\cdot 9^{n-1}$ $n$-digit numbers without any $3$s. Subtract those from the total and you see that there are $9\cdot10^{n-1} - 8\cdot 9^{n-1}$ $n$-digit numbers that contain at least one $3$.

Next, we can do the same for numbers that contain no $5$, and there are again $8\cdot 9^{n-1}$ of them. If we subtract them also from the total, then we get $9\cdot10^{n-1} - 16\cdot 9^{n-1}$. But that is not the final answer, because there are some numbers that contain neither a $3$ nor a $5$, and we have subtracted them twice (once because they contain no $3$ and then again because they contain no $5$). So we must add them back in again. There are $7\cdot 8^{n-1}$ such numbers. So the final total of $n$-digit numbers that contain at least one $3$ and at least one $5$ is $$9\cdot10^{n-1} - 16\cdot 9^{n-1} + 7\cdot8^{n-1}.$$
 
Yes, that is absolutely correct! Thank you so much.
 

Similar threads

  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 29 ·
Replies
29
Views
5K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
Replies
1
Views
6K