Subject: How To: Look 20 again [Episode 3246234]

From: Christian <[email-masked]>
Date: Wed, 21 May 2014 09:54:55 -0700

[Women's Life]
- Featuring Doc.Oz - May 21, 2014

Have you ever thought about what it would be like to look 20 again?

It's The biggest Hollywood-secret of 2014.
http://www.ebblucky.com/people-mag/top/4352B75436.html

:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
|Contact Us|Facebook|Shares| OZ-Own CareShare |
|One Waymar Drive|Addision|ME|04606| Removal: http://www.ebblucky.com/2014/5/

I'm trying to come up with a way to divide a group of 24 music albums/records into 6 playlists such that the lengths/running time all 6 playlists are as close to each other as possible.

I initially thought that maybe I could find all possible permutations of the problem and then work out a logic that will analyze which is the best division. I even created a thread to ask for help for it yesterday (I have 24 items that I need to separate into 6 sets of 4. What algorithm can I use to find all possible combinations?). However, when I got close to finding a solution, I realized that just finding all permutations of the problem will take incredibly long to run, so that approach seem impractical.

So I was wondering, is there a faster way to approach such a problem?

Given that these are the running times of the albums in question (in MM:SS format), what is the fastes way for me to find the division of albums into 6 playlists of 4 such that the lengths of each of the playlists is as close to each other as possible?

39:03 
41:08 
41:39 
42:54 
44:31 
44:34 
44:40 
45:55 
45:59 
47:06 
47:20 
47:53 
49:35 
49:57 
50:15 
51:35 
51:50 
55:45
58:10 
58:11 
59:48 
59:58   
60:00 
61:08 
I did the math and considering the total time for all the albums, having 6 playlists that run at 200 minutes and 49 seconds would be perfect... but since the individual album lengths probably don't allow for that exact of a division, what would be the most exact possible division is my question.

NOTE: I could actually do this manually and get a close enough approximation that would suffice, but I am still really interested on how it could be done through a program.

Thanks

algorithm language-agnostic
share|improve this question
edited May 16 at 3:28

asked May 16 at 3:16

heisenbergman
3909
  	  	
I suggest that you start by trying to describe the steps of an algorithm in English. Don't worry about which programming language you might eventually implement it in.   Code-Guru May 16 at 3:18
  	  	
@Code-Guru True. Sorry. It's just I have experience with answers being posted in code that I couldn't understand which is why I thought to specifiy that I would be doing this in Java.   heisenbergman May 16 at 3:25
1	  	
I found this paper which uses genetic algorithms: scholar.google.com/ . You need to define precisely what is meant by "as close to each other as possible", since that is only unambiguous for a partition into 2 sets. The paper I cite uses the Euclidean norm, while the problem cited by @hammar uses "least maximum"; another metric sometimes used is "difference between largest and smallest".   rici May 16 at 3:57
  	  	
@rici this seems interesting It details exactly the kind of problem I want to solve. I'll keep on reading and see if I can figure out how to implement it.   heisenbergman May 16 at 5:05
  	  	
The really cool thing about this question and the excellent answers is that it demonstrates that the fact that a problem is NP is no reason to not try to solve it.   rici May 17 at 0:27