It is shown that a two-component percolation model on a simple cubic lattice can explain an experimentally observed behavior [Savage et al., Sens. Actuators B 79, 17 (2001); Sens. Actuators B 72, 239 (2001).], namely, that a network built up by a mixture of sintered nanocrystalline semiconducting n and p grains can exhibit selective behavior, i.e., respond with a resistance increase when exposed to a reducing gas A and with a resistance decrease in response to another reducing gas B. To this end, a simple model is developed, where the n and p grains are simulated by overlapping spheres, based on realistic assumptions about the gas reactions on the grain surfaces. The resistance is calculated by random walk simulations with nn, pp, and np bonds between the grains, and the results are found in very good agreement with the experiments. Contrary to former assumptions, the np bonds are crucial to obtain this accordance.