Saturday, March 9, 2019

Mathematics Quiz II - How Many Squares Are In This Picture


Calculate the total number of squares in the following image.




Answer :

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

Answer : 40



Explanation :

If there is an n x n square (number of squares are in horizontal row should be equal to vertical row)
there is a way to calculate total number of squares in it.

Suppose there is a 2 x 2 square


How many squares are in it. If you say 4 then you are not absolutely right. Correct answer is 5. There is also a big square ACIG

Now how do you calculate this answer in mathematical terms.
Total number of squares in an n x n square =  n² + (n-1)² + (n-2)² + ......+ 1²
For 2 x 2 square = 2² + 1² = 4 + 1 =  5

Now suppose there is 3 x 3 square


How many squares are in it. Using above formula, we can easily calculate.

Total number of squares in an n x n square =  n² + (n-1)² + (n-2)² + ......+ 1²
For 3 x 3 square = 3² + 2²  + 1² = 9 + 4 + 1 =  14
So where are these 14 squares.
ABFE, BCGF, CDHG, EFJI, FGJK, GHLK, IJMN, JKON, KLPO, ACKI, BDLJ, EGOM, FHPN and ADPM

Now similar way we can calculate squares in Original question. There is one 4 x 4 square and two 2 x 2 squares in the image.
Total number of squares in a 4 x 4 square = 4² + 3² + 2²  + 1² = 16 + 9 + 4 + 1 =  30
Total number of squares in a 2 x 2 square = 2² + 1² = 4 + 1 =  5
There is another 2 x 2 square in image = 2² + 1² = 4 + 1 =  5
So Total number of squares = 30 + 5 + 5 = 40

Exercise for you : How many squares are in a Chess Board? :)

Friday, May 6, 2016

Gabbar Probability

Gabbar Gunshots Probability Analysis

Everyone must have watched movie Sholay(1975). Do you remember the entry scene of Gabbar Singh (Amzad Khan)?

"Kitne Aadmi The"


Exactly That was the scene. In this scene Gabbar kills three of his henchmen. Lets skip the middle conversation and jump to this part.
Gabbar drags a revolver from one of his man and asks the number of bullets in it.
He replies "six". Generally a revolver has 6 bullets compact in a round structure.
 

Here the game begins.

He already made up his mind to kill all three men because he doesn't like coward people but he does not want to shoot them just like that. He wants some entertainment here.

This is the game of probability. He fires three bullets in the air to make remaining count three because he needs to kill only three people and one bullet is enough for each.

Now he revolves the cylinder of revolver in a speedy way so even he doesn't know where are the remaining three bullets.

Then he takes a shot towards each man. 3 chambers are with bullets and 3 are empty, he thinks there are 50-50 chances here.

Now lets analyze the situation here.

What we know
Three bullets are in a consecutive order and three empty chambers are also in consecutive order but it is a circle so any chamber can be its firing position. Only we can say confidently that there is no single empty chamber between two bullets. There is only one gap between two bullets and it is of three empty chambers.

Lets give names to each chamber. Suppose Chamber 1, Chamber 2 and Chamber 3 are empty chambers and Chamber 4, Chamber 5 and Chamber 6 are with bullets. We gave these names anti clock-wise because cylinder moves in clock wise direction so 2 will be fired after first and third will be fired after second and so on.

First shot can be empty or it can be with bullet. Nobody knows. Suppose if first shot is empty. It means either Chamber 1 or Chamber 2 or Chamber 3 in its firing position.

Suppose Chamber 1 is in its firing position during first shot then other two men will be saved because next number is of 2 and then 3 and both are empty chambers so all are saved (That's what happens in the movie)



Suppose Chamber 2 is in its firing position during first shot then second man will be saved because 3 is an empty chamber but 4 is filled with bullet it means last man (Kalia) will be killed. Even he ate salt of his master but no mercy would be here in first place.

 

Suppose Chamber 3 is in its firing position during first shot then second and third both men will be killed because 4 and 5 the chambers are with bullets.

 

Suppose Chamber 4 is in its firing position during first shot then all three will be killed because 4, 5 and 6 are with bullets.

 

Suppose Chamber 5 is in firing position during first shot then second will be killed and third man will be saved because 1 is empty.

 

Suppose Chamber 6 is in firing position during first shot then first and second both will be saved because 1 and 2 both are empty.

 

In this analysis, there are chances, each man can be killed and each can be saved. But can you predict what may happen with next?

You can't predict the future of first two men in any condition. You can predict the future of only last man and that's in two conditions only.
1) If First man is killed and second is saved
2) If first man is saved and second is killed

In first situation, you can easily find that chamber 6 was in firing position during first shot that's why first is killed and second is saved because second got chamber 1 which is empty. Now third man will get chamber 2 which is also empty and he will be saved too. There is no other condition for this situation.

In second situation, still you can find that chamber 3 was in firing position that's why first is saved and second is killed because second got chamber 4 which is with bullet. Now third man will get chamber 5 which is also with bullet and he will be killed too. There is no other condition for this situation too.

Both are unique situations.

Except these two conditions you can't predict future of third man.

Suppose first two are saved then you can't predict the fate of third.
He can be killed if chamber 2 was in firing position during first shot.
He can be saved if chamber 1 was in firing position during first shot.

Suppose first two are killed even then you can't predict the fate of third.
He can be killed too if chamber 4 was in firing position during first shot.
He can be saved if chamber 5 was in firing position during first shot.

Conclusion :
If second shot is different than first shot only then you can predict the behaviour of third shot.

Moral :
But after all none of this matters because eventually Gabbar would kill all three.



Sunday, April 13, 2014

Fascinating Facts About Tigers


There is little doubt that tigers are some of the most beautiful, royal and scary animals nature has ever produced. They are incredible hunters, the biggest of all cat species (excluding the liger, which is a combination of lion and tiger) and can hunt in the water or land in equal measure.But if you think you know all there is to know about this magnificent animal, think again as you read this list of 22 fascinating tiger facts.