Skip to main content

Larry's Blog 🌊

math, code and fun



If X Then Y - Sufficiency and Necessity

  | #Math123

If Then Format

If then is one of the most important and common logic format we see everyday. When we see if X, then Y, the relation can be represented symbolically as:

\[X \rightarrow Y\]

This is a cause and effect relation, a logically equivalent one is called its contrapositive:

\[\neg Y \rightarrow \neg X\]

However, we must bear in mind that if X, then Y does not logically give rise to the following relations:

  • if Y, then X, or $Y \rightarrow X$
  • if NOT X, then NOT Y, or $\neg X \rightarrow \neg Y$

Back to the $X \rightarrow Y$ assertion, we say X is a sufficient condition guranteeing the truth of Y, but is not necessary for Y to happen (in another word, there may be other conditions sufficient to give rise to Y), and Y is a necessary condition required for X to be true, but not sufficient to guarantee for X to happen.

Now we explore some signal words for both sufficient and necessary conditions:

Sufficient signal words: ($S \rightarrow Y$)

  • If S then Y.
  • All S are Y.
  • Every S is Y.
  • Whenever S happens, Y happens (or Y happens whenever S happens).
  • Each time S happens, Y happens (or Y happens each time S happens).
  • S is enough (or adequate or sufficient) to Y.
  • In order for S to happen, Y must happen (or Y must happen in order for S to happen).

Necessary signal words: ($Y \rightarrow N$)

  • Y happens only if N happens.
  • In order for Y to happen, N must happen (or N must happen in order for Y to happen).
  • Only N are Y.
  • The only way Y can happen is if N happens.
  • Y isn’t possible unless N happens.
  • Y depends on N.
  • N is required for Y.


Question Examples

Example 1:

Factory manager: One reason the automobile parts this factory produces are expensive is that our manufacturing equipment is outdated and inefficient. Our products would be more competitively priced if we were to refurbish the factory completely with new, more efficient equipment. Therefore, since to survive in today’s market we have to make our products more competitively priced, we must completely refurbish the factory in order to survive.

Explanation:

The first sentence of the argument is not a logical expression, or we cannot establish a logical relation based on it. We only know that equipment is one of the reasons attributing to expensive result, but it’s neither a sufficient or necessary condistion to the result, and vice versa.

The second sentence “Our products would be more competitively priced if we were to refurbish the factory completely with new, more efficient equipment” is a logical expression and serves as a premise. We can deduce an format from this sentence as Refurbish $\rightarrow$ Competitive Price

The manager then follows with his argument, if we put it in symbolic way,

Competitive Price $\rightarrow$ Refurbish

Apparently, it’s not logically equivalent to the premise. It mistakenly treat necessary condition Competitive Price as sufficient.


Example 2: A book tour will be successful if it is well publicized and the author is an established writer. Julia is an established writer, and her book tour was successful. So her book tour must have been well publicized.

Explanation:

We need to explore a bit more about the logic expression first. According to De Morgan’s laws, if you want to negate a disjunction or conjunction,

  • The negation of a disjunction is the conjunction of the negations: $ \overline{A \cup B} \equiv \overline{A} \cap \overline{B}$
  • The negation of a conjunction is the disjunction of the negations: $ \overline{A \cap B} \equiv \overline{A} \cup \overline{B}$

The logic expression of the exmaple’s first sentence is:

Publicized AND Established $\rightarrow$ Successful Tour

The only correct deduction is the contrapositive of the above expressioin:

not Successful Tour $\rightarrow$ not Publicized OR not Established

In English, we can say if the book tour is not successful, but Julia is known to be an established writer, then it must be true that the tour is not well publicized.


A Small Tip on “only if”

As mentioned above, we know X only if Y means $X \rightarrow Y$. An example may look like “I wear a hat only if it’s sunny.”

However, we also see some variations of “only”, which might not be so apparent at the first sight, but they are all the same as “only if”, or Hat $\rightarrow$ Sunny:

  • I only wear a hat if it’s sunny.
  • I wear a hat only when it’s sunny.
  • The only time I wear a hat is if it’s sunny.
  • Only sunny days will get me to wear a hat.


Some Tricky Expressions:


  • Any X is/are Y: $X \rightarrow Y$
  • Every X is Y: $X \rightarrow Y$
  • X requires Y: $X \rightarrow Y$
  • X depends on Y: $X \rightarrow Y$
  • No X unless Y: $X \rightarrow Y$

  • No X is/are Y: $X \rightarrow \text{not } Y$ (don’t write as not $X \rightarrow Y$)
  • X cannot be Y: $X \rightarrow \text{not } Y$

  • Only X are Y: $Y \rightarrow X$
  • Without X there can be no Y: $Y \rightarrow X$
  • X happens whenever Y happens: $Y \rightarrow X$


Unless format

Sometimes we also encounter an expression as X unless Y. For example, say, I go running outside unless it’s snowing. How to translate this sentence into symbolic expression?

Well, it equals to if not Y then X, or if not X then Y, the symbolic relation is

\[\neg Y \rightarrow X \text{ or, } \neg X \rightarrow Y\]

In English, we say if it’s not snowing, I go running outside, or if I don’t go running outside, it must be snowing.

Of course, we also see example as Not X unless Y, treating the negation as part of the sentence, the above logic still applies. For example, “Unless the polls are grossly inaccurate, Slater will not win”. In logic, it’s equal to say:

“If the polls are accurate, then Slater will not win.”

or,

“if Slater wins, then the polls are grossly inaccurate.”


About Larry Cui

Photo of Larry Cui

A greenhorn coder and a big fan of math.