Counting - how?

This topic has expert replies
Master | Next Rank: 500 Posts
Posts: 107
Joined: Sat Feb 27, 2010 11:10 am
GMAT Score:690

Counting - how?

by singhsa » Fri Sep 17, 2010 4:13 pm
How do we do these kind of problems?


How many integers between 1 and 10^21 are such that the sum of their digits is 2?

OA - 231
Last edited by singhsa on Sat Sep 18, 2010 8:13 pm, edited 1 time in total.

User avatar
GMAT Instructor
Posts: 3650
Joined: Wed Jan 21, 2009 4:27 am
Location: India
Thanked: 267 times
Followed by:80 members
GMAT Score:760

by sanju09 » Fri Sep 17, 2010 9:53 pm
singhsa wrote:How do we do these kind of problems?


How many integers between 1 and 1021 are such that the sum of their digits is 2?

OA - 231

We have the biggest possibility as a 4-digit integer 1010, so let's deal with the smallest possibility as 0002 only; and for 4-digit integers, 3 separations (say $$$) are required. Let's represent the sum of 2 by two asterisks **, and as we've allowed ourselves to take '0' into account in order to complete the four digit-locations, more than one separations can be put at a given digit-location.

With this, 0002 or 0011 may now be taken as $$$** or $$*$*, respectively. In other words, the question in chief is asking us to find all the permutations for the five locations like $$$** or $$*$*. It has got 2 items of one type and 3 of another type, total is 5, and the permutations are

= 5!/ (2! 3!)

= 10

We can count this on finger tips too

0002
0020
0200
0011
0101
0110
1001
1010

Since we cannot include 1100 and 2000, hence [spoiler]8 only.


I don't know why and how it's 231.
[/spoiler]
The mind is everything. What you think you become. -Lord Buddha



Sanjeev K Saxena
Quantitative Instructor
The Princeton Review - Manya Abroad
Lucknow-226001

www.manyagroup.com

GMAT/MBA Expert

User avatar
GMAT Instructor
Posts: 1179
Joined: Sun Apr 11, 2010 9:07 pm
Location: Milpitas, CA
Thanked: 447 times
Followed by:88 members

by Rahul@gurome » Fri Sep 17, 2010 10:44 pm
Let us first calculate the number of integers between 1 and 1000 such that the sum of their digits is 2.
In between 1 and 1000, there are single digit integers, 2 digit integers and 3 digit integers.
We next calculate the number of single digit integers whose sum of digits is 2.
2 is only 1 such single digit integer.
We next calculate the number of two digit integers whose sum of digits is 2.
They are 11 and 20 and they are 2 in number.
Next calculate the number of 3 digit integers whose sum of digits is 2.
They are 101, 110 and 200 and they are 3 in number.
Next calculate the number of integers between 1000 and 1021 whose sum of digits is 2.
They are 1001 and1010 and they are 2 in number.
The total number of such integers is 1+2+3+2 = 8.
Rahul Lakhani
Quant Expert
Gurome, Inc.
https://www.GuroMe.com
On MBA sabbatical (at ISB) for 2011-12 - will stay active as time permits
1-800-566-4043 (USA)
+91-99201 32411 (India)

Junior | Next Rank: 30 Posts
Posts: 15
Joined: Fri Jul 30, 2010 4:55 am
Location: India

by RCV » Fri Sep 17, 2010 11:00 pm
Thanks sanju09 for sharing the technique, I am sure it would help for the bigger summations too, where we cannot count the possibilities on the tip of fingers. There is something wrong either with the question or with the oa, please check it singhsa.
sanju09 wrote:
singhsa wrote:How do we do these kind of problems?


How many integers between 1 and 1021 are such that the sum of their digits is 2?

OA - 231

We have the biggest possibility as a 4-digit integer 1010, so let's deal with the smallest possibility as 0002 only; and for 4-digit integers, 3 separations (say $$$) are required. Let's represent the sum of 2 by two asterisks **, and as we've allowed ourselves to take '0' into account in order to complete the four digit-locations, more than one separations can be put at a given digit-location.

With this, 0002 or 0011 may now be taken as $$$** or $$*$*, respectively. In other words, the question in chief is asking us to find all the permutations for the five locations like $$$** or $$*$*. It has got 2 items of one type and 3 of another type, total is 5, and the permutations are

= 5!/ (2! 3!)

= 10

We can count this on finger tips too

0002
0020
0200
0011
0101
0110
1001
1010

Since we cannot include 1100 and 2000, hence [spoiler]8 only.


I don't know why and how it's 231.
[/spoiler]
MBA admissions in leading universities of USA, Canada, UK, Australia, New Zealand, Singapore, Dubai.
Contact details: (+91)522-2200123 (+91)9369336687
Email: [email protected]
Located at Lucknow, India

Master | Next Rank: 500 Posts
Posts: 107
Joined: Sat Feb 27, 2010 11:10 am
GMAT Score:690

by singhsa » Sat Sep 18, 2010 8:13 pm
I'm really sorry guys....its 10^21 and not 1021.

Extremely sorry for that.

Master | Next Rank: 500 Posts
Posts: 160
Joined: Mon Apr 05, 2010 4:41 am
Thanked: 7 times

by gmat1011 » Sat Sep 18, 2010 9:21 pm
With the revised question I get 253

The numbers can be in 2 forms

(a) 2 and a combination of 0s from 1 to a 10^21 (a 22 digit number) which sum to 2 ----> a total of 22 such numbers can be set up with 2 occupying each of the 22 digits once and 0s everywhere else

(b) a combination of 1s from 1 to a 10^21 (a 22 digit number) which sum to 2 ----> a total of 231 such numbers are possible
starting from 11; a pattern quickly emerges for 2 digit numbers only 1 such number is possible; for 3 digits only 2 such numbers are possible (101 and 110); for 4 digits only 3 such numbers are possible...... for 22 digits only 21 such numbers would be possible...

so 1+2+3.....+21 = 231

So it should be 231 + 22 = 253

User avatar
Newbie | Next Rank: 10 Posts
Posts: 1
Joined: Mon Jun 28, 2010 8:50 am

by bhairavm » Wed Oct 06, 2010 8:13 pm
How about 20....Is this a 2 digit integer with sum of 2 digits =2. Your following statement says from 1 to 99 only 1 integer is possible i.e. 11. I think 20 is another number in 1 to 99 where sum of integer is 2.

B

Senior | Next Rank: 100 Posts
Posts: 30
Joined: Wed Oct 06, 2010 11:33 pm

by deepak123gmat » Sat Oct 09, 2010 12:39 am
How many integers between 1 and 1021 are such that the sum of their digits is 2?

between 1 and 10 - one number i.e. 2
between 11 and 20 - two numbers i.e. 11 and 20
between 21 and 30 - one number i.e. 29 (careful sum of digits is 2)
and so on...

Between 1 and 100 - 11 numbers
between 101 and 200 - 11 numbers
.
.
.
.
between 2001 and 2100 - 11 numbers

answer = 20*11 = 220

for answer to be 231, number range must be from 1 to 2200.
Please check.