Computer simulation of thermodynamic factors in Ni-Al and Cu-Ag liquid alloys