How can the runway allocation process be optimised? I would like to write a programme that would be able to find the optimal arrival sequence for a given list of aircraft on a given airport. 
By optimal I mean in terms of delay, fuel burn and runway throughput

Before this, I'm trying to collect information on the matter because I'm totally novice. I have a few questions

Do air traffic controlers only use the First Come First Served (FCFS) principle to assign runways to aircraft or are there other algorithms ?

I've read that this principle can prove inefficient because, for example, it doesn't consider aircraft "size". I've read that a sequence of 5 small aircraft followed by 5 large is better than one alternating 10 large and small aircraft because less spacing required. Is it true ? 

Do you have other examples showing that the FCFS is not optimal ?

When is a runway allocated to an aircraft ? When it reaches the Initial Approach Fix ?

Thanks a lot for your help!

Sorry for the mistakes, english is not my native tongue
This question is extremely broad. At airports where there's multiple runways, there are numerous factors influencing which aircraft get which runway. Factors include, noise sensitive areas(so one runway should be favored over others), runway length/operational necessity, and configuration.

When an airport has multiple runways usually the tower will decide which are being advertised as arrival/departure runways. At which point the approach control will sequence to those given all the restrictions. Runway assignment usually occurs upon the aircraft entering the approach control's airspace. Once assigned to a runway, it's up to the controller to decide on the sequence, factors include airspeed, distance, and somewhat weight category. If you have multiple heavies coming in, it's often better to group them, than mix small-heavy, BUT you need to have the volume to be able to setup that kind of mix, to minimize space.