Last visit was: 21 Apr 2026, 18:51 It is currently 21 Apr 2026, 18:51
Close
GMAT Club Daily Prep
Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email.

Customized
for You

we will pick new questions that match your level based on your Timer History

Track
Your Progress

every week, we’ll send you an estimated GMAT score based on your performance

Practice
Pays

we will pick new questions that match your level based on your Timer History
Not interested in getting valuable practice questions and articles delivered to your email? No problem, unsubscribe here.
Close
Request Expert Reply
Confirm Cancel
User avatar
jeeyo
Joined: 06 Jun 2010
Last visit: 27 Jun 2010
Posts: 3
Own Kudos:
16
 [15]
Posts: 3
Kudos: 16
 [15]
3
Kudos
Add Kudos
12
Bookmarks
Bookmark this Post
Most Helpful Reply
User avatar
Bunuel
User avatar
Math Expert
Joined: 02 Sep 2009
Last visit: 21 Apr 2026
Posts: 109,728
Own Kudos:
810,475
 [8]
Given Kudos: 105,800
Products:
Expert
Expert reply
Active GMAT Club Expert! Tag them with @ followed by their username for a faster response.
Posts: 109,728
Kudos: 810,475
 [8]
1
Kudos
Add Kudos
7
Bookmarks
Bookmark this Post
General Discussion
User avatar
whiplash2411
Joined: 09 Jun 2010
Last visit: 02 Mar 2015
Posts: 1,761
Own Kudos:
3,596
 [1]
Given Kudos: 210
Status:Three Down.
Concentration: General Management, Nonprofit
Posts: 1,761
Kudos: 3,596
 [1]
1
Kudos
Add Kudos
Bookmarks
Bookmark this Post
avatar
serpent333
Joined: 29 Apr 2013
Last visit: 08 Dec 2022
Posts: 7
Own Kudos:
14
 [3]
Given Kudos: 10
Location: United States
GMAT 1: 730 Q50 V38
WE:Engineering (Pharmaceuticals and Biotech)
GMAT 1: 730 Q50 V38
Posts: 7
Kudos: 14
 [3]
3
Kudos
Add Kudos
Bookmarks
Bookmark this Post
Problem: An office manager must choose a five-digit lock code for the office door. The first and last digits of the code must be odd, and no repetition of digits is allowed. How many different lock codes are possible?
MGMAT answer: 5 x 8 x 7 x 6 x 4 = 6720.

However, I think 6720 (the answer given in MGMAT) is wrong. Here's my reasoning. If you have (an) odd number(s) for your 2nd, 3rd and/or 4th digits, you cannot repeat that(those) numbers for the last digit. Therefore, this problem needs to be partitioned into 4 groups.

1) ODD (1st digit); 3 EVENs (2nd, 3rd, 4th digits); ODD (5th digit)
5 x 5x 4 x 3 x 4 = 1200

2) ODD (1st digit); 2 EVEN, 1 ODD (2nd, 3rd, 4th digits); ODD (5th digit)
5 x 5 x 4 x 4 x 3 = 1200

3) ODD (1st digit); 1 EVEN, 2 ODDs (2nd, 3rd, 4th digits); ODD (5th digit)
5 x 5x 4 x 3 x 2 = 600

4) ODD (1st digit); 3 ODDs (2nd, 3rd, 4th digits); ODD (5th digit)
5 x 4 x 3 x 2 x 1 = 120

Then the total # of combinations would be 1200 + 1200 + 600 + 120 = 3120.

Please let me know whether there's a flaw in my logic. Thanks!
User avatar
ButwhY
Joined: 02 May 2013
Last visit: 19 Sep 2013
Posts: 13
Own Kudos:
136
 [2]
Given Kudos: 16
Concentration: International Business, Technology
WE:Engineering (Aerospace and Defense)
Posts: 13
Kudos: 136
 [2]
2
Kudos
Add Kudos
Bookmarks
Bookmark this Post
Even Digits : 0,2,4,6,8
Odd Digits : 1,3,5,7,9

Chances of choosing first odd digit = 5C1
Chances of choosing last odd digit = 4C1 (no repetitions)
Remaining middle 3 digits can be taken from 8 digits = 8C1*7C1*6C1

So totally 5C1*4C1*8C1*7C1*6C1 = 6720
avatar
serpent333
Joined: 29 Apr 2013
Last visit: 08 Dec 2022
Posts: 7
Own Kudos:
14
 [1]
Given Kudos: 10
Location: United States
GMAT 1: 730 Q50 V38
WE:Engineering (Pharmaceuticals and Biotech)
GMAT 1: 730 Q50 V38
Posts: 7
Kudos: 14
 [1]
1
Kudos
Add Kudos
Bookmarks
Bookmark this Post
Vamshiiitk and Bunuel,

Thanks for your responses. I guess my question comes down to this: based on how the question is worded, can we have a 5-digit lock code such as 97537? Here, though the first and last digits are not repeated, 7 is used twice in the entire combination. How do you guys interpret the problem?

Once again, the problem reads
"Problem: An office manager must choose a five-digit lock code for the office door. The first and last digits of the code must be odd, and no repetition of digits is allowed. How many different lock codes are possible?"
(it's on pg. 48 of the 5th edition MGMAT Number Properties)

If a code such as 97537 is allowed, then, yes the solution 5C1*8C1*7C1*6C1*4C1 = 6720 correct.

But if NONE of the numbers can be repeated, not just first and the last digits, then you cannot assume 4C1 for the last digit. If the first four digits are all odd numbers, then I am left with only one choice for the last digit, i.e. 1C1 = 1.
Similarly, if the first four digits had 3 odd numbers, then you would have 2C1 = 2 for the last digit. That's why I had to partition the problem into four cases.

My argument is valid only if NONE of the numbers can be repeated.

Please let me know what you think. Thanks.
avatar
[email protected]
Joined: 12 Nov 2016
Last visit: 14 Dec 2018
Posts: 9
Own Kudos:
Given Kudos: 3
Posts: 9
Kudos: 2
Kudos
Add Kudos
Bookmarks
Bookmark this Post
I think it should be this way - first digit and last digit must be odd so 5x4 ways as repetition not allowed

Second , third and fourth can be selected in 8x7x6ways as 2 digits already used in first and last . Therefore others need to picked out of 8 digits (0 included)

So the answer should be 5x8x7x6x4 ways = 6720


Sent from my iPhone using GMAT Club Forum
User avatar
IanStewart
User avatar
GMAT Tutor
Joined: 24 Jun 2008
Last visit: 17 Apr 2026
Posts: 4,143
Own Kudos:
11,267
 [1]
Given Kudos: 99
Expert
Expert reply
Posts: 4,143
Kudos: 11,267
 [1]
1
Kudos
Add Kudos
Bookmarks
Bookmark this Post
Louis14

I get the slot method. No issues with the answer. But, I am really confused as to why we didn't multiply 6720 by 5! ? I think we need to account for different orders/arrangements as well: 10243 and 30241 are equally legal codes here.

(If it is possible, could you please explain when do we multiple with n! to account for different orders, and when do we not? It's really get over my head now.)

If you are counting your choices for each position, then multiplying, you are already putting your things in order. So for this question, when we say we have 5 choices for the first digit, 4 for the last, and then 8, 7 and 6 choices for the second, third and fourth digits, we're already putting our chosen digits in order, and the answer is just (5)(4)(8)(7)(6). There's no need to do anything else (besides multiply that out).

Some books teach counting differently, and some solutions you'll read on this forum use that different approach, which can be confusing. So some people count by doing this:

- selecting the set of k objects you need, assuming they are not in order
- multiplying by k! when the objects should be put in order

If you did that here, you'd say "there are 5C2 ways to pick the two odd digits, but we multiply that by 2! because order matters, and there are 8C3 ways to then pick the three middle digits, but we multiply that by 3! because order matters". So the solution becomes 5C2*2!*8C3*3! = [(5)(4)/2!] * 2! * [(8)(7)(6)/3!] * 3! = (5)(4)(8)(7)(6), the same answer we got above. For GMAT purposes, I really dislike this approach to counting (notice how it dramatically overcomplicates this problem) but I imagine this is the type of solution you're thinking of, when you ask if we should multiply by 5! here.

So when order matters, or in other words when you can correctly use the "slot method", all you need to do is count how many choices you have for each slot, and multiply those numbers of choices together. If, however, order does *not* matter (e.g. if you are counting how many different teams of 3 could be chosen from a group of 8 employees), then you can't just multiply your choices, because if you did, you'd be assuming things are in order when they shouldn't be.

I also notice there are a few questions in this thread (some quite old!) but in case anyone has the same concerns, I'll address all of them:

serpent333

However, I think 6720 (the answer given in MGMAT) is wrong. Here's my reasoning. If you have (an) odd number(s) for your 2nd, 3rd and/or 4th digits, you cannot repeat that(those) numbers for the last digit. Therefore, this problem needs to be partitioned into 4 groups.

1) ODD (1st digit); 3 EVENs (2nd, 3rd, 4th digits); ODD (5th digit)
5 x 5x 4 x 3 x 4 = 1200

2) ODD (1st digit); 2 EVEN, 1 ODD (2nd, 3rd, 4th digits); ODD (5th digit)
5 x 5 x 4 x 4 x 3 = 1200

3) ODD (1st digit); 1 EVEN, 2 ODDs (2nd, 3rd, 4th digits); ODD (5th digit)
5 x 5x 4 x 3 x 2 = 600

4) ODD (1st digit); 3 ODDs (2nd, 3rd, 4th digits); ODD (5th digit)
5 x 4 x 3 x 2 x 1 = 120

This solution is almost correct, but in cases 2) and 3), it is missing many possibilities. In case 2), the solution seems to assume that the digits are in the specific order OEEOO (where O means Odd, E means Even). But they could be in three orders, not just one: OEEOO, OEOEO, or OOEEO. So if we want to have two even digits in the middle, there will be 3*1200 codes we can make, and similarly for case 3), there will be 3*600 codes we can make. With those two adjustments, the solution becomes correct: 1200 + 3*1200 + 3*600 + 120 = 6720. Of course there is no need to divide the problem into these cases, so this solution is much longer than it needs to be, but it's logically fine.

jeeyo

Odd numbers 1,3,5,7,9 so first digit 5 options, last place 4 options ( no repetition).
That leaves us with 7 (of 9) digits to choose for the middle three.

So we have 5 x 4 for the irst and last
and 7 x 6 x 5 for the iddle three
Total is 5 x 7 x 6 x 5 x 4 = 4200.

The above solution doesn't allow for any of the middle digits to be zero, so it's undercounting the choices (by one) for each of the middle digits.
User avatar
woohoo921
Joined: 04 Jun 2020
Last visit: 17 Mar 2023
Posts: 493
Own Kudos:
Given Kudos: 623
Posts: 493
Kudos: 149
Kudos
Add Kudos
Bookmarks
Bookmark this Post
jeeyo
An office manager must choose a five-digit lock code for the office door. The first and last digits of the code must be odd, and no repetition of the digits is allowed. How many different lock codes are possible.?


Odd numbers 1,3,5,7,9 so first digit 5 options, last place 4 options ( no repetition).
That leaves us with 7 (of 9) digits to choose for the middle three.

So we have 5 x 4 for the irst and last
and 7 x 6 x 5 for the iddle three
Total is 5 x 7 x 6 x 5 x 4 = 4200.

The book shows 5 x 8 x 7 x 6 x 4= 6720.

I think this is wrong.

Any ideas.

Experts,
MartyTargetTestPrep KarishmaB

When I was first solving this problem, I did 5*9*8*2 --> going in order from the first slot to slot #2, slot #3, and then slot #4. I ended up not restricting slot #4 before moving to slot #2 and then slot #3.
Do you end up restricting the first two slots because those are your two main constraints? I factored in that odd numbers could have been chosen in slots #2 and #3 because those come first.

Thank you for all of your time and help.
User avatar
MartyTargetTestPrep
User avatar
Target Test Prep Representative
Joined: 24 Nov 2014
Last visit: 11 Aug 2023
Posts: 3,472
Own Kudos:
5,638
 [1]
Given Kudos: 1,430
Status:Chief Curriculum and Content Architect
Affiliations: Target Test Prep
GMAT 1: 800 Q51 V51
Expert
Expert reply
GMAT 1: 800 Q51 V51
Posts: 3,472
Kudos: 5,638
 [1]
1
Kudos
Add Kudos
Bookmarks
Bookmark this Post
woohoo921
When I was first solving this problem, I did 5*9*8*2 --> going in order from the first slot to slot #2, slot #3, and then slot #4. I ended up not restricting slot #4 before moving to slot #2 and then slot #3.
Do you end up restricting the first two slots because those are your two main constraints? I factored in that odd numbers could have been chosen in slots #2 and #3 because those come first.

Thank you for all of your time and help.
Your main constraints are that slots 1 and 5 have to be odd only. So, you should do those two slots first, and then the other three.
User avatar
ThatDudeKnows
Joined: 11 May 2022
Last visit: 27 Jun 2024
Posts: 1,070
Own Kudos:
Given Kudos: 79
Expert
Expert reply
Posts: 1,070
Kudos: 1,030
Kudos
Add Kudos
Bookmarks
Bookmark this Post
woohoo921
jeeyo
An office manager must choose a five-digit lock code for the office door. The first and last digits of the code must be odd, and no repetition of the digits is allowed. How many different lock codes are possible.?


Odd numbers 1,3,5,7,9 so first digit 5 options, last place 4 options ( no repetition).
That leaves us with 7 (of 9) digits to choose for the middle three.

So we have 5 x 4 for the irst and last
and 7 x 6 x 5 for the iddle three
Total is 5 x 7 x 6 x 5 x 4 = 4200.

The book shows 5 x 8 x 7 x 6 x 4= 6720.

I think this is wrong.

Any ideas.

Experts,
MartyTargetTestPrep KarishmaB

When I was first solving this problem, I did 5*9*8*2 --> going in order from the first slot to slot #2, slot #3, and then slot #4. I ended up not restricting slot #4 before moving to slot #2 and then slot #3.
Do you end up restricting the first two slots because those are your two main constraints? I factored in that odd numbers could have been chosen in slots #2 and #3 because those come first.

Thank you for all of your time and help.

woohoo921

You mention that you "factored in that odd numbers could have been chosen in slots #2 and #3," but I'm guessing that what you really did was that you FORCED them to be odd. That is, would you have *2 at the end if the middle three digits were all even? What if the first two were even and the third odd? What if the first one odd, the next one even, and the third one odd? Etc....? Is that 2 really a 2?

As Marty suggests, it's almost always best to start with your most-restricted elements/positions, and that turned out to be the way to go on this one!
User avatar
aryanxx09
Joined: 01 Sep 2024
Last visit: 13 Apr 2026
Posts: 32
Own Kudos:
Given Kudos: 5
Posts: 32
Kudos: 3
Kudos
Add Kudos
Bookmarks
Bookmark this Post
5 options for the first digit and then 4 options for the last digit (has to be odd for both), and then 2 digits are gone from our options for the remaining digits, so 8 options for the 2nd digit, and then 7 options for the 3rd digit, and 6 options for the 4th digit. Hence 5*8*7*6*4=6720 IMO
Moderators:
Math Expert
109728 posts
Tuck School Moderator
853 posts