Bisimulation and Simulation: Algorithms and Applications