The Intersection of Mathematics and Computer Science

Mathematics is a field that can be seen everywhere in the real world. From filling up your daily glass of milk to finding the probability that you get a good hand in a game of cards, math has applications in our daily lives. Math shares intersections with other subjects, such as physics, chemistry and computer science. However, mathâ€™s involvement in computer science is quite special. Many computer science problems require algorithms to solve, which are processes taken by computers that involve logic or computations.These types of problems are usually numerical. Examples of implementations of numbers in computer science are with problems that involve modular arithmetic, which is a branch of mathematics that uses the remainder when a number is divided by another number.

One problem that involves modular arithmetic is finding all the prime numbers up to a given value. For example, if a user wanted to find all the prime numbers less than 10, the program would have to correctly list the numbers 2, 3, 5 and 7. One way to accomplish this task is to start with 1 and test all the numbers up until the input. Each test would have to involve checking whether the current number (between 1 and the input, inclusive) is divisible by any numbers less than itself besides 1. This is the definition of a prime number, and if this condition is met, then the current number would be categorized as a prime number and printed.

Computer Science problems can have other backgrounds with respect to mathematics. Some also involve a branch of mathematics known as graph theory. One such problem is finding the largest possible sum given a binary tree (or a graph that from any non-endpoint, has two immediate options leading to the end of the tree). A picture illustrating the question is below:

We start at the 7, so our current total is 7. We now have two options, as we can choose either the 3 or the 12. If we take note of the obtrusively large 99 then it makes the most sense to take the 3 and compromise the sum for the time being. However, for a computer, analysing the entire graph for similar large numbers will take a very long time. Thus, it might be better to find an approximate yet faster solution. This seems like the best option for larger graphs, as the number of paths for these graphs grows exponentially and can reach very high levels. This is where the Greedy Algorithm comes in, which basically states that given a graph and problem such as the one above, the program should take the larger of the two immediate values below it. If we follow the Greedy Algorithm for this problem, we will reach the values 7, 12 and 6, which gives us a sum of 25. While this may seem terrible compared to the best solution which yields 109, its efficiency will improve for larger binary trees.

Mathematics and Computer Science share many more applications besides the ones above. These two fields have many attributes in common and will be two fields that will grow. The involvement of mathematics in computer science is limitless, with many more applications being discovered as our journey in this amazing field continues.

| August 6th, 2019 | Posted in Uncategorized |