Consecutive integers problem

This topic has expert replies
User avatar
Senior | Next Rank: 100 Posts
Posts: 30
Joined: Fri Feb 27, 2009 12:45 am
Thanked: 1 times
GMAT Score:620

Consecutive integers problem

by chaitanyareddy » Sat Aug 21, 2010 9:34 am
How many 5-digit positive integers exist where no two consecutive digits are the
same?
A.) 9*9*8*7*6
B.) 9*9*8*8*8
C.) 9^5
D.) 9*8^4
E.) 10*9^4

Soln: C is correct.
The first place has 9 possibilities, since 0 is not to be counted. All others have 9 each,
since you cannot have the digit, which is same as the preceding one.
Hence 9^5

This is the solution given but I feel A is the correct choice.

Could you please explain.

User avatar
GMAT Instructor
Posts: 3225
Joined: Tue Jan 08, 2008 2:40 pm
Location: Toronto
Thanked: 1710 times
Followed by:614 members
GMAT Score:800

by Stuart@KaplanGMAT » Sat Aug 21, 2010 10:13 am
chaitanyareddy wrote:How many 5-digit positive integers exist where no two consecutive digits are the
same?
A.) 9*9*8*7*6
B.) 9*9*8*8*8
C.) 9^5
D.) 9*8^4
E.) 10*9^4

Soln: C is correct.
The first place has 9 possibilities, since 0 is not to be counted. All others have 9 each,
since you cannot have the digit, which is same as the preceding one.
Hence 9^5

This is the solution given but I feel A is the correct choice.

Could you please explain.
(A) is the correct answer to the following question:
How many 5-digit positive integers exist in which no two digits are the same?
However, that's not what this question is asking.

For the question posted, we don't need 5 distinct digits, we just need to ensure that no two touching digits are identical.

So, for example, 98989 would be an acceptable 5 digit number.

Working out the solution:

First digit can be 1-9, so 9 possibilities.
Second digit can be anything from 0-9 that we didn't use in the 1st slot, so 9 possibilities.
Third digit can be anything from 0-9 that we didn't use in the 2nd slot, so 9 possibilities.
Fourth digit can be anything from 0-9 that we didn't use in the 3rd slot, so 9 possibilities.
Fifth digit can be anything from 0-9 that we didn't use in the 4th slot, so 9 possibilities.

Accordingly, the answer is 9*9*9*9*9 = 9^5.

(As an aside, the use of "where" in the question is grammatically incorrect! Where can only refer to an actual place - a number is a thing, not a location.)
Image

Stuart Kovinsky | Kaplan GMAT Faculty | Toronto

Kaplan Exclusive: The Official Test Day Experience | Ready to Take a Free Practice Test? | Kaplan/Beat the GMAT Member Discount
BTG100 for $100 off a full course

Senior | Next Rank: 100 Posts
Posts: 86
Joined: Mon Sep 13, 2010 2:36 pm
Thanked: 29 times
Followed by:2 members
GMAT Score:710

by thebigkats » Sat Jan 29, 2011 6:44 pm
Hi:
why can't 0 be treated as first digit? IOW - 03456 is a good positive integer isn't it?

I reached a bit different solution, please help me on why is it wrong:

1. total no of combinations are - 10*10*10*10*10
2. for a given digit "A", it can appear in a pair in following ways - AAXXX, XAAXX, XXAAX, XXXAA where A is a given digit and X is a digit 0-9
3. So for a given digit (0 - 9), there are 4*10*10*10 such combos where at least 2 digits are consecutive
4. so total such combinations are - 10 * 4 * 10 * 10 * 10
5. Hence combos that don;t have any consecutive digits same = 10^5 - 4*10^4 = 6 * 10^4

what am I doing wrong?

Senior | Next Rank: 100 Posts
Posts: 35
Joined: Mon Jan 03, 2011 4:56 pm
Location: Calif
Thanked: 2 times
Followed by:1 members

by Everest » Sat Jan 29, 2011 7:17 pm
The first place has 9 possibilities, since 0 is not counted.
All others have 9 possibilities each, since you cannot have the digit similar to the previous one.

9 * 9 * 9 * 9 * 9 = 9^5

Senior | Next Rank: 100 Posts
Posts: 35
Joined: Mon Jan 03, 2011 4:56 pm
Location: Calif
Thanked: 2 times
Followed by:1 members

by Everest » Sat Jan 29, 2011 7:20 pm
thebigkats wrote:Hi:
why can't 0 be treated as first digit? IOW - 03456 is a good positive integer isn't it?

I reached a bit different solution, please help me on why is it wrong:

1. total no of combinations are - 10*10*10*10*10
2. for a given digit "A", it can appear in a pair in following ways - AAXXX, XAAXX, XXAAX, XXXAA where A is a given digit and X is a digit 0-9
3. So for a given digit (0 - 9), there are 4*10*10*10 such combos where at least 2 digits are consecutive
4. so total such combinations are - 10 * 4 * 10 * 10 * 10
5. Hence combos that don;t have any consecutive digits same = 10^5 - 4*10^4 = 6 * 10^4

what am I doing wrong?
dude, I never saw a number starting with 0 ...lol...if you read the question properly it says : where no two consecutive digits are the same

Senior | Next Rank: 100 Posts
Posts: 86
Joined: Mon Sep 13, 2010 2:36 pm
Thanked: 29 times
Followed by:2 members
GMAT Score:710

by thebigkats » Sat Jan 29, 2011 10:47 pm
Hi:
I can understand the no not starting with 0 part (although don;t agree with it :-) ) but why did you mention "if you read the question properly it says : where no two consecutive digits are the same". I understand that part and hence am trying to calculate ALL combinations and then removing those that have two or more consecutive no's in them.
Even if I were to take out no's starting with 0, it gives me total of 9*10*10*10*10 combos and then based on logic given above, I get total of (3 * 10 * 10 * 10) for no's 00 and 4*10*10*10 for other 9 digits. So total with consecutive same no's = 3*10^3+9*4*10^3 = 10^3*(3+36) = 39*10^3
So combos that don;t have any consecutive no's= 9 * 10^4 - 39 *10^3 = 10^3 * (90-39) = 51 * 10^3

help ...

User avatar
GMAT Instructor
Posts: 3225
Joined: Tue Jan 08, 2008 2:40 pm
Location: Toronto
Thanked: 1710 times
Followed by:614 members
GMAT Score:800

by Stuart@KaplanGMAT » Sun Jan 30, 2011 7:05 am
thebigkats wrote:Hi:
I can understand the no not starting with 0 part (although don;t agree with it :-) ) but why did you mention "if you read the question properly it says : where no two consecutive digits are the same". I understand that part and hence am trying to calculate ALL combinations and then removing those that have two or more consecutive no's in them.
Even if I were to take out no's starting with 0, it gives me total of 9*10*10*10*10 combos and then based on logic given above, I get total of (3 * 10 * 10 * 10) for no's 00 and 4*10*10*10 for other 9 digits. So total with consecutive same no's = 3*10^3+9*4*10^3 = 10^3*(3+36) = 39*10^3
So combos that don;t have any consecutive no's= 9 * 10^4 - 39 *10^3 = 10^3 * (90-39) = 51 * 10^3

help ...
Hi,

regarding the "0" issue, 0 is considered an insignificant digit (which is why it spends so much time in therapy). By convention, you ignore the 0s at the beginning of numbers when counting the digits. Doesn't matter if you agree or not, that's the way math has developed.

I really don't understand your counting method at all, but I've found at least one error with it - you're double (and triple and quadruple) subtracting some numbers.

For example, "11223" - you've subtracted it once because of the "11" at the start and a second time for the "22" in the middle. You've quadruple subtracted numbers like "11111".

Because of all of the combinations of double/triple/quadruple counting, answering this question via the "subtract what you don't want from what you do want" method is incredibly complex and likely to take far more time than the methods noted above.
Image

Stuart Kovinsky | Kaplan GMAT Faculty | Toronto

Kaplan Exclusive: The Official Test Day Experience | Ready to Take a Free Practice Test? | Kaplan/Beat the GMAT Member Discount
BTG100 for $100 off a full course

Senior | Next Rank: 100 Posts
Posts: 86
Joined: Mon Sep 13, 2010 2:36 pm
Thanked: 29 times
Followed by:2 members
GMAT Score:710

by thebigkats » Sun Jan 30, 2011 9:03 am
HI Stuart:

thx. Makes sense. I understand the part where 0 at beginning of a no is ignored. I guess my training in semiconductors made me get confused where position has to be tracked/counted even if it doesn't add significance to the end result (IOW 01234, although has a value of 1234, still is treated like 01234 because that is how digital logic understands it :-) )

In any case, thanks much

regards,

User avatar
GMAT Instructor
Posts: 3225
Joined: Tue Jan 08, 2008 2:40 pm
Location: Toronto
Thanked: 1710 times
Followed by:614 members
GMAT Score:800

by Stuart@KaplanGMAT » Sun Jan 30, 2011 11:00 am
thebigkats wrote:HI Stuart:

thx. Makes sense. I understand the part where 0 at beginning of a no is ignored. I guess my training in semiconductors made me get confused where position has to be tracked/counted even if it doesn't add significance to the end result (IOW 01234, although has a value of 1234, still is treated like 01234 because that is how digital logic understands it :-) )

In any case, thanks much

regards,
Hi,

if we were talking about a 5 digit code, then we'd have to consider cases in which 0 is the first digit (we sometimes see questions like this on the GMAT, so it's a good point). However, if we're talking about a 5 digit number, we're only talking about the numbers from 10000 to 99999.

So, if we change the original question to:
A certain door is unlocked by a 5 digit code. If no two consecutive digits can be the same, how many different door codes are possible?
then the correct answer would be 10*9*9*9*9.
Image

Stuart Kovinsky | Kaplan GMAT Faculty | Toronto

Kaplan Exclusive: The Official Test Day Experience | Ready to Take a Free Practice Test? | Kaplan/Beat the GMAT Member Discount
BTG100 for $100 off a full course

Master | Next Rank: 500 Posts
Posts: 102
Joined: Fri Nov 05, 2010 7:10 am
Thanked: 8 times
Followed by:2 members
GMAT Score:690

by gmatjeet » Mon Jan 31, 2011 1:12 pm
Can someone suggest why is this counting incorrect !!



Working out the solution:

Fifth digit can be anything from 0-9, so 10 possibilities.
Fourth digit can be anything from 0-9 that we didn't use in the 5th slot, so 9 possibilities.
Third digit can be anything from 0-9 that we didn't use in the 4th slot, so 9 possibilities.
Second digit can be anything from 0-9 that we didn't use in the 3rd slot, so 9 possibilities.
First digit can be 1-9 that we didn't use in the 3rd slot , so 8 possibilities.

The total possible combinations in this case are 8*9*9*9*10

Someone please explain and help
:roll:

Legendary Member
Posts: 1337
Joined: Sat Dec 27, 2008 6:29 pm
Thanked: 127 times
Followed by:10 members

by Night reader » Mon Jan 31, 2011 1:38 pm
chaitanyareddy wrote:How many 5-digit positive integers exist where no two consecutive digits are the
same?
A.) 9*9*8*7*6
B.) 9*9*8*8*8
C.) 9^5
D.) 9*8^4
E.) 10*9^4

Soln: C is correct.
The first place has 9 possibilities, since 0 is not to be counted. All others have 9 each,
since you cannot have the digit, which is same as the preceding one.
Hence 9^5

This is the solution given but I feel A is the correct choice.

Could you please explain.
ABCDE --> 5-digit integer
A has 9 possibilities {1,2,3,4,...9} -->9
B has 10 possibilities {0,1,2,3,4 ..9} and exclude one digit from A's set -->9
C has 10 possibilities {0,1,2,3,4 ..9} and exclude one digit from B's set -->9
D has 10 possibilities {0,1,2,3,4 ..9} and exclude one digit from C's set -->9
E has 10 possibilities {0,1,2,3,4 ..9} and exclude one digit from D's set -->9

9^5 and the correct answer is \C :)

@gmatjeet:
Can someone suggest why is this counting incorrect !!



Working out the solution:

Fifth digit can be anything from 0-9, so 10 possibilities.
Fourth digit can be anything from 0-9 that we didn't use in the 5th slot, so 9 possibilities.
Third digit can be anything from 0-9 that we didn't use in the 4th slot, so 9 possibilities.
Second digit can be anything from 0-9 that we didn't use in the 3rd slot, so 9 possibilities.
First digit can be 1-9 that we didn't use in the 3rd slot , so 8 possibilities.

The total possible combinations in this case are 8*9*9*9*10

Someone please explain and help
Rolling Eyes
we can not start from the end, as we need to assign the five-digit number first hand and not to find the total possible combination of all numbers starting from units (single-digit numbers) to the five-digit numbers

one needs to develop the combination from A and not from E, which is responsible for units and hence makes good start for single-digit numbers as well :)

hope this helps

Senior | Next Rank: 100 Posts
Posts: 86
Joined: Mon Sep 13, 2010 2:36 pm
Thanked: 29 times
Followed by:2 members
GMAT Score:710

by thebigkats » Mon Jan 31, 2011 1:46 pm
Hi gmatjeet:

Consider following no's -
10234
20345
30456
40567
50678
60789
70891
80912
90123

as you can see the 1st digit can have 9 possibiilties when second digit is 0. So the statement "First digit can be 1-9 that we didn't use in the 3rd slot , so 8 possibilities" is not true in all case.

At least when second digit is 0, there are 9 possibilities in 1st digit. and for that given 1st digit 'x' (when second digit is 0) you can have 9*9*9 more combinations (for last 3 digits) whcih are missing from your calculations.

So if you put them together, TOTAL = 9*9*9 + 8*9*9*9*10 = 9*9*9 (80+1) = 9*9*9*9*9 whcih is same as presented by Stuart et al

cheers

Legendary Member
Posts: 1337
Joined: Sat Dec 27, 2008 6:29 pm
Thanked: 127 times
Followed by:10 members

by Night reader » Mon Jan 31, 2011 3:30 pm
thebigkats wrote:Hi gmatjeet:

Consider following no's -
10234
20345
30456
40567
50678
60789
70891
80912
90123

as you can see the 1st digit can have 9 possibiilties when second digit is 0. So the statement "First digit can be 1-9 that we didn't use in the 3rd slot , so 8 possibilities" is not true in all case.

At least when second digit is 0, there are 9 possibilities in 1st digit. and for that given 1st digit 'x' (when second digit is 0) you can have 9*9*9 more combinations (for last 3 digits) whcih are missing from your calculations.

So if you put them together, TOTAL = 9*9*9 + 8*9*9*9*10 = 9*9*9 (80+1) = 9*9*9*9*9 whcih is same as presented by Stuart et al

cheers
careful though 234, 345, ... consecutive integers

User avatar
Master | Next Rank: 500 Posts
Posts: 143
Joined: Sat Nov 06, 2010 9:06 pm
Thanked: 10 times
Followed by:1 members

by edvhou812 » Wed Mar 09, 2011 10:52 pm
I hate the number 0. Always screws me up. 0 is only good when there are more of them in my bank account balance.
I don't know what to say, really. Three minutes to the biggest battle of our professional lives. You find out life's this game of inches, so is football. Because in either game - life or football - the margin for error is so small. I mean, one half a step too late or too early and you don't quite make it. One half second too slow, too fast and you don't quite catch it. I'll tell you this, in any fight it's the guy whose willing to die whose gonna win that inch. That's football guys, that's all it is. Now, what are you gonna do?

Junior | Next Rank: 30 Posts
Posts: 13
Joined: Sat Feb 05, 2011 10:39 pm
Location: Bangalore, India

by banibhusan » Sun Apr 24, 2011 7:14 pm
Night reader wrote:
thebigkats wrote:Hi gmatjeet:

Consider following no's -
10234
20345
30456
40567
50678
60789
70891
80912
90123

as you can see the 1st digit can have 9 possibiilties when second digit is 0. So the statement "First digit can be 1-9 that we didn't use in the 3rd slot , so 8 possibilities" is not true in all case.

At least when second digit is 0, there are 9 possibilities in 1st digit. and for that given 1st digit 'x' (when second digit is 0) you can have 9*9*9 more combinations (for last 3 digits) whcih are missing from your calculations.

So if you put them together, TOTAL = 9*9*9 + 8*9*9*9*10 = 9*9*9 (80+1) = 9*9*9*9*9 whcih is same as presented by Stuart et al

cheers
careful though 234, 345, ... consecutive integers
The question says that any two consecutive digits in the number has to be different. It doesn't matter whether the 5 digit numbers are consecutive or not.