There are four 12-hour clocks arranged in a 2x2 grid, as shown in the diagram. The long minute handles of the left two clocks are touching, while the others are not. Two minute handles touch if they are both vertical (0 and 30 minutes) or both horizontal (15 and 45 minutes). You can set the time of each clock separately. How can you set the time of these clocks, so that there are as many touches between pairs of minute handles as possible in a 24 hour period?
If we set the clocks like this (hour hands omitted, since we don't care about them)
we get touching minute hands at every possible occasion, that is, whenever a minute hand points at another clock, there will always be a minute hand pointing back.
Since we cannot change how often a minute hand points at another clock, and there cannot be any touching when a minute hand points anywhere else, this must be optimal.
The solution is also unique in the sense that if we let the clocks run for an hour, they will visit all the possible initial solution states: the necessary condition (which is also sufficient) is that
the minute hands of any two neighbouring clocks must be offset by exactly 30 minutes,
and there is only one way of achieving those offsets, because we are ignoring the hour hands.
RE-EDIT after noticing that OP also posted a 3x3 version:
The method also generalises to any number of clocks placed on a rectangular grid in any pattern:
1: Calculate the sum of x and y coordinates of the clock's position in the grid
2: Point all minute hands of clocks with an even coordinate sum to the same direction
3: Point the minute hands of clocks with an odd coordinate sum to the opposite direction
This creates a kind of a checkerboard pattern: wherever there's a pair of clocks in two orthogonally adjacent squares in the grid, those two clocks will have different coordinate sum parity, meaning they will be offset by exactly the right amount, and they will touch minute hands every hour.