Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Remainders Reloaded: Euler, Fermat and Wilson’s Theorems for CAT 2011

by Ravi Handa on 07 October 2011


in MBA test prep, Quantitative Aptitude, Remainders
18 comments

Editor’s note: This article contains a lot of mathematical equations, which due to the limitations of HTML have been depicted as images. If you are able to view the equations, all is well. If not, please make sure your browser is not blocking image content.

In previous posts, we have already discussed how to find out the last two digits and basic ideas of remainders. However, there are theorems by Euler, Fermat & Wilson that make calculation of remainders easier. Let’s have a look at them.

Funda 1 – Euler:

Number of numbers which are less than N = ap * bq * cr and co-prime to it are,

If M and N are co-prime, that is if HCF(M,N) = 1,

A very common mistake that students tend to make while using the Euler’s Theorem to solve questions is that they forget that M and N have to be co-prime to each other. There is another set of students (such as I in college) who don’t even understand what to do with the theorem or how to use it to
solve questions. Let us look at couple of examples in which Euler’s Theorem is used.

Note: ∅(N) is also known as Euler’s Totient Function.

Example,

Funda 2 – Fermat’s Little Theorem

If  ‘p’ is a prime number and ‘a’ and ‘p’ are co-primes,

If you notice, the three statements above are saying exactly the same thing but in a different way. It is important to keep all three in mind because sometimes it becomes a little difficult to analyze which interpretation of Fermat’s little theorem is to be used.

A simple illustration of this is,

We can check it by noticing that

107 = 10000000 = 9999990+10 = 142857 ∗ 7 + 10

Another way that you can remember Fermat’s Little Theorem (I am not joking, that is the official name – check this) is by observing that it is but a special case of Euler’s Theorem where ‘N’ is a prime number.

Because, if ‘N’ is prime then ∅(N) or the Euler’s Totient Function will always be (N-1).

Funda 3: Wilson

Sometimes people find the history behind Wilson’s theorem to be more interesting than the theorem itself. Actually, the theorem was already known to the great Muslim polymath Alhazen approximately seven and a half centuries before John Wilson was born. Alhazen, being the great scientist that he
was, never bothered to prove it and was instead regulating floods in the river Nile. After being ordered by Al-Hakim bi-Amr Allah, the sixth ruler of the Fatimid caliphate to carry out this operation, Alhazen quickly perceived the impossibility of what he was attempting to do, and retired from
engineering. Fearing for his life, he feigned madness and was placed under house arrest, during and after which he devoted himself to his scientific work until his death.

The English mathematician, John Wilson, stated it in the 18th century but he could not prove it either. Actually Wilson was a student of Edward Waring, who announced the theorem in 1770. None of them could prove it. Lagrange proved it in 1771. There is evidence that Leibniz was also aware of the
result a century earlier, but he never published it.

I think I will end the history lesson here and resume the mathematics.

For a prime number ‘p’,

Another related result to the Wilson Theorem is,

Example,

Note: I have checked the related results for primes up to 120 and found it to be valid. I could not find a proof for it that I could understand. Do note that the key part of the previous sentence is not ‘find a proof for it’ but ‘that I could understand’. May be one of you can help me out in comments.
I also recommend that while trying these ideas or any other remainder questions, keep Wolfram Alpha open in another browser window.

CAT 2011 Quant: Finding out Remainders when Really Scary-looking Numbers Divide Each Other
by Ravi Handa on 04 October 2011
in MBA test prep, Quantitative Aptitude, Remainders
9 comments

Editor’s note: This article contains a lot of mathematical equations, which due to the limitations of HTML have been depicted as images. If you are able to view the equations, all is well. If not, please make sure your browser is not blocking image content.

Figuring out the last digit is the same as figuring out the remainder of a number when divided by 10, but I guess you already know that. Figuring out the last two digits is the same as figuring out the remainder of a number when divided by 100. Even if you don’t already know how to do that, you can
always read this post. However, if you wish to figure the remainder when the divisor is not 10 or 100, I suggest you read on.

Funda 1: Basic idea of remainders can be used to solve complicated problems.

There is nothing special or unique about this idea. At first glance it seems really obvious. But it is its usage that makes it special and helpful in questions related to remainders.

Let us look at couple of examples to see how this can be used effectively. In the first example we will see the idea that will work in cases of ab and in the second example we will see the idea that will work in case of ab^c

Example 1: Find out the remainder when 2525 is divided by 7.

Example 2: Find out the remainder when 2526^27 is divided by 7.

We know that 43 gives a remainder of 1, when divided by 7.

So, if we have 43k, it will give a remainder of 1 when divided by 7

If we have 43k+1, it will give a remainder of 4 when divided by 7

3k+2
If we have 4 , it will give a remainder of 2 when divided by 7

27
So, we need to reduce 26 as 3k or 3k+1 or 3k+2. If we can do that, we will know the answer. So our task has now been reduced to figuring out,

Note: As you can see in solving this example, we have used the concept of negative remainder. In some cases, using the negative remainder can reduce your calculations significantly. It is recommended that you practice some questions using negative remainders instead of positive ones.

Funda 2: While trying to find out the remainder, if the dividend (M) and the divisor (N) have a factor (k) in common; then,

→ Cancel out the common factor

→ Find out the remainder from the remaining fraction

→ Multiply the resulting remainder with the common factor to get the actual remainder

In equation format, this can be written as:

15
Example: Find out the remainder when 4 is divided by 28.

Funda 3: While trying to find out the remainder, if the divisor can be broken down into smaller co-prime factors; then

Note: If you wish to read more about it and how it happens, I suggest you read about the Chinese Remainder Theorem.

Example: Find out the remainder when 715 is divided by 15.


By using the above fundas, solving remainder problems will get a little easier. But if you are thinking, that this is all you need to know to solve remainder problems in CAT – I beg to differ. Great mathematicians like Euler, Fermat & Wilson developed some theorems that come in handy while solving
remainder questions. We will discuss these in my next post.

Tricks to speed up calculations for Data Interpretation questions in CAT 2011


by Guest Writer on 28 September 2011
in Approximations, Calculation techniques, Data Interpretation, MBA test prep
Contributed By: Ravi Handa
38 comments

(Photo credit: Jimmie)

Data Interpretation questions typically have large amounts of data given in the form of tables, pie-charts, line graphs or some non-conventional data representation format. The questions are calculation heavy and typically test your approximation abilities. A very large number of these questions check
your ability to compare or calculate fractions and percentages. If you sit down to actually calculate the answer, you would end up spending more time than required. Here are few ideas that you can use for approximation.

Funda 1 – Calculating (Approximating) Fractions

When trying to calculate (approximate) a fraction ‘p/q’, add a value to the denominator and a corresponding value to the numerator before calculating (approximating).

Example,

What is the value of 1789/762 ?

First the denominator. We can either take it close to 750 or to 800. Let’s see how it works in both cases. We know that the answer is between 2 and 3, so for adding values / subtracting values from the denominator or the numerator, I will consider a factor of 2.5.

Case 1: 762 is 12 above 750, so I will subtract 12 from the denominator. Keeping the factor of 2.5 in mind, I will subtract 25 from the numerator.

My new fraction is,

(1789 – 25) / (762 – 12) = 1763 / 750 = 1763 ∗ (4 / 3000 ) = 7.052 / 3 = 2.350666

Actual answer is 2.34776.

As you can see, with very little effort involved in approximation, we arrived really close to the actual answer.

Case 2: 762 is 38 below 800, so I will add 38 to the denominator. Keeping the factor of 2.5 in mind, I will add 95 to the numerator.

My new fraction is,

(1789 + 95) / (762 + 38) = 1884 / 800 = 2.355

As you can see, even this is close to the actual answer. The previous one was closer because the magnitude of approximation done in the previous case was lesser.

Funda 2 – Comparing Fractions

If you add the same number to the numerator and denominator of a proper fraction, the value of the proper fraction increases.

If you add the same number to the numerator and denominator of an improper fraction, the value of the improper fraction decreases.

Note: You can remember this by keeping in mind that,

1/2 < 2/3 < 3/4 < 4/5 …

and

3/2 > 4/3 > 5/4 > 6/5 …

Example,

Arrange the following in increasing order: 117/229, 128/239, 223/449.

Let’s first compare 117/229  & 128/239.

If we added 11 to the numerator and the denominator of the first proper fraction, the resulting proper fraction would be 128/240, which will be bigger in value than the original (as per Funda 2).

We know that 128/240 is smaller than 128/239, as the latter has a lower base.

So, 117/229 < 128/240 < 128/239

→ 117/229 < 128/239

Now let’s compare 117/229 and 223/449.

If we added 11 to the numerator and the denominator of the second proper fraction, the resulting proper fraction would be 234/460, which will be bigger in value than the original.

If we doubled the numerator and denominator of the first proper fraction, the resulting proper fraction would be 234/458.

We know that 234/460 is smaller than 234/458, as the latter has a lower base.

So, 223/449 < 234/460< 234/458

→ 223/449 < 117/229

Using the above two results, we can say that 223/449 < 117/229 < 128/239

Note: This question can be solved much simply by just looking at the numbers and approximately comparing them with ½. I used this long explanation to illustrate the funda given above.

Following are a few other shortcuts that might come in handy during DI-related calculations.

Funda 3 – Percentage Growth

If the percentage growth rate is ‘r’ for a period of ‘t’ years, the overall growth rate is approximately: rt + t * (t-1) * r2 / 2
Note: Derived from the Binomial theorem, this approximation technique works best when the value of ‘r’ is small. If the rate is above 10%, then this approximation technique yields bad results. Also, if the rate is 5% then r = 0.05; if the rate is 7.2% then r = 0.072.

Funda 4 – Comparing Powers

Given two natural numbers a and b such that a > b > 1,

b a
a will always be less than b

Note: There are only two exceptions to this funda. I hope someone in the comments will point them out (anyone?).

Of Cubes and Matchsticks – Logical Reasoning Tricks for CAT 2011


by Ravi Handa on 29 September 2011
in Cube problems, Logical reasoning, Matchstick games, MBA test prep
7 comments

(Photo credit: Orin Zebest)

‘If it was so, it might be; and if it were so, it would be; but as it isn’t, it ain’t. That’s logic.’ – Tweedledee in Lewis Caroll’s Through the Looking Glass.

If the above line confused you, trust me – you are not alone. Even God can vanish in a puff of logic. To know how, you can probably jump to the end of this post. To those who choose not to skip – let us discuss a few common types of Logical Reasoning problems.

Type 1:  Cube problems

A cube is given with an edge of unit ‘N’. It is painted on all faces. It is cut into smaller cubes of edge of unit ‘n’. How many cubes will have ‘x’ faces painted?

In these types of questions, the first thing that we need to figure out is the number of smaller cubes. For this, we look at one particular edge of the big cube and figure out how many smaller cubes can fit into this. It will be N/n. So, the number of smaller cubes will be (N/n)3

A cube has 6 faces and none of the smaller cubes will have all faces painted. As a matter of fact, none of the smaller cubes will have even 5 or 4 faces painted. The maximum number of faces, which will be painted on a smaller cube, will be 3. This will happen only in the case of the smaller cubes that
emerge from the corners of the big cube.

So, number of smaller cubes with 3 faces painted = 8  (Always)

For 2 faces to be painted, we will have to consider the smaller cubes that emerge from the edges of the big cube (leaving out the corners). So, the smaller cubes on every edge will be (N-2n)/n. There are 12 edges in a cube.

So, number of smaller cubes with 2 faces painted = 12 * (N-2n)/n

2
For 1 face to be painted, we will have to consider the smaller cubes that emerge from the face of the big cube (leaving out the corners and the edges). So, the smaller cubes on every face will be [(N-2n)/n] . There are 6 faces in a cube.

2
So, number of smaller cubes with 1 face painted = 6 x [(N-2n)/n]

For no face to be painted, we will have to consider the smaller cubes that emerge from the inside of the big cube (leaving out the outer surface which was painted). Imagine this as taking a knife and cutting a slice of width ‘n’ from every face of the cube. You will be left with a smaller cube with an
edge of ‘N-2n’. Number of smaller cubes that you can make from the resulting cube is [(N-2n)/n]3

So, number of smaller cubes with 0 face painted = [(N-2n)/n]3

Let us take an example to elucidate this type of problem.

Example,

A painted cube is given with an edge of 15 cm. Smaller cubes are cut out from it with an edge of 3 cm each. How many cubes will have 3 faces painted, 2 faces painted, 1 face painted and no face painted.

Solution,

3
Total number of smaller cubes = (15/5) = 125

3 faces painted = 8 cubes.

2 faces painted: Consider an edge of size 15 cm. We have removed the corners that take away 3 cm from each corner of the edge. Now our edge is of 9 cm. 3 cubes of 3 cm each can come from it. There are 12 edges. So, there will be 3 * 12 = 36 cubes.

1 face painted: Consider a face. If we have removed 3 cm from each edge of the face, we will be left with a square of side 9 cm or area 81 sq cm. There can be 9 smaller squares that can be formed on that face with an area of 9 sq cm each. These 9 will be the cubes which will have 1 face painted.
There are 6 faces. So, there will be 9 * 6 = 54 cubes.

3
No face painted: Cut slices of 3 cm each from each face of the cube. We will be left with a smaller cube of edge 9 cm. Number of smaller cubes that can be formed from it is (9/3) = 27. So, 27 cubes will have no faces painted.

You can use this to verify the formulas above and also note that 8 + 36 + 54 + 27 = 125. This means that there is no need to find out all four using the formula, just find any three of them and the other would emerge by using the total. In an exam, this might save you some valuable time.

Type 2: Matchstick Game

You are playing a matchstick game with Mr Bond. There are ‘n’ matchsticks on a table. On a player’s turn, he can pick any number of matchsticks upto ‘p’ (p is typically quite smaller than ‘n’). Whosoever picks the last matchstick loses the game. It is your turn first. How many matchsticks should
you pick (assuming that you are smart and will play to win) that you will always win?

First remove 1 matchstick from consideration, as that would be the matchstick that Mr Bond will pick and lose the game.

Find out Remainder [ (n-1) / (p+1) ] = q

You should pick ‘q’ matchsticks in the first turn.

After that if Mr Bond picks ‘r’ sticks, you should pick ‘p+1-r’ sticks and you will win the game.

Let us see an example.

Example,

There are 105 matchsticks on a table and a player can pick any number of matchsticks from 1 to 10. The person who picks the last matchstick loses the game. You are playing the game against Mr Bond and it is your turn first. How many matchsticks should you pick in the first turn such that you
always win the game?

Solution: You should pick Remainder  [(105 - 1)/(10+1)] = 5 matchsticks to win the game.

Let us look at few scenarios, in which you have picked 5 sticks and there are 100 sticks left on the table. It is Mr. Bond’s turn now.

Round ID Mr. Bond Picks Sticks Left You Pick Sticks Left
Round 1 5 100 – 5 = 95 10 + 1 – 5 = 6 95 – 6 = 89
Round 2 8 89 – 8 = 81 10 + 1 – 8 = 3 81 – 3 = 78
Round 3 7 78 – 7 = 71 10 + 1 – 7 = 4 71 – 4 = 67
Round 4 4 67 – 4 = 63 10 + 1 – 4 = 7 63 – 7 = 56
Round 5 10 56 – 10 = 46 10 + 1 – 10 = 1 46 – 1 = 45
Round 6 8 45 – 8 = 37 10 + 1 – 8 = 3 37 – 3 = 34
Round 7 1 34 – 1 = 33 10 + 1 – 1 = 10 33 – 10 = 23
Round 8 2 23 – 2 =21 10 + 1 – 2 = 9 21 – 9 = 12
Round 9 9 12 – 9 = 3 10 + 1 – 9 = 2 3–2=1

As only 1 stick is left, Mr. Bond will have to pick it and lose the game. I recommend, that you try out such scenarios with a friend. Nothing validates a concept more than a real-life implementation, especially if it is on a bet.

For those who are still wondering – what did just happen (as I did when I first read this concept), I suggest you pick up Hitchhiker’s Guide to the Galaxy and read about how God vanished in a puff of logic.
 

You might also like