Picking a 5 digit code with an odd middle digit

This topic has expert replies
Legendary Member
Posts: 641
Joined: Tue Feb 14, 2012 3:52 pm
Thanked: 11 times
Followed by:8 members
Hello,

In the following:

How many different five-digit codes can be picked from the digits 1 through 6 if the middle digit must be odd and no two digits might be the same?

A) 420
B) 360
C) 180
D) 120
E) 60

OA: D

I was trying to solve as follows:

Middle digit could be 1 or 3 or 5.

Hence we have, 5 x 4 x 3 x 3 x 2 = 360

Can you please tell me where I am going wrong?

Thanks a lot,
Sri

Senior | Next Rank: 100 Posts
Posts: 34
Joined: Sun Nov 03, 2013 9:15 am
Thanked: 7 times

by Dblooos » Wed Jan 01, 2014 12:15 pm
Sri,

There are six numbers 1, 2, 3, 4, 5, 6 and five digits code.

So let us first pick the digit with restrictions ie the middle digit. Since it has to be an odd number it can be only be filled with 1, 3, 5 (3 Choices).

For other four digits no number can repeat so.

Next digit, let us say we start with 1st, it would have 6-1 = 5 choices 6 (total numbers) - 1(number used as middle digit)

Similarly the 2nd would have 4 choices.

3rd is the middle digit, it has 3 choices.

4th would have 2 choices.

5th one.

So the answer would be 5 X 4 X 3 X 2 X 1= 120.

GMAT/MBA Expert

User avatar
GMAT Instructor
Posts: 16207
Joined: Mon Dec 08, 2008 6:26 pm
Location: Vancouver, BC
Thanked: 5254 times
Followed by:1268 members
GMAT Score:770

by Brent@GMATPrepNow » Wed Jan 01, 2014 1:42 pm
gmattesttaker2 wrote:
How many different five-digit codes can be picked from the digits 1 through 6 if the middle digit must be odd and no two digits might be the same?

A) 420
B) 360
C) 180
D) 120
E) 60

OA: D

I was trying to solve as follows:

Middle digit could be 1 or 3 or 5.

Hence we have, 5 x 4 x 3 x 3 x 2 = 360

Can you please tell me where I am going wrong?

Thanks a lot,
Sri
Hi Sri,

Your solution looks good.
For more clarity, let's examine it step by step.

Take the task of building 5-digit numbers and break it into stages. We'll start with the most restrictive stage.

Stage 1: Select the middle digit
This digit can be 1, 3 or 5, so we can complete stage 1 in 3 ways

Stage 2: Select the 1st digit
There are now 5 digits remaining to choose from, so we can complete this stage in 5 ways

Stage 3: Select the 2nd digit
There are now 4 digits remaining to choose from, so we can complete this stage in 4 ways

Stage 4: Select the 4th digit
There are now 3 digits remaining to choose from, so we can complete this stage in 3 ways

Stage 5: Select the 5th digit
There are now 2 digits remaining to choose from, so we can complete this stage in 2 ways

By the Fundamental Counting Principle (FCP), we can complete all 5 stages (and thus build a 5-digit number) in (3)(5)(4)(3)(2) ways ([spoiler]= 360 ways[/spoiler])

Cheers,
Brent

Aside: For more information about the FCP, watch our free video: https://www.gmatprepnow.com/module/gmat-counting?id=775
Brent Hanneson - Creator of GMATPrepNow.com
Image

GMAT/MBA Expert

User avatar
GMAT Instructor
Posts: 16207
Joined: Mon Dec 08, 2008 6:26 pm
Location: Vancouver, BC
Thanked: 5254 times
Followed by:1268 members
GMAT Score:770

by Brent@GMATPrepNow » Wed Jan 01, 2014 1:48 pm
gmattesttaker2 wrote:
How many different five-digit codes can be picked from the digits 1 through 6 if the middle digit must be odd and no two digits might be the same?

A) 420
B) 360
C) 180
D) 120
E) 60
Here's another approach.
IGNORE the restriction about the middle digit being odd. So, we'll create 5-digit numbers where no digits are repeated.

Take the task of building 5-digit numbers and break it into stages.

Stage 1: Select the 1st digit
There are 6 digits to choose from, so we can complete this stage in 6 ways

Stage 2: Select the 2nd digit
There are now 5 digits remaining to choose from, so we can complete this stage in 5 ways

Stage 3: Select the 3rd digit
There are now 4 digits remaining to choose from, so we can complete this stage in 4 ways

Stage 4: Select the 4th digit
There are now 3 digits remaining to choose from, so we can complete this stage in 3 ways

Stage 5: Select the 5th digit
There are now 2 digits remaining to choose from, so we can complete this stage in 2 ways

By the Fundamental Counting Principle (FCP), we can complete all 5 stages (and thus build a 5-digit number) in (6)(5)(4)(3)(2) ways = 720 ways

IMPORTANT: Since the digits are equally distributed and since half of the 6 digits are odd, we can conclude that HALF of the 720 5-digit numbers have an ODD middle digit, and HALF have an EVEN middle digit,

So, the number of 5-digit numbers with an ODD middle digit = 720/2 = [spoiler]360 = B[/spoiler]

Cheers,
Brent
Brent Hanneson - Creator of GMATPrepNow.com
Image

GMAT/MBA Expert

User avatar
GMAT Instructor
Posts: 16207
Joined: Mon Dec 08, 2008 6:26 pm
Location: Vancouver, BC
Thanked: 5254 times
Followed by:1268 members
GMAT Score:770

by Brent@GMATPrepNow » Wed Jan 01, 2014 1:51 pm
Hi Dblooos,

There's a small problem with your solution ...
Dblooos wrote:Sri,

There are six numbers 1, 2, 3, 4, 5, 6 and five digits code.

So let us first pick the digit with restrictions ie the middle digit. Since it has to be an odd number it can be only be filled with 1, 3, 5 (3 Choices).
At this point, you have selected the middle digit

For other four digits no number can repeat so.

Next digit, let us say we start with 1st, it would have 6-1 = 5 choices 6 (total numbers) - 1(number used as middle digit)

Similarly the 2nd would have 4 choices.

3rd is the middle digit, it has 3 choices.
you have already selected the middle digit, so you don't need this step

4th would have 2 choices.

5th one.

So the answer would be 5 X 4 X 3 X 2 X 1= 120.
Cheers,
Brent
Brent Hanneson - Creator of GMATPrepNow.com
Image

Senior | Next Rank: 100 Posts
Posts: 34
Joined: Sun Nov 03, 2013 9:15 am
Thanked: 7 times

by Dblooos » Wed Jan 01, 2014 5:40 pm
Yes, Brent you are right. Sri, I am sorry I was wrong. As Brent highlighted it should be 360.

Legendary Member
Posts: 641
Joined: Tue Feb 14, 2012 3:52 pm
Thanked: 11 times
Followed by:8 members

by gmattesttaker2 » Tue Jan 07, 2014 7:01 pm
Brent@GMATPrepNow wrote:
gmattesttaker2 wrote:
How many different five-digit codes can be picked from the digits 1 through 6 if the middle digit must be odd and no two digits might be the same?

A) 420
B) 360
C) 180
D) 120
E) 60

OA: D

I was trying to solve as follows:

Middle digit could be 1 or 3 or 5.

Hence we have, 5 x 4 x 3 x 3 x 2 = 360

Can you please tell me where I am going wrong?

Thanks a lot,
Sri
Hi Sri,

Your solution looks good.
For more clarity, let's examine it step by step.

Take the task of building 5-digit numbers and break it into stages. We'll start with the most restrictive stage.

Stage 1: Select the middle digit
This digit can be 1, 3 or 5, so we can complete stage 1 in 3 ways

Stage 2: Select the 1st digit
There are now 5 digits remaining to choose from, so we can complete this stage in 5 ways

Stage 3: Select the 2nd digit
There are now 4 digits remaining to choose from, so we can complete this stage in 4 ways

Stage 4: Select the 4th digit
There are now 3 digits remaining to choose from, so we can complete this stage in 3 ways

Stage 5: Select the 5th digit
There are now 2 digits remaining to choose from, so we can complete this stage in 2 ways

By the Fundamental Counting Principle (FCP), we can complete all 5 stages (and thus build a 5-digit number) in (3)(5)(4)(3)(2) ways ([spoiler]= 360 ways[/spoiler])

Cheers,
Brent

Aside: For more information about the FCP, watch our free video: https://www.gmatprepnow.com/module/gmat-counting?id=775

Hello Brent,

Thanks a lot for your excellent explanation (as always).

Best Regards,
Sri