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
Counting - how?
This topic has expert replies
- sanju09
- GMAT Instructor
- Posts: 3650
- Joined: Wed Jan 21, 2009 4:27 am
- Location: India
- Thanked: 267 times
- Followed by:80 members
- GMAT Score:760
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
Sanjeev K Saxena
Quantitative Instructor
The Princeton Review - Manya Abroad
Lucknow-226001
www.manyagroup.com
GMAT/MBA Expert
- Rahul@gurome
- GMAT Instructor
- Posts: 1179
- Joined: Sun Apr 11, 2010 9:07 pm
- Location: Milpitas, CA
- Thanked: 447 times
- Followed by:88 members
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.
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)
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)
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
Contact details: (+91)522-2200123 (+91)9369336687
Email: [email protected]
Located at Lucknow, India
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
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
-
- Senior | Next Rank: 100 Posts
- Posts: 30
- Joined: Wed Oct 06, 2010 11:33 pm
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.
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.