Challenge – Festival Schedule Generator

Do you like solving puzzles as much as myself and my Demcon colleagues?
Then I got a challenge for you: can you solve the Festival Schedule Generator?

If you succeed, you have a chance to win a raspberry pi pico kit!

It should not take you longer than one hour to solve.
Send in your answer before 1 August 2023.

I wish you good luck!
Pieter Bijleveld
#decodedemcon

< ALL CHALLENGES

Pieter Bijleveld

Senior Software Engineer at Demcon

THE CHALLENGE *

Demcon has decided to expand its activities, and to organize a musical festival. After being an expert in mechatronic systems engineering, the move to the entertainment business seems a rather logical choice.

For the festival 30 acts are hired, such as the Demcon band and other popular acts. Unfortunately, each band has a very tight schedule, and is only able to play at a fixed timeslot. This makes the planning difficult, and the festival organizer needs to know how many stages to prepare for the event.

Your job is to help the festival organization. You are given a list of shows, each with a start and end time. The start and end times are provided as an offset from the start of the festival since the festival goes on non-stop. For example, the first three shows are given like this:

show_1 36 39
show_2 30 33
show_3 29 36

show_1 is scheduled from 36 hours after festival start and will play for 4 long hours up to (and including) hour 39 after festival start.

It can be seen that show_1 and show_3 overlap, since they both play at hour 36. Also show_2 and show_3 overlap, so they cannot share a stage.

Your task is to create a planning program which takes the list of shows, and their start and end times, and creates a planning.

Good luck!

SPECIFICS & RULES
  • Please write your solution in Python/C++/Matlab.
  • Please add information (in the README) on how to execute the code.
  • Your solution should be able to output a schedule explaining where and when each show will be. How you do this, is up to you. Just know that we do like a good-looking and well-constructed output. 😉
  • We’ve included an example list below for you to get started, but your code should be able to handle any schedule. Additionally, feel free to use another input format or file type, as long as you clearly explain what the input should look like.
  • We will evaluate your solutions based on inventiveness, efficiency, and good coding practices.
  • We will only accept submissions in the form of a link to a Github repository.
  • Please submit to communication@demcon.com
  • We’ve added some instructions below if you’re unfamiliar with Github.
HOW TO USE GITHUB
  1. In your internet browser, navigate to github.com
  2. Enter your email address, and press ‘sign up for GitHub’
  3. Press continue, create a password and enter a username
  4. Solve the puzzle to show that you are a human
  5. Verify your email address and customize your Github experience
  6. Create a new project by pressing ‘start a project’
  7. Give your repository a name, and make sure it is set to public. Press ‘create repository’
  8. In quick startup, press ‘create new file’ or ‘upload existing file’
  9. Enter the code for this challenge here
  10. When you are ready to submit, go to the <>code section of your repository and press ‘code’ and copy the HTTPS link. Enter this link into your submission.
EXAMPLE INPUT

show_1 29 33
show_2 2 9
show_3 44 47
show_4 26 30
show_5 15 20
show_6 8 15
show_7 2 9
show_8 30 34
show_9 1 9
show_10 20 28
show_11 1 4
show_12 2 11
show_13 26 29
show_14 5 10
show_15 37 44
show_16 27 35
show_17 36 39
show_18 4 10
show_19 35 44
show_20 22 30
show_21 15 20
show_22 42 46
show_23 6 9
show_24 19 23
show_25 31 38
show_26 37 41
show_27 30 36
show_28 14 21
show_29 5 13
show_30 33 36

* Challenge created by Pieter Bijleveld and Jeroen Verberne.