What are the practical applications of number theory?
history - How did G.H. Hardy's work contribute to today's public-key cryptography? - Cryptography Stack Exchange
soft question - Is there any branch of Mathematics which has no applications in any other field or in real world? - Mathematics Stack Exchange
Hardy and Wright's Theory of Numbers
I heard it could be used in computer science but how? And is there any other ways that number theory can be useful or practical in other fields? Do you have any examples? Thanks!
I've been investigating and can't seem to find any reference to this. Could you say how you found this out?
Cocks's original paper makes reference to several results from number theory without attribution.
- An algorithm for determining if a number $M$ is prime with $\log M$ work, but which may fail to provide an answer (I think that this might be Pocklington's algorithm).
- A reference to the density of primes being roughly $1/\log M$, which is an observation of Gauss proven by Hadamard and de la Vallée Poussin
- The complexity of modular exponentiation being $(\log M)^k$ which is over 2000 years old (see Knuth vol. 2 for some history).
- An algorithm for factoring with complexity $N^{1/4}(\log N)^k$ (I think that this might be either Daniel Shanks's SQUFOF or CLASNO method).
G. H. Hardy made a large number of contributions to number theory, but none seem to be directly connected to any of the results used by Cocks.
I think there may not be any more to this than "despite what Hardy said regarding Number Theory has no applications...". A few links I dug up, none of which indicate any link to any concrete result by Hardy playing a role in this discovery.
- Part of the oration by Nigel Smart at the ceremony for honorary PhD for Cocks.
http://www.bristol.ac.uk/graduation/honorary-degrees/hondeg08/cocks.html
In 1940, the famous mathematician G.H. Hardy had remarked that Relativity and Number Theory were the truly great parts of mathematics as they had not been tainted by finding application. Hardy was soon proved wrong about relativity by the advent of the nuclear age, but in 1973 he was still correct about number theory. Clifford was about to alter that position for good by finding the most compelling application of Number Theory.
- Excerpt from Simon Singh's book which talks about this Alternative History of Public Key Crypto is below.
https://cryptome.org/ukpk-alt.htm
When Cocks did eventually realise what he had done, it struck him that his discovery might have disappointed G.H. Hardy, one of the great English mathematicians of the early part of the century. In his The Mathematician's Apology, written in 1940, Hardy had proudly stated: 'Real mathematics has no effects on war. No one has yet discovered any warlike purpose to be served by the theory of numbers.' Real mathematics means pure mathematics, such as the number theory that was at the heart of Cocks's work. Cocks proved that Hardy was wrong. The intricacies of number theory could now be used to help generals plan their battles in complete secrecy. Because his work had implications for military communications, Cocks, like Ellis, was forbidden from telling anybody outside GCHQ about what he had done. Working at a top-secret government establishment meant that he could tell neither his parents nor his former colleagues at Cambridge University. The only person he could tell was his wife, Gill, since she was also employed at GCHQ.
- Ensuing discussion on uk-crypto mailing list:
https://cryptome.org/ukpk-true.htm
The main item of interest there is Ross Anderson claiming that the papers from GCHQ regarding Cocks' invention were "forged, not originals", since at that point even the existence of the GCHQ was denied.
- Comments by Diffie
https://cryptome.org/ukpk-diffie.htm
Lots of branches of mathematics currently have no application in any other field or the real world. As you get higher up the ivory tower, the object that you're studying becomes so esoteric, that there might not be relevance to other things.
However, that does not preclude the possibility that someone eventually finds a relevance for it. Before the 20th century, Number Theory was considered recreational, 'useless' math. It has since spawned a huge industry of security.
Of course, someone might come along and say "Hey, there's this connection between (this esoteric field) and (that esoteric field)", like what Andrew Wiles did (Andrew Wiles proved Fermat's last theorem using many techniques from algebraic geometry and number theory [Source:Wikipedia]).
That depends on the resolution you look at things. But essentially everything ends up with some application to something else.
It may be tempting to say things like "modern set theory is not useful to other branches of mathematics other than set theory". But this is not true at all.
Set theory is useful for model theory and general topology; and model theory is very useful for algebra, and general topology is useful in analysis; both algebra and analysis are useful in real world problem-solving.
So set theory ends up as being very useful. One can look closer and ask, "Why does research about infinite and bizarre sets whose existence is negated by the axiom of choice - a common assumption nowadays - is useful?" The answer, of course, is similar to the above, with an additional twist: even if we may not know right now what are the applications, in research new methodologies and ideas are developed, and those trickle and drizzle slowly from one field to another. Eventually things become useful.
For example number theory, which a century ago was considered without real world application, is now a key theory in cryptography which is a very important tool in the modern world.