Using Computer Programs and Search Problems for Teaching Theory of Computation