Solution

ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2022/discrete-mathematics-continuous-mathematics-and-probability-resit/3/e/solution

Prove the stronger statement with a nonempty subset. Order the integers as , and form the prefix sums
There are such sums but only residue classes modulo . The pigeonhole principle gives indices with . Their difference satisfies
The selected elements form a nonempty subset of , proving the claim. Neither positivity nor distinct values in a general ordered sequence are needed for the consecutive sum divisible by the sequence length argument; distinctness merely makes the present input a set.

New to topics? Read the docs here!