Computer science overlaps with almost all of mathematics. Algebraic objects are used to build programs that translate computer languages, graph theory is used to design computer networks, statistics is used to improve the efficiency of large computer systems, and differential equations are used in the design of computer hardware, and many topics in "pure math" have important applications in computer science.
One area of mathematics that combines with computer science, and that is particularly "hot" these days is cryptography. This is the art of making and breaking secret codes. (Strictly speaking, cryptography refers to making codes and cryptanalysis to breaking them, but we shall refer to them both an cryptography.) Of course, if you were asked to guess who is hiring cryptographers, you would immediately guess the CIA and other agencies concerned with spying and national defense. But there are other people who are very interested in cryptography.
For example, the cable TV companies do not like you to get their programs without paying for them, which can be done by putting a "dish" on your roof. So more and more they are encoding their signals before sending them out. You then need to rent their decoding device in order to turn the signals back into what you want to see on your television. Banks are also very interested in cryptography, especially since the advent of automated teller machines, which communicate with the banks by radio. Would you want someone to stand near one of these machines with a radio receiver and listen to your name, password, and bank balances? Clearly not. So these transactions are encoded, and the code changes for each transaction.
One kind of code, which many organizations are interested in, can be broken if you can factor its key number into primes. For example, if we ask you to factor 15, you quickly reply that it is 3 times 5. But what if we gave you another number, stating that it is the product of two primes, each of which is approximately 1000 digits long? If you want to use a computer you may. How long do you think it would take? Using the largest computer currently available, it would take approximately a million years! So, as you can well imagine, this area of pure math (number theory) is attracting a lot of interest these days.
Everyone knows that computers are good at doing arithmetic, but arithmetic on a computer can be tricky. For example, with a pencil and paper
But on a computer something different can happen.
Let us suppose that we have a very small computer, one that can carry only two significant digits. When the left side of the equation is evaluated, the .04 + .04 is added to get .08. The "1" is turned into 1.0, the 0.08 is rounded to 0.1, and the 1.0 and 0.1 are added together to get 1.1, which is the correct way to round 1.08 to two significant places. On the other hand, when the right side of the equation is evaluated, the first thing is to find 1.0 + 0.04. The 0.04 is rounded to 0 and the sum is 1.0. This is added to the other 0.04, which is also rounded down to 0, and the sum of the whole thing is 1.0 -- which is a different answer from the first case, and not quite what you would expect. Since computers do many thousands or millions of arithmetical operations per second, these rounding errors can become very important very quickly.
The area we have just been talking about is called numerical algebra. It is clearly related to the very old area of numerical analysis, which is concerned with how to approximate the value of a function (and know the range of your error) if you can't find the value precisely.
As a final example of the math/computer science interface, let's look at a non-numerical problem.
One common operation on a computer is sorting. For example, you may have to sort all the names of people who applied for a Social Security Number last month, or all the checks that came to a bank by account and check numbers. There are many well-developed techniques for sorting and searching (seeing if someone's name is already on the list of people with Social Security Numbers). In fact, one entire volume of Knuth's The Art of Computer Programming is devoted to sorting and searching, and new methods continue to be published.
If you have to decide among several methods for sorting a file of names, you would like to know which one to choose: which uses the fewest number of steps and the least computer memory. The number of steps is described as a function of n, the number of items to be sorted. This area of mathematics is called analysis of algorithms. If you are analyzing an algorithm, you might find yourself using such facts as
If you enjoy problems like this you might also be interested in complexity theory, which asks: For what problems is the function that gives the number of steps it takes a polynomial?
This is only the very briefest of excursions into areas where math and computer science interact. There are many others involving computer graphics, geometry, graph theory, abstract algebra, probability and statistics, calculus, differential equations, translation of computer languages, and many more.