

In this article we shall look at some elementary results in Number Theory, partly because they are interesting in themselves, partly because they are useful in other contexts (for example in olympiad problems), and partly because they will give you a flavour of what Number Theory is about. If it does, then it will be the GCD of A and B. An introduction to some beautiful results in Number Theory. Definition: Assume 2 integers a and b, such that a / 0 (a is not equal 0). We can traverse over all the numbers from min(A, B) to 1 and check if the current number divides both A and B or not. Number theory has many applications within computer science, including. The fact that a divides b is denoted as a b. If a divides b we say that a is a factor of b and that b is multiple of a. We say that a divides b if there is an integer c such that b ac.

Greatest Common Divisor (GCD) of two or more numbers is the largest positive number that divides all the numbers which are being taken into consideration.įor example: GCD of 6, 10 is 2 since 2 is the largest positive number that divides both 6 and 10. Hauskrecht Division Definition: Assume 2 integers a and b, such that a / 0 (a is not equal 0). We have two numbers 5 and 2, then 5%2 is 1 as when 5 is divided by 2, it leaves 1 as remainder. Modulo operation gives the remainder after division, when one number is divided by another. For instance, solving large systems of equations and approximating solutions to differential equations. All of the problems requires more or less math tough. Problems in competitive programming require insight, so just knowing some topics is not enough at all. Next, consider how congruence behaves when doing basic arithmetic. If youve not come across complex numbers before you can read An Introduction to Complex Numbers, which should be accessible to 15 or 16 year old students.If you havent come across group theory before, dont worry. Try explaining each using both the remainder and divisibility definitions. If you know number theory, that increases your ammo heavily in solving a lot of tougher problems, and helps you in getting a strong hold on a lot of other problems, too. The two most important things to know about in order to understand the in depth part of the article are complex numbers and group theory. It is my desire that you develop a love for this topic and others to come.Problems in competitive programming which involve Mathematics are are usually about number theory, or geometry. You may immediately conclude that the next number after 10 is 12.Įxploring number patterns can really help you develop a strong understanding of mathematics concepts. If I show you the following list: 2, 4, 6, 8, 10.
