Most of the people aren’t aware that Indian Railway(not the IRCTC website maintained by CRIS but the core application the reservation centers use) already has an algorithm to ensure that a female passenger isn’t left stranded in the middle of a lot of males!
Since the IRCTC website use the same APIs provided by the reservation application(which looks much like DOS-based), we’re already a beneficiary to this feature.
As soon as you enter the details to reserve a seat for a female passenger, the entire database of that train is searched to find out empty seats close to any other female passenger travelling in the same class.
If such a female is found, the seat is given close to them, otherwise any other seat is given.
That is the reason why, if you ever noticed carefully, all talkative aunties group together at the same place quite often, disturbing the peace of others in the same compartment. 🙂
This is also the reason why you find yourself bumping into male travelers everytime you travel alone and curse your fate for running into girls only when your mother or sister travels with you!
P.S: I’m not sure if this algorithm works only for female passengers travelling alone or even when they are travelling with others.
Also, those who insist on beating this system through booking two tickets(one male, one female) at first and then cancelling one at the last moment(the female one) to get seats nearby other females, Guys! For all we know, it may work only for solo female passengers’ reservations booking, so hard luck!