Wednesday 19 December 2012

Photo to Logic to Math


That's a photo of a group of friends standing side by side in a row.
It reminds me a logic which leads to a small math-concept at the end.
Let us consider that some persons are standing in a row. Some clues are given and we need to find the number of persons.

Problem-1)Find the number of persons?
Clue: "In the row, a person called 'A' is standing second from left and fourth from right".

This clue is enough to answer the question. If we count from left,
A is second from left=> there are two persons up to A
A is fourth from right => there are three persons after A (as it is four including A)
So total number of persons = 2+3 = 5
It can be shown like this:

                                           *           A          *           *           *

Now let us go to a little complicated problem by introducing some more info.
Problem-2)Find the number of persons?
First Clue: “person 'A' is fourth from left”
Second Clue: “person 'B' is fifth from right”
Are these clues enough to get the answer? Obviously not...
Third Clue: There is one person in between A and B

Is it okay now? Can we solve the puzzle? Let us see...
"A is fourth from left" => there are four persons up to A (including A) from left-end.
"B is fifth from right" => there are five (including B) up to the right-end.
"There is one person in between A and B" => This guy shall be added to the count
So total number of persons = 4+5+1 = 10
It can be shown like this:

                         *           *           *           A          *           B          *           *           *           *

But is it okay?
No, there is some ambiguity in the third clue. Ambiguity is about the order that A and B stand in the row. If we count from left, we are not sure whether A comes before B or the other-way-round. In the scenario shown above (let us call it scenario-I), A comes before B. If B comes before A, then another scenario (call it scenario-II) may arise as shown below. Can't it satisfy all the three clues?

                                  *           B          *           A          *           *

Here again, "A is fourth from left" and "B is fifth from right" and "There is one person in between A and B".
And here there are only six persons in total.
My point is: For the second problem, the given three clues are not enough to answer the question straight away. This type of concept is useful in "Data Sufficiency" type of problems given in competitive exams.

Second problem takes me to "set theory" concept:
Scenario-I of second problem leads us to disjoint sets. One set with 4-persons (includes A) and other set with 5-persons (includes B) and there is one person not belonging to these two sets. We can consider third set for this guy. These three sets are disjoint to one another. 

n(X) = 4
n(Y) = 5
n(Z) = 1
Total number of persons = n(XUYUZ) = n(X)+n(Y)+n(Z) = 4+5+1 = 10
"n(XUYUZ) = n(X)+n(Y)+n(Z)" -this formula holds good for disjoint sets.

Scenario-II leads us to two intersecting sets. One set with 4-persons (includes B as well) and
other set with 5-persons (includes A as well) and there is an intersection of these two sets with 3-persons in common (A, B and the other guy).


n(X) = 4
n(Y) = 5
n(XY) = 3
Total number of persons = n(XUY) = n(X)+n(Y)-n(XY) = 4+5-3 = 6
"n(XUY) = n(X)+n(Y)-n(XY)" -this formula holds good for intersecting sets.

Sunday 16 December 2012

Magic of Numbers-II

Observe this table and there after we will find some interesting facts about numbers:

unit digits of 1st 10 natural numbers
1
2
3
4
5
6
7
8
9
0
unit digits of squares of 1st 10 natural numbers
1
4
9
6
5
6
9
4
1
0
unit digits of cubes of 1st 10 natural numbers
1
8
7
4
5
6
3
2
9
0
unit digits of 4th powers of 1st 10 natural numbers
1
6
1
6
5
6
1
6
1
0
unit digits of 5th powers of 1st 10 natural numbers
1
2
3
4
5
6
7
8
9
0
unit digits of 6th powers of 1st 10 natural numbers
1
4
9
6
5
6
9
4
1
0









Basing on the above table the following facts can be conceptualized:

Concept-I
The horizontal pattern repeats for every 4 powers (vertically downwards) and for every 10 consecutive numbers (Horizontally rightwards) such that we can find the pattern for any power.
For example, the unit-digit series of 112th powers is same as that of 4th powers, because 112 (= 4*28) is a multiple of 4 as the series is repeated for every fourth power.
We see one more example to emphasize this concept. We will find the unit digit of 117123:
unit digit of 117123 => unit digit of 7123 => unit digit of 7(4*30+3) => unit digit of 73
=> Answer is “3”  

Concept -II
All the numbers from 0 to 9 exist in the sequence of unit digits of cubes (and likewise for 7th powers, 11th powers etc..) of natural numbers. Each number from 0 to 9 has an occurrence in the series of unit digits of cube roots of first 10 natural numbers. And of course this pattern repeats for the next 10 natural numbers (ie., from 11 to 20) and so on..
Here my point is: n being a natural number, for a set of ‘10n’ consecutive natural numbers, if we consider unit digits of cubes of all these numbers, the probability of ‘0’ being the unit digit = probability of ‘1’ being the unit digit = …… = probability of ‘9’ being the unit digit = 1/10

Concept -III
Unit digits of fourth powers (likewise 8th powers, 12th powers etc.,) of natural numbers must be from the set {0,1,5,6}. And in any set of unit-digits of 4th powers of 10 consecutive natural numbers, there exist one 0, one 5, four 1’s and four 6’s.

Now I quickly relate to a problem which can be built from this basic concept.
Find the number of ways of selecting x and y from the set of natural numbers {1,2,3,4,5,…. up to 10n} such that x4-y4 is divisible by 5?
For any number to be divisible by 5, the unit digit must be 0 or 5.
Here as x4 and y4 are fourth powers of natural numbers, their unit digit must be one of {0,1,5,6}
So for x4-y4 to be divisible by 5, the possible pairs of unit digits of x4 and y4 are:
(0,0),(1,1),(5,5),(6,6),(0,5),(1,6) as in all these cases, the unit digit of difference is either 0 or 5.
As per the concept, in each consecutive 10 numbers, there exists one ‘0’
=> For the given 10n numbers, there exist ‘n’ number of ‘0’s as the unit digits of fourth powers
As per the concept, in each consecutive 10 numbers, there exists one ‘5’
=> For the given 10n numbers, there exist ‘n’ number of ‘5’s as the unit digits of fourth powers
In each consecutive 10 numbers, there exist four ‘1’s
=> For the given 10n numbers, there exist ‘4n’ number of ‘1’s as the unit digits of fourth powers
In each consecutive 10 numbers, there exist four ‘6’s
=> For the given 10n numbers, there exist ‘4n’ number of ‘6’s as the unit digits of fourth powers
Now we will find the number of ways:
 (0,0):
The number of ways of having 2 out of n zeros = nC2 = n(n-1)/2
(1,1):
The number of ways of having 2 out of 4n ones = 4nC2 = 4n(4n-1)/2
(5,5):
The number of ways of having 2 out of n fives = nC2 = n(n-1)/2
(6,6):
The number of ways of having 2 out of 4n sixes = 4nC2 = 4n(4n-1)/2
(0,5):
The number of ways of having 1 out of n zeroes and 1 out of n fives = nC1 * nC1 = n2
(1,6):
The number of ways of having 1 out of 4n ones and 1 out of 4n sixes = 4nC1 * 4nC1 = 16n2
Summing up all the above, the total number of ways = 34n2-5n

Link for the first post in the Magic Series is here:
http://mathbyvemuri.blogspot.in/2011/10/magic-of-numbers-1-unit-digit-patterns.html