Graph Theory37 sections · 1633 units
Open in Course

Problem - Cat and Mouse (Part 3)

(Terminal state marking)

Start by identifying terminal states. If the mouse reaches vertex 00, that state is a mouse-win. If the cat and mouse are on the same vertex (and not vertex 00), that state is a cat-win. Mark these base cases first.

Then use backward induction to propagate win/loss information backward through the state graph. The challenge is handling draws. You need to detect when states form cycles with no clear winner.