Here is a puzzle I saw on someones problem of the week site. They had it phrased using batteries. Here is another version.
You come across eight stones. You know that 4 of the stones weigh the same, while the other four all weigh different amounts. How many times might you have to use a balance scale before you can know for sure that the next two stones you will weigh will be equal?