The main problem in both cases is this: how to convert real language into logical language. In order to do this, one must choose how to interpret real language. This is often difficult, because real language deals with information that is often not apparent, such as implicit premises and the wider context.
X1: I paid $10 for that hamburger.
Y1: That's not cheap!
The logician wants to convert Y1 into
not[equals($10,cheap)]. However, real language is not that simple. While sometimes "not x" can mean the logical/mathematical negation of x, at other times it has a different meaning. If x is a value in a spectrum, it often means "on the side of the spectrum farthest away from x", just as it means in Y1
on the side of the price spectrum farthest away from cheap, i.e. expensive. I took several pieces of information from context for this interpretation: that "cheap" is on a spectrum, that it is on one side of it, the exclamation mark, the price mentioned, my knowledge of prices in the real world - and probably more that I am not aware of.
Consider this example:
X4: I paid $2 for my hamburger: is
Y4: Well, that is not
cheap, but it isn't expensive either.
Here "that is not cheap" does not mean the same as it did in Y1. It means "$2 is not at the cheap side of the spectrum, but it might be anywhere else in the spectrum". This is then refined later by "it isn't expensive either", so that we are left with the middle area of the spectrum.
The reason for this change in meaning is that Y1 and Y4 have different contexts and thus have different logical meanings. You cannot convert real language into logical language without looking at the whole picture, the wider context, i.e. everything you know about the real world and language.
Now the "good food" example:
Good food is not cheap.
Cheap food is not good.
It all depends on how you interpret the real language and how you thus convert it into logical language. "Good food is not cheap" you could interpret as
not[equals(good food,cheap)]. But as you can see in the answers of others, this gives problems.
You could also interpret it as
if food x is good, then food x is not cheap. I believe this comes much closer to what most speakers would mean if they made this statement in real language. "Cheap food is not good" I would accordingly interpret as
if food x is cheap, food x is not good.
I chose these interpretations because the real grammatical construction noun + copula + adjective does not express a relation of equality, but rather that of the noun's having the property expressed by the adjective. The word "to be" can express equality (ten is two times five), having a property (the house is yellow), belonging to a class (Socrates is a man), or existence (there is a God) - and possibly some more. Only when it expresses equality are the two variables of the same kind and in a reciprocal relation: otherwise, the relation is not reversible and the variables not of the same kind.
Every time you convert real into logical language, you just need to choose the interpretation that best fits the context. There is no rule for which one to pick, except that the logical statement must give the same false and true values as the real statement if you enter the same parameters; you will probably judge this for a good deal by common sense. Do you know how to use truth tables? They are what you can use to test logical equivalence between two logical statements.
As an added illustration, I will give a classic example of interpretation.
The King of France is bald.
France has no King, it is a republic. How do we interpret this? A few options:
Exists(KoF) and HasProperty(KoF, bald)
Number 1 would give us neither true nor false, because the input KoF would remain empty. If we choose this, then we assume that a real answer to the real statement would be "your question is moot", because the question presumes that there is a King of France. (I have heard that Japanese has a special answer to this kind of question, "mu".)
Number 2 is problematic, among other things because "bald" is a property and "KoF" is a person, and a property and a person cannot be identical. A real answer might be "your question is a tautology and moot".
To number 3, I'd give the real answer "no, your question is a tautology", since it is always not true, as there exists no King of France.
Which one do you prefer? I believe both 1 and 3 could be valid conversions. It just depends on your choice; there is no single reasonable interpretation in this case.