You have 4 servers which accept a positive number from 0 to 255 (8 bits). Each server takes it's input, performs a basic addition or subtraction of a single digit, non-zero number, and outputs the result. Each server performs the same operation as the other servers. Your goal is to figure out what that operation is in as few queries as possible.
The twist is that only one server is configured properly, and the others will invert the input, output, or both. However, you may proxy through any number of servers as a single query (meaning output from one server is used as input of another, but you are only told the final output).
Server Configurations
A: Input --> Add/Subtract --> Output B: Input --> Add/Subtract --> !Output C: !Input --> Add/Subtract --> Output D: !Input --> Add/Subtract --> !Output
Here's an example of input 10 for each server having the operation of -3
A: 10 --> 10-3 --> 7 B: 10 --> 10-3 --> 248 C: 245 --> 245-3 --> 242 D: 245 --> 245-3 --> 13
Proxy example
A > B: 10 --> A --> B --> 251
What is the optimal strategy for figuring out what each server does? What is the optimal strategy for figuring out the configuration of each server?
-3
and+252
? $\endgroup$ – jarnbjo Mar 16 '17 at 17:01