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:
Count the number of possibles playlists where the order doesn't matter.
Details and Assumptions :
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.
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 !!!
Not really, you could convert it to a generating function question, and have to find the coefficient of x 6 0 in
( 1 + ( 1 6 ) x 5 + ( 2 6 ) x 1 0 + … + ( 6 6 ) x 3 0 ) × ( 1 + ( 1 5 ) x 6 + ( 2 5 ) x 1 2 + … + ( 5 5 ) x 3 0 ) × ( 1 + ( 1 4 ) x 8 + ( 2 4 ) x 1 6 + … + ( 4 4 ) x 3 2 )
Though, in manually calculating this, you are no better off than the original solution, since you are doing the same calculations.
Thanks sir, I had thought of using a generation function but didn't know how to create one for this particular question .
I've written a code to solve the equation , I hope somebody with more knowledge in solving such problems would help us
Can you please explain why 0 ≤ x , y , z ≤ 5 ?I mean how did you decide on the upper limit of 5 . I understood rest of your solution.
I'm sorry , it's a mistake , I'm fixing it
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
fixed it ! thank's
But the question here is asking for possibilities where order DOES NOT matter
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)
Problem Loading...
Note Loading...
Set Loading...
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 = 6 0 where 0 ≤ x ≤ 6 0 ≤ y ≤ 5 0 ≤ z ≤ 4 so we get those four solutions : ( 2 , 3 , 4 ) , ( 4 , 4 , 2 ) , ( 6 , 1 , 3 ) a n d ( 6 , 5 , 0 ) The number of possibles playlists is : ( 2 6 ) × ( 3 5 ) × ( 4 4 ) + ( 4 6 ) × ( 4 5 ) × ( 2 4 ) + ( 6 6 ) × ( 1 5 ) × ( 3 4 ) + ( 6 6 ) × ( 5 5 ) × ( 0 4 ) 1 5 0 + 4 5 0 + 2 0 + 1 = 6 2 1