Does there exist a compression function (from four 32-bit words to one 32-bit word) that always detects any modification of a single word? I need a compression function $F$ that uses only bitwise operations (AND, NOT, OR, XOR, shifts, rotations) and outputs one 32-bit word $W$ from four 32-bit words $w_1 \mathbin\Vert w_2 \mathbin\Vert w_3 \mathbin\Vert w_4$. The function is required to satisfy one special property: if two 128-bit blocks 

$$\begin{array}{l}
B_1 = w_{1.1} \mathbin\Vert w_{1.2} \mathbin\Vert w_{1.3} \mathbin\Vert w_{1.4},\\
B_2 = w_{2.1} \mathbin\Vert w_{2.2} \mathbin\Vert w_{2.3} \mathbin\Vert w_{2.4}
\end{array}$$  

differ only in one word (that is, there exists only one number $x$ such that $w_{1.x} \neq w_{2.x}$), then $$F(B_1) \neq F(B_2).$$  

But if we have a set $S$ of $y$ different 128-bit blocks 

$$S = \{B_1, B_2, \ldots, B_{y-1}, B_y\}$$ 

such that for any pair $(B_m, B_n)$ of elements, $B_m$ differs from $B_n$ in two or more words, then the probability of 
$F(B_m) = F(B_n)$ is the same as for any standard cryptographic compression function (that outputs one 32-bit word from four 32-bit words).  

Is it possible to construct such a function? If yes, can anyone give an example of a function that fits the above description?  

EDIT  

The connection to cryptography is that some attacks on EnRUPT and XXTEA use the fact that the round function does not satisfy the property described above:  


  The round function of EnRUPT is not bijective for the given key word


and  


  XXTEA’s $F$ is not bijective for either neighbor
I may be missing some subtlety intended by the problem-setter, but the simple answer that satisfies the stated conditions, or damn near, is to just xor the words:

$$F = w_1 \oplus w_2 \oplus w_3 \oplus w_4$$

If we model any change to $w_i$ as xoring with a nonzero error term $e_i$, since xor is linear in $GF(2^n)$ 

$$F' = (w_1\oplus e_1)\oplus (w_2\oplus e_2)\oplus (w_3\oplus e_3)\oplus (w_4\oplus e_4)
\\
= F \oplus (e_1\oplus e_2\oplus e_3\oplus e_4)$$

If only one of $e_i$ is nonzero, the net error is nonzero. If more than one of $e_i$ is nonzero, independently at random, the probability that the net error is zero is almost $2^{-32}$ -- excluding zero from some of the choices throws it off slightly, but I don't remember enough probability to compute exactly how.