Tag Archives: divisors

Fraction Arithmetic

Fraction Arithmetic

I hope everyone had a good holiday season. I certainly enjoyed mine. Over this season, I had a chance to speak with some youth and their parents. Funny that whenever we discuss that I have a PhD in applied mathematics, the topics of the children struggling in mathematics and the possibility of tutoring their children always seem to come up. I have no problem with tutoring and I actively participate in such sessions in my spare time. However I will say that it is sometimes a difficult task to do this job over such a short time period. Needless to say, I felt bad that I couldn’t have been of more assistance.

So, this being the holiday season and all, I decided to make somewhat of a new years resolution to focus this site more towards some of the things that the youth struggle with to hopefully be able to answer some of their questions.

With that being said, the first area that I decided to look at was fractions. This is one of the first areas where the youth begin to dislike mathematics. I feel like regardless of how much teachers and professors speak of the importance of understanding these processes, many students simply never grasp the procedures involved, partially because they never get used to the rules associated with these matters.

In this first script on fractions, I’ve focused on four types of problems corresponding to the four basic operations of arithmetic: Addition, Subtraction, Multiplication and Division.

To add two fractions of the form

num1
den1
+
num2
den2

We use the formula

num1
den1
+
num2
den2
=
num1
den1
+
num2
den2
=
num1*den2 + num2*den1
den1*den2

Lets take a moment to consider where this formula comes from. In order to be able to add fractions we first need to obtain a common denominator for the two fractions. One way that always works to obtain a common denominator is to multiply the denominators of the two fractions. So in the formula above, the denominator on the right hand side of the equals sign is the product of the two denominators on the left hand side. Once we have a common denominator, we need to rewrite each of the two fractions in terms of this common denominator.

num1
den1
+
num2
den2
=
num1*den2
den1*den2
+
num2*den1
den1*den2

The formula for subtracting fractions is similar, with the notable difference of a subtraction in the place of addition.

num1
den1
num2
den2
=
num1*den2 – num2*den1
den1*den2

To multiply two fractions (also known as taking the product of two fractions, the resulting numerator is the product of the two initial numerators, and likewise the resulting denominator is the product of the two initial denominators.

num1
den1
*
num2
den2
=
num1*num2
den1*den2

Finally, remembering that division is the inverse of multiplication, we can derive the formula to divide two fractions by multiplying by the inverse of the fractions:

num1
den1
รท
num2
den2
=
num1
den1
*
den2
num2
=
num1*den2
den1*num2

The next step in each of these operations is to reduce the fraction to lowest terms. One way of doing this is by considering Euclid’s GCD algorithm which is available here.

The script is available to practice your work on fractions at
http://www.learninglover.com/examples.php?id=31

Sieve of Eratosthenes

Prime numbers are an important concept in Number Theory and Cryptography which often uses the difficulty of finding prime numbers as a basis for building encryption systems that are difficult to break without going through all (or a very large number of) possible choices.

Remember that a prime number is a number greater than 1 whose only divisors are 1 and that number itself. One of the most famous algorithms for searching for prime numbers is the Sieve of Eratosthenes. I added a script which implements the Sieve of Eratosthenes to my Examples page.

This algorithm prints out all prime numbers less than a given number by first canceling out all multiples of 2 (the smallest prime), then all multiples of 3 (the second smallest prime), then all multiples of 5 (the third smallest prime – multiples of 4 do not need to be considered because they are also multiples of 2), etc until we have reached a number which cannot be a divisor of this maximum number.

So if we are given a number, n, the first step of the algorithm is write out a table that lists all the numbers that are less than n. For example lets run this Sieve on 50. So all numbers less than 50 are

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50.

So since 1 is not a prime number (by the definition of prime numbers), we cancel that number out.

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50.

Next, we look at the list and the first number that is not crossed out is a prime. That number is 2. We will put a mark by 2 and cancel out all of 2’s multiples.

1, 2*, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50.

Again, we look at the list and the first number that is not marked or crossed out is 3, so that number is prime. We will put a mark by 3 and cancel out all of 3’s multiples.

1, 2*, 3*, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50.

Once again, we look at the list and the first number that is not marked or crossed out is 5, so that number is prime. We will put a mark by 5 and cancel out all of 5’s multiples.

1, 2*, 3*, 4, 5*, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50.

We look at the list and the first number that is not marked or crossed out is 7, so that number is prime. We will put a mark by 7 and cancel out all of 7’s multiples.

1, 2*, 3*, 4, 5*, 6, 7*, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50.

Now, we look and the first number that is not crossed out is 11. However, since 11 is greater than sqrt(50) we know that each of 11’s multiples that are less than 50 will have been cancelled out by a previous prime number. So we have finished the algorithm.

Check out my script which implements the Sieve of Eratosthenes for more examples.