# Question: Numbers with at Least One 7

## Comment on Numbers with at Least One 7

### why its only from 0 to 9 and

why its only from 0 to 9 and not including all numbers until 100

### The question concerns 3-digit

The question concerns 3-digit integers, and integers less than 100 do not have 3 digits. For example, 9, 28 and 77 do not have 3 digits.

### Thank you very much for this

Thank you very much for this helpful explanation. But I wonder could this rule works for the question below as well? I have tried so but it did not work. I wonder why?

"Four women and three men must be seated in a row for a group photograph. If no two men can sit next to each other, in how many different ways can the seven people be seated?"

### I'm not sure how we'd apply

I'm not sure how we'd apply the approach used in the above video solution to your question.

Can you show me you solution so I can see if I can see what went wrong?

By the way, here's my solution to the question you posed: http://www.beatthegmat.com/tricky-counting-four-women-and-three-men-must...

### My doubt here is- when we use

My doubt here is- when we use strategy one or strategy 2, while explaining questions in the previous lessons, you said: After filling the most restrictive stage when the other stages are equally restrictive, we place no of ways in first stage then reduce one and place the number of ways in second stage- I mean if first stage is accomplished in 5 ways, the next stage will be accomplished in 4 ways as one object is used in first stage we are left with only 4 objects now. My question is why have you not applied that logic here? If I solve that way I get for strategy 2 (step 1) : 9*9*8 ways = 648 ways
and step 2: 8*8*7 ways =448 ways 648-448=200 ways. Please explain. Also please let me know if my question is not making sense.

### Quote: "After filling the

Quote: "After filling the most restrictive stage when the other stages are equally restrictive, we place no of ways in first stage then reduce one and place the number of ways in second stage"

The number of ways to complete each stage depends on the question. We can't take a strategy we use to solve one question and apply it to all questions. That seems to be what you are doing here.

As for your calculations, please tell me what each value represents. It's hard to know what you're doing when you write 8*8*7 ways

Cheers,
Brent

### Okay. What I meant by 8*8*7

Okay. What I meant by 8*8*7 ways is for the step 2: which is break restriction. Now for the 1st digit we have 8 ways (with no 0 and no 7), The second stage can have 9 ways (including all 9 digits) as there is no restriction. This is explained in the video. My doubt is when one digit is used in 1st place, we are left with only 8 digits, so I took 8 in 2nd place and 7 in 3rd place. Hence I got 8*8*7. Now why I did this because, in the previous module question of arranging letters J,K,L,M and N, it is said that after filling the 3rd letter which is most restrictive, we fill the next places which are equally restrictive and we fill it like 4 ways, 3 ways 2 ways and 1 way. We do this because one letter is already used for 3rd place, now we have 4 letters left, so 4 ways and likewise. My question is there is nowhere mentioned in question that the letters cannot repeat. Taking that into account, can't we fill the other equally restrictive stages with 5 ways? The same way we did for the digits? Or vice versa, why are we not taking this principle for the digits that once a digit is used for 1 stage, the next stage will have one way lesser because 1 digit is used in 1st stage. Please clarify.

### Quote: "Okay. What I meant by

Quote: "Okay. What I meant by 8*8*7 ways is for the step 2: which is break restriction. Now for the 1st digit we have 8 ways (with no 0 and no 7), The second stage can have 9 ways (including all 9 digits) as there is no restriction. This is explained in the video. My doubt is when one digit is used in 1st place, we are left with only 8 digits, so I took 8 in 2nd place and 7 in 3rd place. "

The above question does not state that digits cannot be repeated.

So, in step 2, we have 9 options for the tens digit (0, 1, 2, 3, 4, 5, 6, 8, or 9)
And we have 9 options for the units digit (0, 1, 2, 3, 4, 5, 6, 8, or 9)

In the question you alluded to (arranging letters J,K,L,M and N), we cannot repeat letters. So, once we choose a letter for the first position, we cannot re-use that letter. We know we cannot repeat letters, because we're told to ARRANGE the 5 letters. That's what makes that question different from this one.

Does that help?

Cheers,
Brent

### I see, so the catch for the

I see, so the catch for the letter question is the word ARRANGE. So while arranging letters we cannot repeat them Is this understanding correct?

### That's correct.

That's correct.
So, for example, if you're asked to arrange the letters A, B and C, then all of the possible outcomes will have 3 letters AND no letters will be repeated.

The only exception is when there are duplicates among the letters to be arranged.
For example, if you're asked to arrange the letters in the word NOON, then all of the possible outcomes will have 4 letters AND each arrangement must have 2 N's and 2 O's.

### But you also can't have 0 0 0

But you also can't have 0 0 0, so wouldn't it be 251 - 1 = 250?

### Given the way we structured

Given the way we structured the solution, we can't get 000 as an outcome.

For example, when we ignore the restriction, we allow only 9 digits (1,2,3,4,5,6,7,8 or 9) for the first digit (hundreds position) in the number. This prevents us from having a zero in that position.

We do the same when we count the number of outcomes that break the restriction.
There we allow only 8 digits (1,2,3,4,5,6,8 or 9) for the first digit.

Does that help?

Cheers,
Brent

### Okay, I see it now! Thanks.

Okay, I see it now! Thanks.

### Dear Brent,

Dear Brent,

I am unable to get hold of this question:

How many positive three digit integers contain atleast two 7?

I am somehow getting the answer wrong when I use the approach of subtracting three-digit numbers that don't contain two 7's from the total no. of three digit numbers. Could you please help here.

Thanks,
Ketan

### If we want to use the

If we want to use the Complement Rule here, we must recognize that:
(# of 3-digit numbers with zero 7's) + (# of 3-digit numbers with one 7) + (# of 3-digit numbers with two 7's) + (# of 3-digit numbers with three 7's) = TOTAL number of 3-digit numbers.

Getting AT LEAST two 7's means getting TWO or THREE 7's.

So, # with AT LEAST two sevens = (TOTAL number of 3-digit numbers) - (# of 3-digit numbers with zero 7's) - (# of 3-digit numbers with one 7)
-----------------------
Here's how I would answer that question:
- There is 1 number in the form 777
- There are 8 numbers in the form _77 (1,2,3,4,5,6,8 or 9 can go in blank)
- There are 9 numbers in the form 7_7 (0,1,2,3,4,5,6,8,9 can go in blank)
- There are 9 numbers in the form 77_ (0,1,2,3,4,5,6,8,9 can go in blank)
TOTAL = 1 + 8 + 9 + 9 = 27

Does that help?

Cheers,
Brent

### Thanks for the explanation.

Thanks for the explanation. The total number of 3 digit numbers with one seven would be 9*9*9? I am little confused regarding this.

### No, it won't be 9*9*9

No, it won't be 9*9*9
Can you tell me the steps you took to reach that answer? It will help me see where things went wrong for you.

### (O,1,2,3,4,5,6,7,8,9) - set

(O,1,2,3,4,5,6,7,8,9) - set of 10 numbers which I used.

#- of 3 digits no. with at least one seven:
1ST STEP-

1st digit cannot be 0 but could be 7, and there are 9 such numbers.

2nd digit, here except 7, any no. between 0-9 could be the second digit.

3rd digit, ere except 7, any no. between 0-9 could be the third digit.

Going by these steps, I get 9*9*9.

### With this approach, I can

With this approach, I can choose 8 for the 1st digit, 8 for the 2nd digit, and 8 for the 3rd digit.
So, there are zero 7's, which does not meet the condition of having exactly one 7.

I'll get you started with a hint.
There are 3 possible ways we can have exactly ONE 7
- Numbers in the form 7XX (where the 2nd and 3rd digits are NOT 7)
- Numbers in the form X7X (where the 1st and 3rd digits are NOT 7)
- Numbers in the form XX7 (where the 1st and 2nd digits are NOT 7)

Cheers,
Brent

### For 7XX, in my opinion, it

For 7XX, in my opinion, it would be 9*9 numbers.
For x7x, it would be 8*9 numbers.
For XX7, it would be 8*9 numbers.

9*9+8*9+8*9= 81+72+72= 225 NUMBERS WHICH HAVE EXACTLY ONE 7?

Perfect!

### For me, I had to slightly

For me, I had to slightly rephrase your restrictions rule, and start one step further back for it to sink if for me. I did that as follows:

total # ways = ways do follow condition + ways do not follow condition

rearrange

total # ways - ways do not follow condition = ways do follow condition

substitute in

900 - 648 = ways do follow condition

252 = ways do follow condition

I guess we can also think of this as a form of a Complements Rule (based on your response to ketan001)?

I assume the approach is similar to when probability questions where we can find something by saying that the probability that something "is" = 1 - probability of "not"

In this case instead of using 1, we are using the total number of outcomes possible, as you said, ignoring the restraint.

At least that's how it makes sense to me to think of your Restrictions Rule.

PS It reminds me of the approach for solving shared birthday problems.

### That approach is perfectly

That approach is perfectly valid.
Any strategy that gets the job done is a good one :-)