# How to Break a Math Problem Down from First Principles

## This Oxford University entrance exam question illustrates the systematic, first principles reasoning that all good mathematicians use, and which GPT4 still struggles with

--

Many of us are familiar with the rules of the sides of a right angled triangle. By the Pythagorean Theorem, if *a* and *b* are the two smaller sides, and *c* is the longest side, then *a² + b² = c². *Well known integer solutions to this are known as *Pythagorean Triples. *Examples include (3, 4, 5) and (5, 12, 13).

A more general construct is a *Triangular Triple*. Any trio of positive integers which can form the lengths of the sides of a triangle is called a triangular triple. Obviously, integer Pythagorean triples are triangular triples. But in general, an integer triple *(a, b, c)* is a triangular triple if, when listed in (non-strictly) increasing order, the sum of the first two integers is strictly larger than the third.

As an example, lets take the triple (4, 2, 3). These can be the lengths of the sides of a triangle because 2 + 3 > 4. Similarly (2, 2, 2) is a triangular triple. But (1, 3, 1) is not a triangular triple, as it is not possible to construct a triangle with these side lengths (1 + 1 ≯ 3).

A recent Oxford University entrance question related to triangular triples, and I think it’s a lovely illustration of how you can progressively deconstruct a problem from first principles in order to solve questions which look very challenging at first.

This problem defined a function *f(P)*, where *P > 2*, as the number of triangular triples which sum to *P. *In the end it asks us to find *f(*21*). *Finding the number of triangular triples which sum to 21 sounds like a real brain-buster, but using some progressive, systematic steps we can find a very easy way to calculate this. At the end I’ll also show that AI like GPT4 has a real problem with these kinds of questions that require first principles reasoning.

Here are the various parts of the question and my solutions. I found it an interesting question and a good exercise at mathematical thinking that required very little textbook knowledge.