In this problem, you can either prefer a good to another, disprefer a good to another or be indifferent between the two goods. While I have been able to do it mechanically, I am very confused as to wether there is a smarter mathematical way to tackle these types of problems. The struggle here is that "w is preferred to x" and "x is disprefered to w" are technically not two distinct preferences. I have not had the opportunity to discover a mathematical tool that would enable me to find the right number without the redundancies. Maybe there is a theorem that tackles these types of problems for n goods ?