Alloy catalysts designed from first principles