How to solve a seating arrangement in Airline – Part 1

As a software developer, I have been given many challenges or problems to solve and in fact, I love to get involved.

Here is problem statement:

The reputed airline named HardJet has announced that they are facing a criticism on deliberate efforts to allocate seats for their customers and more and more customer dissatisfaction fuelling to join  Hynair their biggest rivals thus HardJet has decided to reward on those who can help them to solve this puzzle.

First of all, this problem does not need any computer program or anything that generate complexity so first it should be just on paper mostly theory and general mathematics.

So my first approach was to research capacity of an aircraft and for example : according to this around 156 seats capacity. and 29 rows and each row has  2 sets of seats – 3 on each sides.  Thus, the best way to identify the problem of arrangement is to give best (optimal) arrangement positive points and  worst(minimum) arrangement negative points based on following criteria:

  • If booking has a single ticket than – window seat, aisle, or middle seat no points counted ( 0 point).
  • If booking has couple or pair (tickets) than if it has window seat or aisle seat (+1) (1window, 1middle or 1 middle 1 aisle), if same row and two aisle seat than 0. if split than –1.
  • If booking has three tickets booked than same side (+1) if same row but split in 2 (I.e. 2 aisles 1 middle) but consecutive seats then 0 otherwise again split to next row –1, if split all 3 tickets –3, if split in two groups –2.
  • If booking has four tickets than same row consecutive seats +2(however 1 windows 2 aisle 1 middle). if 2 windows and 2 middle than 1 point. if split different rows than –1, if all 4 seats are separated than –4. if two seats non consecutive than –2, any other possible non consecutive combination than  –1. 
  • If booking has five tickets than if same consecutive seats in same row +2 (2 windows, 2 middle and 1 aisle or 1 window 2 middle, 2 aisles). any split but follow couple and group of three still +1, any split non consecutive than per seat –1 , –2 , –3, –4 panelise.
  • If booking has Six tickets than if same consecutive seats in same row +3 (same row) if split to next row but same side (+2) split to next row other side (+1) any other combination with splits –2 and –4 points to consider.

Now from given rules we know that the best optimal combination is 29 bookings required each booking has 6 tickets which scores 87 (29 x 3 = 87) which I think is extreme case. But however for optimal value for each flight arrangement I am creating an algorithm which generate the optimal arrangement with calculated points and stored in the learning engine so that later best combination can be provided. I know it is quite a challenge to achieve but I think assuming that when you reach to a checkout you know that you will received best possible combination of seat, So far I haven’t add any other complexity such as let 50% seats to be filled by arrangement (which is completely different ball game).


Now this is just a beginning, I will keep posting this with my progress with this I know it is not that easy but with right mind-set and possibly knowledge how to build something which helpful to many. It is possible.

Airlines probed over ‘confusing’ seating policy

Leave a Reply

Your email address will not be published. Required fields are marked *