Skip to main content

Subsection 6.1.5 Necessary and Sufficient Conditions

We’ve already talked about necessary and sufficient conditions in the context of Boolean logic. (You might want to take another look at that video now.)

Video cover image

Recall that:

  • P is a sufficient condition for Q if, whenever P is true, Q must also be true (regardless of any other conditions). Put another way:

PQ If P then Q.

  • P is a necessary condition for Q if Q cannot be true without P also being true. Put another way:

QP Q only if P.

So, if we write Q if and only if P (sometimes shortened to Q iff P), we have:

(PQ) ∧ (QP)

In other words, P and Q must have the same truth value. So we have:

PQ

This is typically what we want to say when we are defining P. We’ll also use it for other things, for example requirements specifications.

We’ve been exploiting if and only if all along. In some cases, we’ve used the mathematics convention of writing just “if” when we mean “iff”. But now that we actually know how to reason with the sentences that we write, it makes sense to consider some more examples.

Let’s encode the rule for deciding when leap years occur:

A year is a leap year if and only if it is divisible by 4 but not divisible by 100 unless it is also divisible by 400.

Define:

Leap(y): True if y is a leap year.

Div(x, y): True if x is evenly divisible by y.

Now we can write the leap year rule as a logical expression:

[1] y (Leap(y)  (Div(y, 4)  (Div(y, 100)  Div(y, 400))))

Read [1] as, “y is a leap year if and only if it is divisible by 4 and (it is not divisible by 100 or it is divisible by 400.)” Notice that we had to use parentheses to make the English sentence unambiguous. Also, notice that our or statement is, as usual, inclusive or. So, in principle, if y were not divisible by 100 but divisible by 400, it would be a leap year. Except, of course, that’s not possible. So we don’t actually have to consider it.

Let’s see how we can use [1] to decide whether a given year is a leap year. Assume that we can appeal to an arithmetic engine to tell us whether Div(x, y), where x and y are specific numbers, is true. So, for example, Div(100, 4) will return T, since 100 is divisible by 4. Div(100, 7) will return F.

Let’s see whether 2000 was a leap year:

[1] y (Leap(y) \(\equiv\) (Div(y, 4) \(\wedge\) (\(\neg\)Div(y, 100) \(\vee\) Div(y, 400)))) Definition

[2] Leap(2000) \(\equiv\) (Div(2000, 4) \(\wedge\) (\(\neg\)Div(2000, 100) \(\vee\) Div(2000, 400))) Universal Instantiation [1]

[3] Leap(2000) \(\equiv\) (T \(\wedge\) (\(\neg\)T \(\vee\) T)) Arithmetic [2]

[4] Leap(2000) \(\equiv\) (T \(\wedge\) T) Computation [3]

[5] Leap(2000) \(\equiv\) T Computation [4]

So we have that Leap(2000) is true.

Exercises Exercises

1.

Let’s write a logical expression that captures what it means for two people to be first cousins. Define:

CousinOf(x, y): True if x is a first cousin of y.

ParentOf(x, y): True if x is a parent of y.

SiblingOf(x, y): True if x is a sibling of y.

Consider the following statements:

I. ∀x, y, r, s (CousinOf(x, y) ≡ (ParentOf(r, x) ∧ ParentOf(s, y) ∧ SiblingOf(r, s)))

II. ∀x, y (CousinOf(x, y) ≡ ∃r, s (ParentOf(r, x) ∧ ParentOf(s, y) ∧ SiblingOf(r, s)))

III. ∃ x, y (CousinOf(x, y) ≡ ∃r, s (ParentOf(r, x) ∧ ParentOf(s, y) ∧ SiblingOf(r, s)))

Which (one or more) of them correspond(s) to what it means to be first cousins?

  1. Just I.

  2. Just II.

  3. Just III.

  4. Two of them

  5. All three of them.

Answer.
Correct answer is B
Solution.
Explanation: Just II is correct. It says that any pair of people are cousins (so we need  here) just in case there exist two siblings who are their parents (so we need  here).

Exercises Exercises

Exercise Group.

2. Suppose that we want to describe UT’s graduation requirements. Let’s say that one can graduate from UT if and only if:

  • one has at least 120 credits,

  • one has completed the core requirements, and

  • one has completed the requirements for a major.

(This is an oversimplification of reality, but it’s close enough to being real to be an enlightening example.) Define:

CanGrad(x): True if x can graduate from UT.

Credits(x, y): True if x has accumulated y credits.

Major(x, y): True if x has met the requirements for a major in y.

Core(x): True if x has satisfied the core requirements.

2.

(Part 1) Consider the following statements:

I. ∀x (CanGrad(x) ≡ (∃y (Credits(x, y) ∧ (y ≥ 120) ∧ Major(x, z)) ∧ Core(x)))

II. ∀x (CanGrad(x) ≡ (∃y (Credits(x, y) ∧ (y ≥ 120)) ∧ ∃z (Major(x, z)) ∧ Core(x)))

III. ∀x, y (CanGrad(x) ≡ (Credits(x, y) ∧ (y ≥ 120) ∧ ∃z (Major(x, z)) ∧ Core(x)))

Which (one or more) of them correspond(s) to our graduation rule?

  1. Just I.

  2. Just II.

  3. Just III.

  4. Two of them

  5. All three of them.

Answer.
Correct answer is B.
Solution.
Explanation: II is correct. It says that x can graduate if and only if (s)he has accumulated some number, greater than or equal to 120, of credits, there exists a major (s)he has completed, and (s)he has completed the core. I can’t be correct. z isn’t bound by any quantifier. III is wrong. It says that, for all values of y, x has that many credits.
3.

(Part 2) Assume that we take as a premise the correct answer to Part 1. Now we’d like to reason with it. We’ll assume the following additional premises:

[1] The graduation rule, as given above

[2] CanGrad(Kelly)

[3] Credits(Travis, 130)

[4] Major(Chris, Math)

[5] Core(Chris)

Consider the following expressions:

I. ∃m (Major(Kelly, m))

II. CanGrad(Travis)

III. Credits(Chris, 150) → CanGrad(Chris)

Which (one or more) of them can be proved from the premises we’ve got? Try doing each of the proofs and see which ones go through.

  1. Just I.

  2. Just II.

  3. Just III.

  4. Two of them

  5. All three of them.

Answer.
Correct answer is D.
Solution.
Explanation: I and III can be proved. I must be true because Kelly can graduate, and that requires a major. III must be true because we already know that Chris satisfies the other two graduation requirements. So, if enough credits, then can graduate. II cannot be proven to be true. We know only that Travis satisfies one of the three graduation requirements.