There are 10 coins, 5 of which are heads up and 5 of which are tails up.

On each turn, you choose exactly 3 coins and flip them over.

What is the minimum number of turns needed to make all of the coins heads up?

Looks like 3 to me:

HHHHHTTTTT
HHHHHHHHTT
HHHHHHTTHT
HHHHHHHHHH

To determine the minimum number of turns needed to make all of the coins heads up, let's break down the problem and find a pattern.

Initially, you have 10 coins, with 5 of them heads up (H) and 5 of them tails up (T). You need to find a way to flip the coins so that all 10 of them are heads up (H).

In each turn, you can choose exactly 3 coins and flip them over. Let's analyze the possible scenarios:

1. Suppose you flip 3 tails (TTT) in a single turn. This would result in 3 additional heads (HHH) and 3 fewer tails (TT). However, you still have 2 tails remaining.

2. Suppose you flip 2 tails and 1 head (TTH or THH) in a single turn. This would result in 2 additional heads (HH) and 1 fewer head (H) and 3 fewer tails (TT). However, you still have 1 tail remaining.

3. Suppose you flip 1 tail and 2 heads (THH or HHT) in a single turn. This would result in 2 additional tails (TT) and 1 fewer tail (T) and 2 fewer heads (HH). However, you still have 3 heads remaining.

Now, let's consider the number of remaining tails and heads after each turn:

Turn 1: Tails = 2, Heads = 5
Turn 2: Tails = 1, Heads = 7
Turn 3: Tails = 0, Heads = 9

In turn 3, if you flip the 3 remaining heads (HHH), you will have all 10 coins heads up (HHHHHHHHHH).

Therefore, the minimum number of turns needed to make all of the coins heads up is 3.

To solve this type of problem, it is important to analyze the different scenarios and find a pattern that leads to the desired outcome. In this case, we observed that the number of tails decreased by 1 and the number of heads increased by 2 after each turn until there were no more tails remaining.