Code

This topic has expert replies
Master | Next Rank: 500 Posts
Posts: 401
Joined: Tue May 24, 2011 1:14 am
Thanked: 37 times
Followed by:5 members

Code

by MBA.Aspirant » Tue Nov 15, 2011 9:22 am
John needs to create a new 6-digit code for his bank account using the digits from 0 to 9. He wants the first digit to be odd and the last digit to be even. If he does not repeat any digits, how many different 6-digit codes could John create?

A) 16,800 B) 42,000 C) 151,200 D) 250,000 E) 1,000,000


Thanks ahead
Source: — Problem Solving |

Legendary Member
Posts: 966
Joined: Sat Jan 02, 2010 8:06 am
Thanked: 230 times
Followed by:21 members

by shankar.ashwin » Tue Nov 15, 2011 9:27 am
First digit of code (odd) - 1,3,5,7,9 - 5 possibilities.

Last digit (even) - 0,2,4,6,8 - 5 possibilities.

5* _ _ _ _ * 5

Now we have 4 slots to fill with 8 numbers remaining, they can be filled in 8*7*6*5 ways.

In total, 5*(8*7*6*5)*5 = 42,000 ways. B IMO

User avatar
Legendary Member
Posts: 1101
Joined: Fri Jan 28, 2011 7:26 am
Thanked: 47 times
Followed by:13 members
GMAT Score:640

by HSPA » Tue Nov 15, 2011 9:29 am
I got differnet answer from B.. Please confirm my approach shankar (Thanks for your support)

P is for position:

P1: 5 ways
P2: 9
P3: 8
P4: 7
P5: 6
P6: 1 or 2 or 3 or 4 or 5

positions P2 till P5 can occupy 4 odd numbers or 4 even numbers
--if p2 to P5 has 4 odd numbers P6 has 5 even numbers to choose 1 out of it
--if p2 to p5 has 4 even number P6 has only 1 number to choose.
First take: 640 (50M, 27V) - RC needs 300% improvement
Second take: coming soon..
Regards,
HSPA.

Legendary Member
Posts: 608
Joined: Sun Jun 19, 2011 11:16 am
Thanked: 37 times
Followed by:8 members

by saketk » Tue Nov 15, 2011 9:44 am
I got B

This is what I did

Even -- 0,2,4,6,8
Odd -- 1,3,5,7,9

First we will choose the 1st and last digit

1st -- 5 ways
last -- 5

so, out of 10, 2 numbers are out. Only 8 more left for selection
Rest can be selected in 8*7*6*5

Total --
5*5*8*7*6*5 = 42000

User avatar
Legendary Member
Posts: 1101
Joined: Fri Jan 28, 2011 7:26 am
Thanked: 47 times
Followed by:13 members
GMAT Score:640

by HSPA » Tue Nov 15, 2011 9:51 am
saketk wrote:I got B


First we will choose the 1st and last digit

42000
I totally agree with answer you got
but in your statement how to say that this is not an assumption "to choose first and the last initally". Else otherwise we are not getting an option as answer :)

Can you answer my above question to shankar??

Key entry logically starts with first to last ...
First take: 640 (50M, 27V) - RC needs 300% improvement
Second take: coming soon..
Regards,
HSPA.

Legendary Member
Posts: 966
Joined: Sat Jan 02, 2010 8:06 am
Thanked: 230 times
Followed by:21 members

by shankar.ashwin » Tue Nov 15, 2011 9:53 am
Well whenever you have conditions like these specified, try to consider them first as the others slots do not have any restrictions, so that we could directly do (8*7*6*5) as I did, in this case since repetition is not allowed we need to consider a lot of cases separately which would make it complicated (the way you're trying to solve)

So as a rule try to solve for given conditions (constraints) first and then you could solve for the remaining without any limitations.

Also note, any 6 digit integer without repetition can be formed in (9*9*8*7*6*5) ways = 136080.

You can clearly see options C,D and E are greater than this. We are definitely looking at an choice lesser than 136080. Hope it makes sense!!
HSPA wrote:I got differnet answer from B.. Please confirm my approach shankar (Thanks for your support)

P is for position:

P1: 5 ways
P2: 9
P3: 8
P4: 7
P5: 6
P6: 1 or 2 or 3 or 4 or 5

positions P2 till P5 can occupy 4 odd numbers or 4 even numbers
--if p2 to P5 has 4 odd numbers P6 has 5 even numbers to choose 1 out of it
--if p2 to p5 has 4 even number P6 has only 1 number to choose.

User avatar
Legendary Member
Posts: 1101
Joined: Fri Jan 28, 2011 7:26 am
Thanked: 47 times
Followed by:13 members
GMAT Score:640

by HSPA » Tue Nov 15, 2011 9:57 am
Your below point is awesome.. thanks...
shankar.ashwin wrote: Also note, any 6 digit integer without repetition can be formed in (9*9*8*7*6*5) ways = 136080.

You can clearly see options C,D and E are greater than this. We are definitely looking at an choice lesser than 136080. Hope it makes sense!!
HSPA wrote:I got differnet answer from B.. Please confirm my approach shankar (Thanks for your support)

P is for position:

P1: 5 ways
P2: 9
P3: 8
P4: 7
P5: 6
P6: 1 or 2 or 3 or 4 or 5

positions P2 till P5 can occupy 4 odd numbers or 4 even numbers
--if p2 to P5 has 4 odd numbers P6 has 5 even numbers to choose 1 out of it
--if p2 to p5 has 4 even number P6 has only 1 number to choose.
First take: 640 (50M, 27V) - RC needs 300% improvement
Second take: coming soon..
Regards,
HSPA.

Legendary Member
Posts: 966
Joined: Sat Jan 02, 2010 8:06 am
Thanked: 230 times
Followed by:21 members

by shankar.ashwin » Tue Nov 15, 2011 10:07 am
Also we just multiply numbers in permutation, so it really does not matter which position you consider first.
HSPA wrote:
I totally agree with answer you got
but in your statement how to say that this is not an assumption "to choose first and the last initally". Else otherwise we are not getting an option as answer :)

Can you answer my above question to shankar??

Key entry logically starts with first to last ...