Suppose $|S|=k$ and we have a function $f:S\times S\to \{0,1\}$. The interpretation of $f$ is that $f$ "compares" elements of $S$: $i$ is preferred over $j$ iff $f(i,j)=1$. When does there exist a function $g:S\to\mathbb{R}$ such that $$ f(i,j)=1 \iff g(i) > g(j)? $$
It is clear that some type of consistency for $f$ is needed, e.g. $f(i,j)=1-f(j,i)$. I am interested in the minimal set of assumptions (ideally, necessary and sufficient) on $f$ that guarantee the existence of $g$.