Saturday, September 1, 2007

School Mathematics

We have been reading a lot about sophisticated functions, features, etc. available in excel. Today as I sit to pen my new article in rain lashed Mumbai, my memory flew back to school days and there is a strange thought, can excel solve various mathematical problems we solved during school time. For all of us today if a kid asks us how to calculate Least Common Multiple (LCM as it is commonly known as) of some numbers do we have an answer?

Our best friend, Excel has it. Let us refresh some of these.

1. Least Common Multiple (LCM)
LCM is defined as the least integer that is a multiple of given integers. It is often used for additions or subtractions of fractions with different denominators. Hence if you want to add 3/4 to 5/6, the first step is to derive LCM of both the denominators i.e. 4 and 6. To arrive at LCM we need to split each number in all it multiple. Hence
4 = 2 x 2
6 = 2 x 3
Now the LCM of 4 and 6 is 12. This is calculated by taking the common multiple 2 and other factors 2 and 3. Now this was easy as the numbers were small, but what if the numbers are big?
Excel has a simple solution, just type =LCM(4,6). Output will be 12. In case there is an error go to Tools >> Add-Ins and ensure that Analysis ToolPak is checked.
The syntax is =LCM(cell1,cell2,cell3,…cell29). It can compute LCM for maximum of 29 values.
In our above problem for adding 3/4 to 5/6 once we have 12 as LCM of denominators we convert individual fractions into common denominators. Hence 3/4 5/6 are converted 9/12 and 10/12 respectively and the solution is 19/12.

2. Greatest Common Divisor (GCD)
GCD is defined as the largest number that divides without remainder into a given set of numbers.
GCD of 4 and 6 is 2. This is calculated by taking the common multiple as 2. Similar to LCM this was easy as the numbers were small, but what if the numbers are big?
Excel has a simple solution, just type =GCD(4,6). Output will be 2. In case there is an error go to Tools >> Add-Ins and ensure that Analysis ToolPak is checked.
The syntax is =GCD(cell1,cell2,cell3,…cell29). It can compute GCD for maximum of 29 values.

3. Roman Numerals
The number range that we use in common language has a corresponding roman number. Example 1 is represented as I, 2 as II, 5 as V, 10 as X, 50 as L, 100 as C, 1000 as M, etc. Though many of us know the above convention if we are asked to represent a number like 3249 in roman number many of us would find this difficult. But if u have excel just type =roman(3249) the output would be MMMCCXLIX.
The syntax is =roman(cell).

4. Factorial
Many of us would be surprised but there is a standard function in excel for factorial also. Factorial is most commonly used in permutation and combination. Factorial is product of all the integers of a particular number till 1. Hence 5 factorial represented as 5! is equal to 5 x 4 x 3 x 2 x 1 = 120. But in excel it is as simple as typing =fact(5). The output would be 120.
The syntax is =fact(cell).

5. Permutation
A permutation is defined as a possible selection of a certain number of objects taken from a group with regard to order. The permutations of two letters from the group of three letters A, B and C would be as follows:
AB, AC, BC, BA, CA, CB
The mathematical formula is 3P2, represented by 3!/(3-2)!. Hence the solution is 6.
For excel users it is as easy as typing =permut(5,3). The output would be 60.
The syntax is =permut(cell1,cell2)

6. Combination
A combination is defined as a possible selection of a certain number of objects taken from a group without regard to order. For instance, suppose we were to choose two letters from a group of three letters. If the group of three letters were A, B, and C, we could choose the letters in combinations of two as follows:
AB, AC, BC
The order in which we wrote the letters is of no concern; that is, AB could be written BA, but we would still have only one com­bination of the letters A and B.
The mathematical formula is 3C2, represented by 3!/{(3-2)!*2!}. Hence the solution is 3.
For excel users it is as typing =combin(3,2). The output would be 3.
The syntax is =combin(cell1,cell2).

No comments: