Markov chains and emergent behavior for problems from discrete geometry