IRCTC Seat Allocation Algorithm
This blog deals with the algorithms used in Indian railways seat selection.

IRCTC Booking Code
Many times, we are amazed that why IRCTC does not allow passengers to book the tickets just like the flights or movie tickets where persons are able to select the births as per their own choice. Although various technical reasons are behind this process and today, we will try to understand the major reasons with suitable examples of how exactly the software works while making a booking through its simple-looking website or mobile application.
IRCTC Seat Booking Algorithm Major Considerations
The following points were considered in the train booking algorithm-
v Train Stability
In order to get more stability while turning at sharp corners the center of gravity should be lowered from the base. Although this is done through the design yet passengers are also allotted lower birth first by allowing various quotas like RAC, HO, pregnant women, and elderly quota.
v Uniform distribution of Passenger
The passengers are uniformly distributed throughout all the coaches by the specific logic assigned in the booking algorithm. This uniformity ensures the reduction of micro and macro vibrations, ensuring uniform loading throughout the rails and reducing the risk of derailing.
v Passenger Profiling
This is the most important task done by the booking software which profiles the passengers as per their age, sex, booking condition, and physical condition. Just like you had made a booking earlier yet got upper or middle birth, a pregnant woman may get lower birth even though she had booked the ticket after a long time.
Understanding The IRCTC Booking Algorithm
Let us take an example a train that had 72 seats per coach and a total of 16 coaches in that train as tabulated below-
Class |
No. of Coaches |
No. of Seats in Each coach |
Total No of Seats |
Tatkal Seats
|
Remaining Seats
|
1A
|
1
|
18
|
18
|
Nil
|
18
|
2A |
2
|
46
|
92
|
20
|
60
|
3A |
3
|
64
|
192
|
48
|
134
|
SL |
10
|
72
|
720
|
144
|
565
|
Total Number of Seats
|
1022
|
212
|
810
|
· The number of seats for the defense quota is 6 seats in each class (SL,3A, 2A) thus totaling 6 seats. This quota is not available in every train and thus can be neglected in this study.
· VIP/Head Office quota seats are approximately 30-40 in each train. The remaining number of seats= 810-40=770 seats.
· Let us discuss the sleeper class in detail-
Total number of seats available= 720.
In general, a train has General, Tatkal, Ladies, and Pooled Quotas and the numbers may vary from train to train.
In these total seats, nearly 20% of tickets will be allocated for Tatkal Quota.
For Tatkal Quota – 720 * 20% = 144.
For Ladies Quota 2 seats (Approx.) will be allocated in Each Coach.
For Ladies Quota = 10 * 2 = 20.
Suppose a train runs between two stations A1 and A5 and B1 is an important big station on the way then certain seats are reserved between A1-B1 as well as B1-A5. The pooled quota is reserved for nearly 8% of the total seats thus
For Pooled Quota – 720 * 8% = 58(Approx.)
Thus, by summarizing till now we will find as the following data:
Total No of Seats =720
Tatkal Quota =144
Ladies Quota =20
Pooled Quota =58
Remaining Seats =498
Now the concept of RAC will come in to picture which states that all the sides lower birth can be allotted for two persons
So total side lower seats = 9*10=90
Out of this 35% of seats will be reserved for general booking thus,
So 90 * 35% = 32 (Approx.)
So seats available for RAC = 90 – 32 = 58.
In these 58 SL birth, two people will allotted tickets for the same seats where they can travel simultaneously.
Thus, by summarizing till now we will find as following data-
Total No of Seats =720
Tatkal Quota =144
Ladies Quota =20
Pooled Quota =58
For RAC Provision =58
Remaining Seats =440
RAC tickets will be = 58 * 2 = 116 seats.
So our train tickets will be
General Quota - 440 (Opens 2 months before the date of departure)
Tatkal Quota - 144 (Opens 1 day prior to the date of departure)
Ladies Quota - 20 (Opens 2 months before the date of departure)
Pooled Quota - 58 (Opens 2 months before DOJ)
For RAC – A maximum of 116 RAC Tickets will be issued so if no one cancelling their ticket 116 people can go by sitting.
The seat may vary as per the reserved seats available on the train.
v Allotment of seats for the single woman
Women’s safety is quite a prominent issue in India and in the world thus strict government norms were made even in railways also. The rule of seat allotment says that a single female shall never be allotted a seat in a group of males. The people with opposite gender with same age group shall be allotted in different cabins while opposite seats are only left.
The birth allotments for females are always allotted either upper or lower but if it is in the group then it might be possible to assign middle birth also.
v Seat allotment for 45+ year single female
If the woman is aged more than 45 years and had opted for lower birth as a booking preference probably, she will get it. The rule is simple “If two women had confirmed waitlist and only one lower birth is available, the female with higher age will be getting preference and will get the lower birth.”
v Seat Allotment for Newly Married Couples
The software will check the age group and sex, if two persons having different sex with the same age group are found, it will again check the relation if found married couples it tries to allot as follows-
- Side lower and side upper seats
- Lower and lower seats
- Lower and middle combination seats
- Middle and middle Seats
- In the worst condition it may allot in nearby different coaches
v Seat Allotment for Old Married Couples
Software always tries to allot in the same coach for couples only the seat priority will change if couples are aged.
- If the couple is senior citizens, will prefer lower and lower birth.
- Side lower and lower seats
- Middle and middle seats
v Seat Allotment for a Group of people
The software prioritizes the seat allotment for the group bookings as-
- Same cabin/compartment
- Same coach
- In the worst condition in a different coach
v Seat Allotment for Children
Children are given birth always to parents or guides. This is not highly restricted rules but the software always tries to book seats near to the grouping of females.
Note: The content may vary from IRCTC regular updates and thus may not be correct thus please check the details with IRCTC official documents.
What's Your Reaction?






