Semi-empirical analysis of surface alloy formation