 An example would be testing a piping system for all combinations of settings of its manually operated valves.A balanced Gray code can be constructed, that flips every bit equally often.Since bit-flips are evenly distributed, this is optimal in the following way