Residence times in kink sites and Markov chain model of alloy and intermetallic compound deposition