This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Friday, June 29, 2012

To find number of zeroes at the end of any number factorial

To find number of zeroes at the end of any number factorial,
you have to count number of zeroes i.e. multiplication by 10 and 5 in the series.
e.g. 10! number of 5 and 10 there are 1 + 1 = 2 so number of zeroes = 2
in case of 25! number of 5 are, 5, 15, 25 (contains 2 fives)
and number of zeroes in 10 and 20
so total number of zeroes at the end in the product is 4 + 2 = 6
But in longer series it is difficult to count number of zeroes and fives
to find
divide the last number i.e. 25 by 5 and go on dividing the quotient by5 till the quotient is zero. add all quotients will give number of zeroes at the end of product.
25/5 = 5
5/5 = 1
number of zeroes = 5 + 1 = 6

in 200!
200/5 = 40
40/5 = 8
8/5 = 1
1/5 = 0
number of zeroes = 40 + 8 + 1 = 49

PUZZELS

  1. This problem is actually damn hard, I don't know why I put it first.
    You are given a set of scales and 12 marbles. The scales are of the old balance variety. That is, a small dish hangs from each end of a rod that is balanced in the middle. The device enables you to conclude either that the contents of the dishes weigh the same or that the dish that falls lower has heavier contents than the other.
  1. You are given a set of scales and 90 coins. The scales are of the same type as above. You must pay $100 every time you use the scales.

The 90 coins appear to be identical. In fact, 89 of them are identical, and one is of a different weight. Your task is to identify the unusual coin and to discard it while minimizing the maximum possible cost of weighing (another task might be to minimizing the expected cost of weighing). What is your algorithm to complete this task? What is the most it can cost to identify the unusual coin?
  1. You are a bug sitting in one corner of a cubic room. You wish to walk (no flying) to the extreme opposite corner (the one farthest from you). Describe the shortest path that you can walk.
  1. A mythical city contains 100,000 married couples but no children. Each family wishes to “continue the male line”, but they do not wish to over-populate. So, each family has one baby per annum until the arrival of the first boy. For example, if (at some future date) a family has five children, then it must be either that they are all girls, and another child is planned, or that there are four girls and one boy, and no more children are planned. Assume that children are equally likely to be born male or female.
  1. How many degrees (if any) are there in the angle between the hour and minute hands of a clock when the time is a quarter past three?
  1. 100 light bulbs puzzleThere are 100 light bulbs lined up in a row in a long room. Each bulb has its own switch and is currently switched off. The room has an entry door and an exit door. There are 100 people lined up outside the entry door. Each bulb is numbered consecutively from 1 to 100. So is each person.
  1. A windowless room contains three identical light fixtures, each containing an identical light bulb. Each light is connected to one of three switches outside of the room. Each bulb is switched off at present. You are outside the room, and the door is closed. You have one , and only one, opportunity to flip any of the external switches. After this, you can go into the room and look at the lights, but you may not touch the switches again. How can you tell which switch goes to which light?
  1. What is the smallest positive integer that leaves a remainder of 1 when divided by 2, remainder of 2 when divided by 3, a remainder of 3 when divided by 4, and so on up to a remainder of 9 when divided by 10?
  1. In a certain matriarchal town, the women all believe in an old prophecy that says there will come a time when a stranger will visit the town and announce whether any of the men folks are cheating on their wives. The stranger will simply say “yes” or “no”, without announcing the number of men implicated or their identities. If the stranger arrives and makes his announcement, the women know that they must follow a particular rule: If on any day following the stranger’s announcement a woman deduces that her husband is not faithful to her, she must kick him out into the street at 10 A.M. the next day. This action is immediately observable by every resident in the town. It is well known that each wife is already observant enough to know whether any man (except her own husband) is cheating on his wife. However, no woman can reveal that information to any other. A cheating husband is also assumed to remain silent about his infidelity.
  1. You and I are to play a competitive game. We shall take it in turns to call out integers. The first person to call out “50” wins. The rules are as follows:
    1. The player who starts must call out an integer between 1 and 10, inclusive;
    2. A new number called out must exceed the most recent number called by at least one and by no more than 10.
  1. You are to open a safe without knowing the combination. Beginning with the dial set at zero, the dial must be turned counter-clockwise to the first combination number, (then clockwise back to zero), and clockwise to the second combination number, (then counter-clockwise back to zero), and counter-clockwise again to the third and final number, where upon the door shall immediately spring open. There are 40 numbers on the dial, including the zero.
  1. Inside of a dark closet are five hats: three blue and two red. Knowing this, three smart men go into the closet, and each selects a hat in the dark and places it unseen upon his head.
  1. You are standing at the centre of a circular field of radius R. The field has a low wire fence around it. Attached to the wire fence (and restricted to running around the perimeter) is a large, sharp-fanged, hungry dog. You can run at speed v, while the dog can run four times as fast. What is your running strategy to escape the field?
  1. You have 52 playing cards (26 red, 26 black). You draw cards one by one. A red card pays you a dollar. A black one fines you a dollar. You can stop any time you want. Cards are not returned to the deck after being drawn. What is the optimal stopping rule in terms of maximizing expected payoff? Also, what is the expected payoff following this optimal rule?
  1. Why is that if p is a prime number bigger than 3, then p2-1 is always divisible by 24 with no remainder?
  1. You have a chessboard (8×8) plus a big box of dominoes (each 2×1). I use a marker pen to put an “X” in the squares at coordinates (1, 1) and (8, 8) - a pair of diagonally opposing corners. Is it possible to cover the remaining 62 squares using the dominoes without any of them sticking out over the edge of the board and without any of them overlapping? You cannot let the dominoes stand on their ends.
  1. You have a string-like fuse that burns in exactly one minute. The fuse is inhomogeneous, and it may burn slowly at first, then quickly, then slowly, and so on. You have a match, and no watch. How do you measure exactly 30 seconds?
  1. Can the mean of any two consecutive prime numbers ever be prime?
  1. How many consecutive zeros are there at the end of 100! (100 factorial). How would your solution change if there problem were in base 5? How about in Binary???
  1. How can this be true???? Have a look at the picture (click to enlarge.) All the lines are straight, the shapes that make up the top picture are the same as the ones in the bottom picture so where does the gap come from????

  1. A man is in a rowing boat floating on a lake, in the boat he has a brick. He throws the brick over the side of the boat so as it lands in the water. The brick sinks quickly. The question is, as a result of this does the water level in the lake go up or down?

  1. You have a 3 and a 5 litre water container, each container has no markings except for that which gives you it's total volume. You also have a running tap. You must use the containers and the tap in such away as to exactly measure out 4 litres of water. How is this done?

  1. I have three envelopes, into one of them I put a £20 note. I lay the envelopes out on a table in front of me and allow you to pick one envelope. You hold but do not open this envelope. I then take one of the envelopes from the table, demonstrate to you that it was empty, screw it up and throw it away. The question is would you rather stick with the envelope you have selected or exchange it for the one on the table. Why? What would be the expected value to you of the exchange?
  1. You're a farmer. You're going to a market to buy some animals. On the market there are 3 types of animals for sale. You can buy:

    Horses for £10 each, goats for £1 each and ducks, you get 8 of these per bunch and each bunch costs £1.

    The aim is to acquire 100 animals at the cost of £100, what is the combination of horses, goats and duck that allows you to do this? (You must buy at least one of each.)
  1. Adam, Bob, Clair and Dave are out walking: They come to rickety old wooden bridge. The bridge is weak and only able to carry the weight of two of them at a time. Because they are in a rush and the light is fading they must cross in the minimum time possible and must carry a torch (flashlight,) on each crossing.

    They only have one torch and it can't be thrown. Because of their different fitness levels and some minor injuries they can all cross at different speeds. Adam can cross in 1 minute, Bob in 2 minutes, Clair in 5 minutes and Dave in 10 minutes.

    Adam, the brains of the group thinks for a moment and declares that the crossing can be completed in 17 minutes. There is no trick. How is this done????
  1. gas water electic puzzle layout A man has built three houses. Nearby there are gas water and electric plants. The man wishes to connect all three houses to each of the gas, water and electricity supplies.

    Unfortunately the pipes and cables must not cross each other. How would you connect connect each of the 3 houses to each of the gas, water and electricity supplies???
  1. chess board picture How many squares are there on a chessboard?? (the answer is not 64)

    Can you extend your technique to calculate the number of rectangles on a chessboard.
  1. 3 men go into a hotel.
    The man behind the desk said the room is $30 so each man paid $10 and went to the room.
    A while later the man behind the desk realized the room was only $25 so he sent the bellboy to the 3 guys' room with $5.
    On the way the bellboy couldn't figure out how to split $5 evenly between 3 men, so he gave each man a $1 and kept the other $2 for himself.
    This meant that the 3 men each paid $9 for the room, which is a total of $27 add the $2 that the bellboy kept = $29. Where is the other dollar?
  1. A drinks machine offers three selections - Tea, Coffee or Random but the machine has been wired up wrongly so that each button does not give what it claims. If each drink costs 50p, how much minimum money do you have to put into the machine to work out which button gives which selection ? .
  1. Consider a standard chess board. What is the diameter of the largest circle that can be drawn on the board whilst only drawing on the black squares. Hint: This problem is theoretical, so a line passing from one black square directly into it's diagonal neighbour through the intersecting corners is considered to have stayed within the black squares, the lines are infinitely thin.
  1. Two creepers, one jasmin and other rose, are both climbing up and round a cylindrical tree trunk. jasmine twists clockwise and rose anticlockwise, both start at the same point on the ground. before they reach the first branch of the tree the jasmine had made 5 complete twists and the rose 3 twists. not counting the bottom and the top, how many times do they cross?
  1. Assuming i wish to stay dry. Should i walk or run in the rain?
  1. A man has three daughters. A second, intelligent man, asked him the ages of his daughters. The first man told him that the product of their ages (them all multiplied together,) was 36. After thinking the second man was unable to find the answer and asked for another clue. The first man replies the sum of their ages is equal to his house door number. Still the second man was unable to answer and asked for another clue. The first man told him that his youngest daughter had blue eyes, and suddenly second man gave the correct answer. Explain how?
  1. A regular clock has an hour and minute hand. At 12 midnight the hands are exactly aligned. When is the next time they will exactly align or overlap?

bobby car