I have some difficulties in building a formula $\phi(p, q, r)$, which is true iff only one of the variables is true.
I suppose that it's reasonably to start trying, using the truth table, but building a formula from it actually seems to be a tough job.
In some point of view, the exact formula should contain the $\oplus$ function - for example, $a_{1} \oplus a_{2} \oplus \ldots \oplus a_{n} $ is true iff formula consists only of an odd number of true variables.
Could somebody give me a clue, how to cope with it?
The simplest formula is obviously, $$ ( p \land \lnot q\land \lnot r) \lor ( \lnot p \land \lnot q\land r) \lor ( \lnot p \land q\land \lnot r) $$
Maybe there is a more succinct and elegant formula but I can't seem to unearth it.