Showing $f(a,a)\ne f(b,b) \forall a,b \in S, a\ne b$ Question:

Let $S=\{1,2,3,...,n\}$ where n is an odd integer. Let $f$ be a function defined on $\{(i,j):i,j\in S\}$ with properties such that:
  a) $f(s,r)=f(r,s)$
  b) $\{f(r,s):s\in S\}=S \space\forall\space r\in S$
  Prove $\{f(r,r):r\in S\}=S$

I have concluded that we can make a table just like a Sudoku that is symmetric across the diagonal. Each row and column would hold each element in S exactly once. I feel like the fact that n is odd is important but I'm not able to bring it in play. Basically we need to show the diagonal has no repetition of elements
Any help will be appreciated
 A: Drawing the table for a small, odd $n$ shows that any element $a$ must appear exactly once in every row and column, which means it will appear in total an odd number of times. If it does not lie on the diagonal, then, by commutativity, its symmetric pair is fixed, so in effect we define two places. 
$$
c=f(a,b)=f(b,a)
$$
By subtracting two's from an odd number we are always left with an odd number, so there would have to be an odd number of $a$'s on the diagonal, but not fewer than one. 
If any element allows itself to appear more than once on the diagonal there would be no place for the remaining ones, so no such valid table (and, therefore, function) exists. This is not true for $n$ being even because nothing forces an element to appear along a diagonal. For example, the $b$ in $n=2$ has no qualms appearing in every other place except along the diagonal.
$$
a\ b\ 
\\
b\ a\ 
\\
$$
A: Let $\mathbf Q = \langle Q,\cdot \rangle$ be a finite commutative quasi-group.  
Define $\Delta(x)$ to be the number of times the element $x$ appears in the diagonal of the multiplication table.
Since $\mathbf Q$ is commutative, each element appears an even number of times out of the diagonal, and each element appears exactly $|Q|$ times (because each element occurs once in each row).
It follows that $|Q|-\Delta(x)$ is even.

Lemma.
  The mapping $x \mapsto x\cdot x$ is bijective iff $|Q|$ is odd.
Proof. 
  If the mapping is bijective then $\Delta(a)=1$ for all $a \in Q$, and so $|Q|-1$ is even, yielding that $|Q|$ is odd.
  Conversely, if the mapping is not bijective, then, since $Q$ is finite, neither it is surjective.
  Thus there exists $a \in Q$ such that $\Delta(a)=0$, and so $|Q|$ is even.

Since your set $S$ has an odd number of elements, the mapping $f:S^2\to S$ gives the product of an odd number commutative quasi-group, and so $x \mapsto x \cdot x$ is bijective in that quasi-group.
It follows that $\{f(r,r):r \in S\} = S$.
The question on the title is also addressed immediately by $x\mapsto x\cdot x$ (that is $x \mapsto f(x,x)$) being bijective.
