Earlier quoted context omitted.
The article said that the problem was based in formal logic and appeared on a "maths test." That means it isn't ambiguous question about the English language.
Yes. It isn’t ambiguous and is entirely solvable using old school formal logic of the “All Cretans are liars” sort. If the liar owns no hats the statement “All my hats are green” would be true. Under the parameters of the question it must be a lie and therefore cannot be true. So the liar owns at least one hat which is not green. They may own additional hats which can be of any colour. People who are saying “if they…
Color of non existing object is undefined.
The correct solution is:
!(all && my && hats && are && green) == !all || !my || !hats || !are || !green.