Positive Integers Less than 10,000 --> Not Easy

This topic has expert replies
User avatar
GMAT Instructor
Posts: 15539
Joined: Tue May 25, 2010 12:04 pm
Location: New York, NY
Thanked: 13060 times
Followed by:1906 members
GMAT Score:790

by GMATGuruNY » Tue Oct 19, 2010 2:24 pm
phoenixhazard wrote:
GMATGuruNY wrote:
skalevar wrote:How many positive integers are less than 10,000 in which the sum of the digits is equals 5?

A. 31
B. 51
C. 56
D. 62
E. 93

I got started on this, but could only try to count up the ways manually. There must be a trick. Please help!

OA. is C. From Ready for GMAT.com Advanced Quant download.
Here is an efficient way to solve this problem.

Let's say that we have the 5 letters DDDDD.

However we separate the 5 letters, we will still have 5 letters:

DD DD D
D DDD D
DDDD D
DD DDD

We can think of these various groups of D's as digits that add up to 5:

DD DD D means 2 2 1
D DDD D means 1 3 1
DDDD D means 4 1
DDDDD means 5

So any grouping of the 5 letters DDDDD will give us a number the sum of whose digits is 5:

DD DD D will give us 221, 2021, 2201, or 2210.
etc.

So the question becomes:

How many ways can the 5 letters DDDDD be divided into groups?

We can have at most 4 groups, because if we divide DDDDD into 5 groups (D-D-D-D-D), we'll have a 5-digit number. Thus we can divide DDDDD at most 3 times. Let | = separation between groups.

D|D|D|DD = 1112
DD||D|DD = 2012
DD|D||DD = 2102
|DD|D|DD = 0212 = 212
DD|D|DD| = 2120
etc.

So any arrangement of the 8 elements DDDDD||| represents a number the sum of whose digits is 5.

Number of ways to arrange DDDDD||| = 8!/(5!*3!) = 56.

The correct answer is C.

By extension, the number of positive integers less than 10,000 the sum of whose digits is 4 = number of ways to arrange DDDD||| = 7!/(4!*3!) = 35.
Sorry, I don't get why you can't have D-D-D-D-D (1 1 1 1 1), that equals 5?
Because 11,111 is greater than 10,000, and we're being asked to count the positive integers less than 10,000 in which the sum of the digits is 5.
Private tutor exclusively for the GMAT and GRE, with over 20 years of experience.
Followed here and elsewhere by over 1900 test-takers.
I have worked with students based in the US, Australia, Taiwan, China, Tajikistan, Kuwait, Saudi Arabia -- a long list of countries.
My students have been admitted to HBS, CBS, Tuck, Yale, Stern, Fuqua -- a long list of top programs.

As a tutor, I don't simply teach you how I would approach problems.
I unlock the best way for YOU to solve problems.

For more information, please email me (Mitch Hunt) at [email protected].
Student Review #1
Student Review #2
Student Review #3