Lights on!

Probability Level pending

At 7pm, the 50 story building that Calvin works in has some floors which have the lights on and some floors which have the lights off. 50 people p 1 , p 2 , , p 50 p_1, p_2, \ldots, p_{50} walk past the building, and person p i p_i looks at floors i , 2 i , 3 i , i, 2i, 3i, \ldots and records the number of floors he looked at that had the lights on as x i x_i . Calvin calculates that i = 1 50 x i = 200 \sum\limits_{i=1}^{50} x_i = 200 . If at least 47 floors had their lights on, determine the number of possible combinations of floors which had their lights on.


The answer is 734.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

4 solutions

Jatin Yadav
Sep 25, 2013

A floor will be seen by all its factors.

Between 1-50 , there are:

1 1 number which has 1 1 factor

15 15 numbers having 2 2 factors

4 4 numbers having 3 3 factors,

15 15 numbers having 4 4 factors

1 1 number having 5 5 factors

8 8 numbers having 6 6 factors ,

No number having 7 7 factors.

4 4 numbers having 8 8 factors,

1 1 number each having 9 9 and 10 10 factors .

If all 50 floors are switched on , we check that i = 1 50 x i = 207. \displaystyle \sum_{i = 1}^{50} x_{i} = 207.

Hence we now have to switch off the lights of floors in such a manner that sum of their factors is 7 7 .

Case 1 : 49 floors have lights on :

Now we should switch off a floor having 7 factors , which is impossible Hence no such way.

Case 2 : 48 floors have lights on :

Now we have to switch off two floors such that the sum of their factors is 7. (i) The floors switched off have factors 6 6 and 1 1 , ( 8 1 ) ( 1 1 ) {8 \choose 1} {1 \choose 1} = 8 8 ways.

(ii)The floors switched off have factors 5 5 and 2 2 , ( 1 1 ) ( 15 1 ) {1 \choose 1} {15 \choose 1} = 15 15 ways.

(iii)The floors switched off have factors 4 4 and 3 3 , ( 15 1 ) ( 4 1 ) {15 \choose 1} {4 \choose 1} = 60 60 ways.

Case 2 : Now we have to switch off 3 floors such that the sum of their factors is 7.

(i) Floors switched off have factors 1 1 , 2 2 and 4 4 , ( 1 1 ) ( 15 1 ) ( 15 1 ) = 225 {1 \choose 1}{15 \choose 1}{15 \choose 1} = 225 ways.

(ii) Floors switched off have factors 2 2 , 2 2 and 3 3 , ( 15 2 ) ( 4 1 ) = 420 {15 \choose 2} {4 \choose 1} = 420 ways.

(iii) Floors switched off have factors 3 3 , 3 3 and 1 1 , ( 4 2 ) ( 1 1 ) = 6 {4 \choose 2}{1 \choose 1} = 6 ways.

Hence, total no. of ways = 8 8 + 15 15 + 60 60 + 225 225 + 420 420 + 6 6 = 734 = \fbox{734} .

That's probably the silliest mistake I ever made...considering order subconsciously for the {3,3,1} & {2,2,3} cases... :( Nice solution! (I did it the same way but didn't get it right)

A Brilliant Member - 7 years, 8 months ago
Michael Tong
Sep 22, 2013

First it is useful to calculate what the sum would equal if the lights on all floors were turned on. This is given by i = 1 50 50 i \sum_{i = 1}^{50} \lfloor \frac {50}{i} \rfloor , which is actually quite easy to brute force and find 207 207 .

Next, I claim that the number of people who look at a certain floor is given by the number of divisors of that floor number. This is because a person with number i i sees a floor iff the floor number is divisible by i i . Say a person with an i i that is not a divisor of the floor number sees that floor. Since that person only sees floors that are a multiple of i i , then that means that floor number must be divisible by i i , which is a contradiction.

Since at least 47 47 floors had their lights on, we look to find combinations of 1 , 2 , 1, 2, or 3 3 positive integers f 50 f \leq 50 such that the σ 0 ( f ) = 7 \sum σ_0(f) = 7 ( σ 0 ( f ) σ_0(f) is the divisor function). Let us consider these cases separately:

If there is only 1 1 floor which has their lights off, then the number of divisors of that floor number must be 7 7 . Since any number with more than one unique prime factor yields a composite number of divisors, the number we are looking for must be a prime sixth power. The lowest such number is 2 6 = 64 2^6 = 64 , which is not less than 50 50 , so there are no such floors.

When there are two floors with their lights off, the number of divisors can be split as follows: ( 1 , 6 ) , ( 2 , 5 ) , ( 3 , 4 ) (1, 6), (2, 5), (3, 4) . So now we need to find the number of integers less than 50 with such a number of divisors.

There is only one integer with 1 1 divisor, and that is 1 1 . A number with two divisors is prime, and there are 15 15 primes less than 50. For an integer to have 3 divisors it must be a prime power of two (using the same logic as above, since 3 is prime), which yields 4 , 9 , 25 , 49 4, 9, 25, 49 . For an integer to have 4 divisors it must either be a prime power of three or a number which can be expressed as p q p * q where p p and q q are primes. This yields 8 , 27 8, 27 and 2 3 2 23 , 3 5 3 13 , 5 7 = 2 + 13 = 15 2 * 3 \rightarrow 2*23, 3*5 \rightarrow 3*13, 5*7 = 2 + 13 = 15 integers. For five divisors it must be a prime power of four leaving only 16 16 as an answer, and finally for six divisors it must either be 2 5 = 32 2^5 = 32 or a number of the form p 2 q p^2 * q , which yields another 1 + 7 1 + 7 solutions. To recap, 1 1 , 2 15 , 3 4 , 4 15 , 5 1 , 6 8 1 \rightarrow 1, 2 \rightarrow 15, 3 \rightarrow 4, 4 \rightarrow 15, 5 \rightarrow 1, 6 \rightarrow 8 .

Now that we found these, we can easily calculate the number for each case, namely 8 + 15 + 60 = 83 8 + 15 + 60 = 83

When 3 floors have their lights off, then the following figurations can be conceived: ( 2 , 2 , 3 ) , ( 1 , 3 , 3 ) , ( 1 , 2 , 4 ) (2, 2, 3), (1, 3, 3), (1, 2, 4) . Note that there can only be a single 1 in any configuration since 1 is the only number with 1 divisor. Using the values we calculated before, we get the number of answers in this case to be 4 ( 15 2 ) + ( 4 2 ) + ( 15 ) ( 15 ) = 420 + 6 + 225 = 651 4{15 \choose 2} + {4 \choose 2} + (15)(15) = 420 + 6 + 225 = 651 .

Thus, the total number of configurations is 651 + 83 = 734 651 + 83 = 734 .

this is exactly what i did.. :\ but it was too hectic..

Soham Chanda - 7 years, 8 months ago

I did the problem the same way... miscounting the first two times and then being careful and nailing it the third time ... but the whole time I was asking myself "is there an easier way to do this?"

If there is not an easier way to do it, then I don't think that this problem is particularly elegant since it just requires brute force computation. I guess the only scrap of elegance lies in your method of counting how many different integers <= 50 there are that have k divisors for k=1,2,...6

Alex Porush - 7 years, 8 months ago

Log in to reply

This could be approached better, by first calculating the number of integers which have k k factors, and proceeding as in Jatin's solution.

It is not particularly hard, but is slightly tedious.

Calvin Lin Staff - 7 years, 8 months ago

Log in to reply

I think it's easier to calculate it as Michael did (by just taking the divisors in groups and calculating like that) than magically finding the divisors of numbers (he does not even explain how he got that, assumption would say from a table online)

John King - 7 years, 8 months ago

Log in to reply

@John King i just checked with with a pen and a paper, its too easy , i bet it is less than 5 minutes work.

jatin yadav - 7 years, 8 months ago

I did the same but calculated the sum of floors as 205 ... threw the rest of it off a bit. Maybe this one fell through from the programming section...

Matt McNabb - 7 years, 8 months ago

First let us investigate the case when all 50 50 floors have their lights on. Then, the i t h i^{th} man records the floors which are multiples of i i . Thus, x i x_i will simply be the number of multiples of i i in the range [ 1 , 50 ] [1,50] , i.e x i = 50 i x_i= \left \lfloor \frac{50}{i} \right \rfloor

Then, i = 1 200 x i = i = 1 200 50 i \sum_{i=1}^{200} x_i= \sum_{i=1}^{200} \left \lfloor \frac{50}{i} \right \rfloor We can manually compute the sum and show that it is equal to 207 207 . Thus all 50 50 floors cannot have their lights switched on. Let n n floors have their lights switched off, and let { a 1 , a 2 , , a n } \{a_1, a_2, \cdots , a_n \} be the set of the number of floors which have their lights switched off. Each a i a_i will be missed by exactly d ( a i ) d(a_i) people (where d ( X ) d(X) denotes the number of positive divisors of X X ). We want exactly 7 7 floors to be missed, so we must have i = 1 n d ( a i ) = 207 200 = 7 \sum_{i=1}^{n} d(a_i)= 207-200= 7 Before we proceed on doing casework on n n , let's first find the number of solutions to d ( m ) = n d(m)=n for 1 n 7 1 \leq n \leq 7 and 1 m 50 1\leq m \leq 50 .

d ( m ) = 7 \underline{d(m)=7} For d ( m ) d(m) to be 7 7 , we must have m = p 6 m=p^6 for some prime p p . The minimum possible value of m m will then be 2 6 = 64 2^6=64 , which is clearly greater than 50 50 . Hence this equation does not have any solutions.

d ( m ) = 6 \underline{d(m)=6} For d ( m ) d(m) to be 6 6 , m m must be either of the form p 5 p^5 or p q 2 pq^2 for some distinct primes p p and q q . If m = p 5 m=p^5 , the only possibility of p p which keeps m m in the desired range is 2 2 . Let's investigate the second case. For p = 2 p=2 , the possibilities for q q are 3 , 5 3, 5 . For p = 3 p=3 , the only possibility of q q is 2 2 . For p = 5 p=5 , the only possibilities of q q are 2 2 and 3 3 . For p = 7 p=7 and p = 11 p=11 , we have q = 2 q=2 . There are no possibilities for q q when p > 11 p>11 . Thus the equation d ( m ) = 6 d(m)=6 has 8 8 solutions.

d ( m ) = 5 \underline{d(m)=5} For d ( m ) d(m) to be 5 5 , m m must be equal to p 4 p^4 for some prime p p . The only possibility for p p is 2 2 , so d ( m ) = 5 d(m)=5 has 1 1 solution.

d ( m ) = 4 \underline{d(m)=4} For d ( m ) d(m) to be 4 4 , m m has to be either equal to p 3 p^3 or p q pq for some distinct primes p p and q q . If m = p 3 m=p^3 , the only possibilities for p p are 2 2 and 3 3 . Let's see the second case. For p = 2 p=2 , the possibilities for q q are 3 , 5 , 7 , 11 , 13 , 15 , 17 , 19 , 23 3,5,7,11,13,15,17,19,23 . Proceeding similarly, one can show that the second case has 13 13 solutions. So d ( m ) = 4 d(m)=4 has 15 15 solutions in total.

d ( m ) = 3 \underline{d(m)=3} For d ( m ) d(m) to be 3 3 , m m has to be of the form p 2 p^2 . The possibilities for p p are 2 , 3 , 5 , 7 2,3,5,7 , so this equation has 4 4 solutions in total.

d ( m ) = 2 \underline{d(m)=2} For d ( m d(m to be 2 2 , m m has to be a prime. Since there are 15 15 primes 50 \leq 50 , this equation has 15 15 solutions in total.

d ( m ) = 1 \underline{d(m)=1} The only possible value of m m is 1 1 , so this equation has only 1 1 solution.

Now we are ready to do casework on the number of floors which had their lights off.

Exactly 1 1 floor had its lights off
Let x x be the number of the floor which had its switch off. Then we must have d ( x ) = 7 d(x)=7 . But by our previous analysis, this case has no solutions.

Exactly 2 2 floors had their lights off
Let x x and y y ( x y x \neq y ) be the number of the floors which had their lights off. Then we have d ( X ) + d ( Y ) = 7 d(X)+d(Y)=7 . By symmetry assume d ( X ) d ( Y ) d(X) \geq d(Y) . Below we tabulate the possibilities for ( d ( X ) , d ( Y ) ) (d(X),d(Y)) and its number of solutions.
[Here](http://postimg.org/image/6cl1atgvp/) is the link in case the picture doesn't load Here is the link in case the picture doesn't load
This gives 60 + 75 + 8 = 83 60+75+8= 83 solutions in total.


Exactly 3 3 floors had their lights off
Let x x , y y , and z z (pairwise distinct) be the numbers of the floors which had their lights off. Then we have d ( X ) + d ( Y ) + d ( Z ) = 7 d(X)+d(Y)+d(Z)=7 . By symmetry assume d ( X ) d ( Y ) d ( Z ) d(X) \geq d(Y) \geq d(Z) . The possibilities for ( d ( X ) , d ( Y ) , d ( Z ) ) (d(X),d(Y),d(Z)) are ( 3 , 2 , 2 ) (3,2,2) , ( 3 , 3 , 1 ) (3,3,1) , ( 4 , 2 , 1 ) (4,2,1) , and ( 5 , 1 , 1 ) (5,1,1) . By similar casework (most of which is omitted here because of its length), we can show that this equation has 651 {651} solutions in total.

So the total number of possible combinations is 651 + 83 = 734 651+83= \boxed{734} .

Note In this process, we have proved the following interesting lemma which can be easily generalized to n n in place of 50 50 : i = 1 n d ( i ) = i = 1 n n i \sum_{i=1}^{n} d(i)= \sum_{i=1}^{n} \left \lfloor \frac{n}{i} \right \rfloor Also note that we were basically finding the number of solutions to d ( X ) + d ( Y ) = 7 d(X)+d(Y)=7 and d ( X ) + d ( Y ) + d ( Z ) = 7 d(X)+d(Y)+d(Z)=7 . Was the time 7 7 p.m a hint to indicate this? :)

Note that a result from Gauss can be used to simplify the sum: k = 1 n n k = n 2 + 2 k = 1 n n k \displaystyle \sum_{k=1}^n \left \lfloor \frac{n}{k} \right \rfloor =-\left \lfloor \sqrt{n} \right \rfloor ^2 +2\sum_{k=1}^{ \left \lfloor \sqrt{n} \right \rfloor } \left \lfloor \frac{n}{k} \right \rfloor

http://en.wikipedia.org/wiki/Divisor summatory function#Definition

A L - 7 years, 8 months ago

Log in to reply

Thanks! I did not know this result. Seems interesting. So I believe in this paticular case, k = 1 200 200 k = 2 k = 1 14 n k 196 \sum \limits_{k=1}^{200} \left \lfloor \frac{200}{k} \right \rfloor = 2 \sum \limits_{k=1}^{14} \left \lfloor \frac{n}{k} \right \rfloor - 196

Sreejato Bhattacharya - 7 years, 8 months ago

Probably it Is a hint. Didn't realize it, though...

Vincent Tandya - 7 years, 8 months ago

Solution adorned with colors! Wow, up voted! :)

A Brilliant Member - 7 years, 8 months ago
Conner Davis
Sep 23, 2013

Let f(n) be the number of divisors of n. (Also known as the sigma 0 function). For each floor, n, f(n) people will check it. Thus it being off subtracts f(n) from the maximal count. Let g(k) be the number of integers, n, less than 50 for which f(n) =k. Some tedious calculation yields: G(1)=1 G(2)=15 G(3)=4 G(4)=15 G(5)=1 G(6)=8 G(7)=0 G(8)=4 G(9)=1 G(10)=1 The maximum possible sum of x i becomes 1 g(1)+2 g(2) ...+10 g(10)=207 Calvin counted 200. Therefore if floors a, b, and c are off then f(a)+f(b)+f(c)=7. Keeping in mind that at most 3 floors had their lights off, we partition 7 into at most 3 parts. Then, for each partition, calculate the number of ways it could occur. This is the number of ways you could choose 3 or fewer floors to have their lights off and still have a sum of 200. 7,6+1,5+2,4+3,5+1+1,4+1+2,3+2+2, and 3+3+1 can occur in 0,8,15,60,0,225,420, and 6 ways, respectively. Adding them all together yields the correct answer, 734.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...