N-1 (except for N=3 or 4 where you can do better).
Let's put M=(N-1)/2.
If we ask all i to test all i+1, the most unlucky case occurs when all answers are GOOD. Consider that all bad computers are followed by all good ones. We only can be sure the last one is good - there is no bad computer after a good one.
If the answer is BAD:
- discard both (you never discard two good computers)
- substract 1 from i (if i=0, take anyone)
Now, each computer said the next one is GOOD, so we are in the case (B)(B)(B)..GGGG.
In the worst case:
a) we always discarded a good computer and a bad one
b) both were tested
c) there were M bad computers and therefore M discardments
d) b+c imply 2*M tests.
If a bad computer says BAD, the above still applies.
I just hope I did not forget something...
The results of the tests can be GOOD and BAD in each case. 3 and 4 are special cases, so you cannot use them for induction.