Patrick Michael Grundy (16 November 1917, Yarmouth, Isle of Wight – 4 November 1959) was an English mathematician and statistician. He was one of the eponymous co-discoverers of the Sprague–Grundy function and its application to the analysis of a wide class of combinatorial games.
Grundy received his secondary education from Malvern College, to which he had obtained a Major Scholarship in 1931, and from which he graduated in 1935. While there, he demonstrated his aptitude for mathematics by winning three prizes in that subject. After leaving school he entered Clare College, Cambridge, on a Foundation Scholarship, where he read for the Mathematical Tripos from 1936 to 1939, earning first class honours in part 2 and a distinction in part 3.
The work for which he is best known appeared in his first paper, Mathematics and Games, first published in the Cambridge University Mathematical Society's magazine, Eureka in 1939, and reprinted by the same magazine in 1964. The main results of this paper were discovered independently by Grundy and by Roland Sprague, and had already been published by the latter in 1935. The key idea is that of a function which assigns a non-negative integer to each position of a class of combinatorial games, now called impartial games, and which greatly assists in the identification of winning and losing positions, and of the winning moves from the former. The number assigned to a position by this function is called its Grundy value (or Grundy number), and the function itself is called the Sprague–Grundy function, in honour of its co-discoverers. The procedures developed by Sprague and Grundy for using their function to analyse impartial games are collectively called Sprague–Grundy theory, and at least two different theorems concerning these procedures have been called Sprague–Grundy theorems. The maximum number of colors used by a greedy coloring algorithm is called the Grundy number, also after this work on games, as its definition has some formal similarities with the Sprague–Grundy theory.