Skip to content

henryjon/setlist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

An algorithm I ran for my friend’s wedding to compute the optimal setlist, i.e. the setlist with the minimal number of musician changeovers. I used the Held-Karp algorithm. Blog post is here.

Results

The algorithm took around 7 seconds. And this time roughly doubles for every song we add (complexity is $O(2^n n^2)$). It seems I was very lucky with the number of songs chosen. Had we added like five more songs, this would have been intractable! Of course, when the cost is zero, the players can reshuffle their songs to their hearts’ desire, all within their miniset.

SongsVocalsKeysBassGuitarDrumsCost
First danceJIBS0
Let’s Stay Together (F)(*)JIBSDJGWTL3
Forget You (C)JIBSDJGWTL0
Crazy in Love (Dm)*JIJODJGWTL1
Girls Just Wanna Have Fun (E)*JIDADJGWTL1
Backstreets Back (Bbm)JIDADJGWTL0
Master Blaster (Cm)*HNDADJGWTL1
Lady Marmalade (Gm)JIJWDJGWTL2
Isn’t She Lovely (E)JIJWDJGWTL0
Easy Lover (Fm)JIJWDJGWAI1
American Boy (E)JIJOGFDJJW2
Señorita (Gb)*JIDAGFGWJW2
Somebody Else’s Guy (Abm)*HNJWGFGWAI2
Runaway Baby (Eb)HNJODHGWJW2
Superstition (Em)*JIBSDHJSJW3
Valerie (Eb)*JIBSDHJSAI1
Respect (C)*JIBSDHJSAI0
Play That Funky Music (Em)*JIBSDHJSAI0
I Got You (I Feel Good)*JIBSDHJSAI0
Ain’t Nobody (Ebm)JIBSDHJSAI0
Treasure (Ab)JIJODHJSAI1
Locked Out Of Heaven (Dm)JIJODHJSAI0
Uptown Funk (D)*JIDADHJSAI1
Good Times (Em)JIDADHJSTL1
End0
Total24

Concluding thoughts

  • The poor trumpet player was not considered in the algorithm. They play on the song tracks containing “*”, and this information was simply ignored.
  • I added no cost for a musician to stay on stage, but change instruments
  • I’m reasonably happy with the way the key changes have organised themselves. Except, of course, the turn of Eb, Em, Eb, which regrettably occurs around the maximal changeover
  • This probably isn’t a complete coincidence

About

The setlist for my friend's wedding

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages