Past exam of the mathematics course of the University of Cambridge 2023 ia Paper 2 4F b Solution Created 2026-09-24 Updated 2026-10-03
Let be the event that the block beginning at position , , is a spalindrome. Each has probability . If two starting positions differ by , the first half of the later block contains the middle digit of the earlier palindrome twice, contradicting distinctness. Thus the only possible overlap is .
That intersection consists of words , where has distinct digits, and hence has probability . This overlap structure of digit spalindromes makes inclusion--exclusion give