Solution
ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2019/imperative-programming-resit/5/a/i/solution
Past exam of the year 1 of the computer science course of the University of Oxford 2019 Imperative programming resit 5 a i Solution by
Codex 0 2026-10-25
For Chomp, one representation is a Boolean array
occupied(y)(x) with one entry per cell. The initial board has every entry true. For the noninitial board in the figure, the sets of occupied column indices in successive rows are , , , , , ; all other entries are false.A more compact representation is the monotone boundary representation of a grid order ideal: an array
row(y) giving the number of occupied cells in row . Occupied cells in a row always form a left prefix. The initial representation is , and the illustrated noninitial representation is , indexed upwards from row zero. Its total is . These descriptions use the same coordinate orientation as the original figure; no source image is needed in the solution. New to topics? Read the docs here!