  It has been known that even though two elemental metals, $X$ and $Y$, are
immiscible, they can form alloys on surfaces of other metal $Z$. In order to
understand such surface alloying of immiscible metals, we study the energetic
stability of binary alloys, $XZ$ and $YZ$, in several structures with various
coordination numbers (CNs). By analyzing the formation energy modified to
enhance the subtle energy difference between metastable structures, we find
that $XZ$ and $YZ$ with B2-type structure (CN$=$8) become energetically stable
when the $X$ and $Y$ metals form an alloy on the $Z$ metal surface. This is
consistent with the experimental results for Pb-Sn alloys on metal surfaces
such as Rh(111) and Ru(0001). Some suitable metal substrates are also predicted
to form Pb-Sn alloys.
