Whenever I come across questions, where they ask me to translate English sentences to propositional logic, I often have trouble figuring out which is the if and which part of the sentence is the Then.
For example, in the following question,
You cannot edit a protected Wikipedia entry unless you are an administrator. Express your answer in terms of e: “You can edit a protected Wikipedia entry” and a: “You are an administrator.”
The answer for the same would be a not a -> not e
However, for the following question
You are eligible to be President of the U.S.A. only if you are at least 35 years old, were born in the U.S.A, or at the time of your birth both of your parents were citizens, and you have lived at least 14 years in the country. Express your answer in terms of e: “You are eligible to be Pres- ident of the U.S.A.,” a: “You are at least 35 years old,” b: “You were born in the U.S.A,” p: “At the time of your birth, both of your parents where citizens,” and r: “You have lived at least 14 years in the U.S.A.”
The answer for the same is e -> a and (b or p) and r. However, my original answer ended up being the converse of the actual answer.
Is there a specific way to determine the same and prevent getting the converse of the actual answer?
Please know that 'if' expresses a sufficient condition, while 'only if' expresses a necessary condition.
For example, we can say 'you are male if you are a bachelor': knowing that you are a bachelor is sufficient for us to tell that you are male. This translates as $B \rightarrow M$
We can also say: 'you are a bachelor only if you are male': being male is necessary for one to be a bachelor. So this one does not translate to $M \rightarrow B$ (since that would be saying that one is a bachelor as soon as one is male ... which is clearly not true), but we can express this as $\neg M \rightarrow \neg B$: if one is not a male, then one is not a bachelor .... which by contraposition is equivalent to $B \rightarrow M$.
In sum:
'$P$ if $Q$' translates as $Q \rightarrow P$
'$P$ only if $Q$' translates as $P \rightarrow Q$
Of course, to add to the confusion, in English we can switch the order in which we mention the antecedent and consequent. That is, instead of 'you are male if you are a bachelor', we can also say 'if you are a bachelor, then you are male'. Likewise, to day that 'you are a bachelor only if you are male' is saying the same thing as 'only if you are male, can you be a bachelor'. So, we also have:
'If $P$ then $Q$' translates as $P \rightarrow Q$
'Only if $P$, $Q$' translates as $Q \rightarrow P$
So, just remembering these four patterns will be of help.
However, I would also strongly recommend to always do the following: once you have written down the symbolic expression that you suspect is correct, translate that expression back into English, and see if that indeed captures the idea of the original English exprssion. Translation from English to logic is not a one-way street!