a) There are $2 n+1$ batteries ( $n>2$ ). It is known that there is one more good battery than bad ones, but it is unknown which batteries are good and which are bad. A flashlight requires two batteries to work, and it will only light up if both of them are good. What is the minimum number of such attempts needed to ensure that the flashlight lights up?

b) The same problem, but with $2 n$ batteries ( $n>2$ ), where the number of good and bad batteries is equal.
a) Estimation. Let there be $n+1$ attempts. In some two attempts, the same battery was used, let's make it bad. In the remaining $n-1$ attempts, we will choose one battery and make them bad. In total, there are no more than $n$ bad batteries, and the flashlight will definitely not light up.

Example. We will divide the batteries into $n$ piles: one pile has three batteries, the others have two each. In some pile, there will be at least two good batteries. In each pile, we will check all possible pairs - a total of $n+2$, and the flashlight will light up.

b) Estimation. Let there be $n+2$ attempts. In some attempts, the same battery was used, let's make it bad. If there are fewer than $n$ attempts left, then in each of them we will choose one bad battery. If there are $n$ attempts left, then only the remaining $2n-1$ batteries were used in them. Therefore, again, in some two attempts, the same battery was used, let's make it bad. In the remaining $n-2$ attempts, we will choose one bad battery. In total, there are no more than $n$ bad batteries, and the flashlight will definitely not light up.

Example. We will divide the batteries into $n-1$ piles: two piles have three batteries each, the others have two each. In some pile, there will be at least two good batteries. In each pile, we will check all possible pairs - a total of $n+3$, and the flashlight will light up.

## Answer

a) In $n+2$ attempts; b) in $n+3$ attempts.