A plane-wave density functional theory is used to predict the work functions of Au/Mg decorated Au(100), Mg(001), and stochiometric AuMg alloy surfaces. We find, that irrespective of the details, all Au/Mg systems containing Mg on the surface reveal the Mg-dominated work functions, i.e. significantly shifted toward the work function of clean Mg(001) surface. The reported analyzes suggest, that this general trend stems from a strong charge transfer from Mg to Au and consequent enhancement of a surface dipole. The calculated properties of the AuMg alloy well agree to the experiment. The reported results may readily find application in Au/Mg/AuMg surface physics and technology of metal/semiconductor contacts.