Lucy's Playlist

Lucy is planning to run for an hour, and she's using her iPod for the countdown, so she has to create a 60-minute playlist.

Her iPod contains:

  • six 5-minute songs;
  • five 6-minute songs;
  • four 8-minute songs.

Count the number of possibles playlists where the order doesn't matter.

Details and Assumptions :

  • She must use up all 60 minutes for the playlist.


The answer is 621.

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.

1 solution

Discussions for this problem are now closed

Bilel Mabrouk
Jan 13, 2015

let X be the number of 5min songs , Y the number of 6 min songs and Z the number of 8min songs In order to get a 60min playlist we need to solve this equation : 5 x + 6 y + 8 z = 60 5x+6y+8z=60 where 0 x 6 0 y 5 0 z 4 0\le x\le6\\ 0\le y\le5\\ 0\le z\le4 so we get those four solutions : ( 2 , 3 , 4 ) , ( 4 , 4 , 2 ) , ( 6 , 1 , 3 ) a n d ( 6 , 5 , 0 ) (2,3,4)\quad ,\quad (4,4,2)\quad ,\quad (6,1,3)\quad and\quad (6,5,0) The number of possibles playlists is : ( 6 2 ) × ( 5 3 ) × ( 4 4 ) + ( 6 4 ) × ( 5 4 ) × ( 4 2 ) + ( 6 6 ) × ( 5 1 ) × ( 4 3 ) + ( 6 6 ) × ( 5 5 ) × ( 4 0 ) {6 \choose 2}\times{5 \choose 3}\times{4 \choose 4}+{6 \choose 4}\times{5 \choose 4}\times{4 \choose 2}+{6 \choose 6}\times{5 \choose 1}\times{4 \choose 3}+{6 \choose 6}\times{5 \choose 5}\times{4 \choose 0} 150 + 450 + 20 + 1 = 621 150+450+20+1=621

Hi, do you have a much better method than solving to find the solutions by hand ? I wasted a lot of time by the time I solved your problem .

Thanks for the same .

@brian charlesworth @Calvin Lin @Chew-Seong Cheong @abdulrahman khaled Help needed !!!

A Former Brilliant Member - 6 years, 5 months ago

Not really, you could convert it to a generating function question, and have to find the coefficient of x 60 x^ { 60 } in

( 1 + ( 6 1 ) x 5 + ( 6 2 ) x 10 + + ( 6 6 ) x 30 ) × ( 1 + ( 5 1 ) x 6 + ( 5 2 ) x 12 + + ( 5 5 ) x 30 ) × ( 1 + ( 4 1 ) x 8 + ( 4 2 ) x 16 + + ( 4 4 ) x 32 ) (1 + { 6 \choose 1} x^5 + { 6 \choose 2 } x^{10} + \ldots + { 6 \choose 6 } x^{30} ) \times \\ (1 + { 5 \choose 1} x^6 + { 5 \choose 2 } x^{12} + \ldots + { 5 \choose 5 } x^{30} ) \times \\ ( 1 + {4 \choose 1} x^8 + { 4 \choose 2} x ^{16} + \ldots + { 4 \choose 4} x^{32 } )

Though, in manually calculating this, you are no better off than the original solution, since you are doing the same calculations.

Calvin Lin Staff - 6 years, 5 months ago

Thanks sir, I had thought of using a generation function but didn't know how to create one for this particular question .

A Former Brilliant Member - 6 years, 5 months ago

I've written a code to solve the equation , I hope somebody with more knowledge in solving such problems would help us

Bilel Mabrouk - 6 years, 5 months ago

Can you please explain why 0 x , y , z 5 \quad 0\le x,y,z\le 5 ?I mean how did you decide on the upper limit of 5 . I understood rest of your solution.

Kudou Shinichi - 6 years, 5 months ago

I'm sorry , it's a mistake , I'm fixing it

Bilel Mabrouk - 6 years, 5 months ago

It's kinda rude, but is the last solution (6, 5, 0)? Sorry, that might be a little thing, but yeah, maybe it should be corrected.

Anyway, the last part is still okay. Don't worry. :D

Joeie Christian Santana - 6 years, 5 months ago

fixed it ! thank's

Bilel Mabrouk - 6 years, 5 months ago

But the question here is asking for possibilities where order DOES NOT matter

Chitrang Garg - 6 years, 4 months ago

sure , that's why I used n choose k = n!/(k!(n-k)!) , not n!/(n-k)! in other words , divide by all the possible permutations (every possible order for the same set)

Bilel Mabrouk - 6 years, 4 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...