How Many 4-Digit Numbers Have at Least One 5 or 7?

  • Context: Undergrad 
  • Thread starter Thread starter z.js
  • Start date Start date
  • Tags Tags
    Probability
Click For Summary
SUMMARY

The problem involves calculating how many 4-digit numbers from 1000 to 9999 contain at least one digit that is either a 5 or a 7. The initial calculation by the user resulted in 5440 desired outcomes, but the correct answer is 5416. The discrepancy arises from not properly accounting for the leading zeros and the complementary counting method, which suggests calculating the total outcomes without 5 or 7 and subtracting from the total sample space of 9000.

PREREQUISITES
  • Understanding of combinatorial counting principles
  • Familiarity with the concept of complementary counting
  • Basic knowledge of 4-digit number formation
  • Ability to perform calculations involving powers and combinations
NEXT STEPS
  • Study complementary counting techniques in combinatorics
  • Learn how to calculate permutations and combinations
  • Explore problems involving digit restrictions in number theory
  • Practice similar problems involving counting specific digit occurrences in ranges
USEFUL FOR

Mathematics students, educators, and anyone interested in combinatorial problems and number theory will benefit from this discussion.

z.js
Messages
57
Reaction score
0
Hi everyone, I'm having a hard time with this problem:

Of the integers from 1000 to 9999, how many have at least one digit a 5 or 7?

My working :
[1000, 9999] = 9000 outcomes
∴ 9000 possible outcomes
Desired outcomes : (2*8^3) + (2^2*8^2)+(2^3*8)+(2^4), since 5 or 7 = 2 choices, any other numbers = 8 choices (from 0 - 9)
∴ 1360*4 desired outcomes (there are 4 places, and order matters here) = 5440 desired outcomes

But the textbook answers say 5416.

I was thinking :
maybe I should subtract from 5440 all desired outcomes which have a leading '0':
(1*8*8)+(1*2*8)+(1*2*2) = 84
∴ 5440 - 84 = 5356 (wrong!)
I'm not going to try and do numbers that have 2 leading '0's or more since the first is already proven that the answer is wrong.

Really confused about what I'm doing.
Any help would be very appreciated!
Thanks
Steve
 
Physics news on Phys.org
z.js said:
Desired outcomes : (2*8^3) + (2^2*8^2)+(2^3*8)+(2^4)

I don't understand where got you this expression from.

"At least" problems are solved by "calculate the opposite and subtract from the total sample space".
Do understand what the opposite of problem would be?
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
Replies
1
Views
7K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
6
Views
2K
  • · Replies 8 ·
Replies
8
Views
7K