Fermat’s Last Theorem was, until its resolution in the 1990s, arguably the most well-known open mathematical conjecture in the world. No doubt this is partly due to the vast gap between the simplicity of the theorem and the difficulty of its proof. If you’re not familiar with it, I’m sure you can find countless expositions online, but for the purposes of this post, I’ll just restate the main result here: when , the equation has no solutions for positive integers , , and .
The following is, in my opinion, a very funny application of Fermat’s Last Theorem to a problem in theoretical computer science. This is inspired by a problem from 15-251 a couple of semesters ago at Carnegie Mellon, although I’ve of course modified the problem, because I don’t want to be posting solutions to homework problems on the Internet.1 This is not the standard (or indeed, intended) solution to the problem, but when I thought of it, I decided it was worth writing down.
The problem is this:
Prove that the language is not regular.
A silly solution: suppose were regular. Then by the pumping lemma,2 it must be the case that for some and any . In particular, choose : But then this implies that for some , which contradicts Fermat’s Last Theorem!
If this isn’t enough “anonymization,” I’ll take this post down. I do think that the modified problem differs substantially enough from the original that it wouldn’t be of much help for solving it. And at any rate, it’s not like I have any readers.↩︎
If you haven’t heard of this, it just says that, if is regular, then there exists some constant such that you can split any of length into the form , with for all . This is vacuously true for finite languages. For infinite languages, the intuition is that there must be some loop consuming in the corresponding DFA. You can then “pump” this loop by going around it as many times as you want without changing the behavior of the DFA.↩︎
Comments