Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2021/ia/paper-4/8e/a/solution

Write the sets as , and list each nonempty countable set as . Enumerate the pairs along successive diagonals, as in the Cantor pairing function, and output when it has not appeared before. Every member of eventually appears, proving that a countable union of countable sets is countable.

New to topics? Read the docs here!