You have nine ball-bearings, all of the same size but one slightly heavier than the others, though not enough to be detected by holding them. You have some balance scales and are allowed to do only two weighings of any number of ball bearings. How do you find the heavy one?
Place the ball bearings in a 3 x 3 grid and label each ball bearing according to its position in the grid, A1, A2, A3, B1, etc. You are allowed two weighings so compare the weights of any two rows (the 3 ball bearing in that row) and note which row is the heavier (if any). Replace the ball bearings and then as with the rows compare the weight of any two columns. note which is the heavier column. Replace the ball bearings. The heavier row and column will give the position of heavy ball bearing in the grid. If either weighing is a perfect balance then you know the heavier ball bearing is the row or column you didn't weigh.
Alternative (by Garrett Roberts)
Put any 3 balls on each side of the scale. This will tell you which group of 3 has the heavy ball. For the second weighing, put 1 of the heavy group on each side of the scale. If the scale is balanced, the heavy ball is the one you didn't weigh. This way you don't need to keep track of which ball is which.