1 / 12

Bin Packing algorithms: theatre booking

Bin Packing algorithms: theatre booking. Your Task. You are the manager of a local theatre, and have been put in charge of the seating arrangements for the audience for an upcoming event. Your task is to find the best way to organise the audience members that have already booked online or

marlon
Download Presentation

Bin Packing algorithms: theatre booking

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Bin Packing algorithms: theatre booking

  2. Your Task You are the manager of a local theatre, and have been put in charge of the seating arrangements for the audience for an upcoming event. Your task is to find the best way to organise the audience members that have already booked online or over the phone, so that they take up the least amount of space possible.

  3. Theatre information • To complete this task, you need to know the following information: • The audience seating area in the theatre is arranged such that there are 12 rows, and each row consists of 10 seats. • The people that have already booked to see the show must sit together in the groups they have booked in: they cannot be separated. • The members of the public who have already booked to see the show are in the following groups: • 2 2 3 5 6 2 1 3 1 4 4 5 8 10 3 5 6 4 4 2 • The audience members would like to sit as close to the front of the theatre as possible.

  4. The first fit algorithm • The algorithm is as follows: • Note: You must consider each audience member/group size in the order they are • given. • Take the first group size. Place it in the first row, starting from the left hand side. • Take the next group size. Look to see if there is enough room for it in the first row, immediately after the previous entry. If there is, place the group in this row, starting from the left hand side. If not, put it in the next row. • Continue the algorithm so that every person who has already booked has been allocated a seat. Remember:Always start from the left hand side of the rows and work from the first row, backwards.

  5. Order of Group Sizes: 2, 2, 3, 5, 6, 2, 1, 3, 1, 4, 4, 5, 8, 10, 3, 5, 6, 4, 4, 2 Hence, the minimum amount of rows required for this algorithm is 9 rows.

  6. The first fit decreasing algorithm • This is exactly the same as the first fit algorithm, except you must put the given data • in decreasing order first, before sorting the data into the appropriate rows. • Your turn! • Recall that the members of the public who have already booked to see the show are • in the following groups: • 2 2 3 5 6 2 1 3 1 4 4 5 8 10 3 5 6 4 4 2 • Apply the “First Fit Decreasing” algorithm to your data. What is the minimum amount • of rows you use?

  7. Order of Group Sizes: 10, 8, 6, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2, 1, 1 Hence, the minimum amount of rows required for this algorithm is 8 rows.

  8. Your task • Now that you know how to apply the algorithm, it is now time to create your own! • Come up with an appropriate bin-packing scenario with at least 10 group sizes/amounts. You must also create a solution so that it can be tested and checked later on! • Swap your work with your partner and see if they • can find the correct solution! • Good luck!

  9. evaluation • What are the benefits and cons of both algorithms? • Which is the best algorithm for the theatre to use? • Which part of today’s lesson did you feel most confident in? • How do you think the difficulty of these algorithms could be improved?

  10. Real life examples • Can you think of any examples where algorithms are/could be used in real life? Portsmouth Harbour (Google Maps Satellite View)

  11. Optimising Logisitcs OperationsA VIDEO INTERVIEW WITH BILL DOWSLAND

  12. Please ensure that you have the following items in your bag • before you hand it back in: • · The 10x12 grid - 3 x ‘5’ rectangles • · 2 x ‘1’ rectangles - 2 x ‘6’ rectangles • · 4 x ‘2’ rectangles - 1 x ‘8’ rectangles • · 3 x ‘3’ rectangles - 1 x ‘10’ rectangles • · 4 x ‘4’ rectangles

More Related