Week 1.2 - logic of conditional statements

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Only if form

If p and q are statement variables, "p only if q" means "if not q then not p" or equivalently "if p then q". Write the equivalent if-then statement for: "Today is thanksgiving only if tomorrow is Friday." p: "today is Thanksgiving" q: "tomorrow is Friday" version 1: "If today is Thanksgiving, then tomorrow is Friday." version 2: "If tomorrow is not Friday, then today is not Thanksgiving."

Conditional statement English sentence example 1

"If it rains tomorrow, then John will stay home." T → T = T T → F = F F → T = T F → F = T When the hypothesis (p) of the conditional statement is T but the conclusion (q) is F, the statement as a whole is F. When the hypothesis (p) of the conditional statement is F, the statement as a whole is T.

Conditional statement

"If p (statement), then q (statement)" is called a conditional statement or implication and is denoted by "p → q." In a conditional, p is called the hypothesis or antecedent, q is called conclusion or consequent.

Conditional statement negation example 1

"If you run 10 laps daily, then you will be healthy." Let p be the statement "If you run 10 laps daily"; and q be "you will be healthy."; the statement is p → q. The negation, (p ^ (~q)) would be: "You run 10 laps daily and you will not be healthy."

Conditional statement English sentence example 2

"You can access the internet from campus only if you are not a freshman or you are a CS major." Let p be the statement "you can access the internet from campus"; and q be the statement "you are a freshman"; and r be the statement "you are a computer science major." Suppose we have the statement form p → ~q v r. Evaluate as p → ((~q) v r).

Conditional statements can also be read as:

- p implies q. - q unless p. - q if p. - q when p. - q whenever p. - p is a sufficient condition for q (p is sufficient for q). - q is a necessary condition for p (q is necessary for p). ETC.

Vacuously true or true by default

A conditional statement that is true by virtue of the fact that its hypothesis is false is often called such. In general, when the "if" part of an if-then statement is false, the statement as a whole is said to be true, regardless of whether the conclusion is true or false.

Conditional statement negation LE

By definition p → q is F if and only if, its hypothesis (p) is T and its conclusion (q) is F. It follows that: ~(p → q) ≣ (p ^ (~q))

Biconditional continued

Combo of conditional statement and its converse. p ↔ q has the same truth values as (p → q) ^ (q → p) (see truth table on Epp page 60).

Converse and inverse variants are not LE to the conditional

Conditionals are "if p then q". p → q. The converse is "If q then p." q → p. The inverse is "if ~p then ~q." ~p → ~q.

Converse: sufficient and necessary conditions

Consider a conditional statement, if p then q: It is equivalent to saying either: - p is a sufficient condition for q. - q is a necessary condition for p. "p if, and only if, q" is equivalent to saying - - p is a necessary and sufficient condition for q.

Interpreting a sufficient and necessary condition

Consider the statement: "Being a number divisible by 6 is a sufficient and necessary condition for being divisible by both 2 and 3." The truth of the condition "a number being divisible by 6." is sufficient to ensure the truth of the condition "a number divisible by both 2 and 3" and the truth of the condition "a number being divisible by 6" is necessary for the truth of the condition "a number being divisible by both 2 and 3". Writing in bi-conditional: a number is divisible by 6, if and only if, it is divisible by both 2 and 3. or "if a number is divisible by 6, then it is divisible by both 2 and 3."

Interpreting a sufficient condition example 1

Consider the statement: "For a function to be continuous, it is sufficient that it is differentiable." The truth of the condition "function being differentiable" is sufficient to ensure the truth of the condition "the function being continuous". Rewrite in if-then: If a function is differentiable, then the function is continuous.

Interpreting a necessary condition example 1

Consider the statement: "Doing homework regularly is a necessary condition for Jim to pass the course." The truth of the condition "Jim does homework regularly" is necessary for the condition "Jim to pass the course" to be true. The equivalent if-then: If Jim passes the course, then he does the homework regularly. or: If Jim does not do homework regularly, then he does not pass the course.

Biconditional statement

Given statement variables p and q, the biconditional of p and q is "p if, and only if, q" or "p iff q" and is denoted p ↔ q.

Sufficient and necessary conditions

If p and q denote statements - "p is a sufficient condition for q" means that the occurrence of p suffices to guarantee the occurrence of q. "p is a necessary condition for q" means that the occurrence of p is necessary to obtain the occurrence of q. They are converses! A condition can be both sufficient and necessary.

Necessary and sufficient conditions

If r and s are statements: - r is a sufficient condition for s mean "if r then s". - r is a necessary condition for s mean "if not r then not s". In other words, to say "r is a sufficient condition for s" means that the occurrence of r is sufficient to guarantee the occurrence of s. On the other hand, to say "r is a necessary condition for s" means that if r does not occur, then s cannot occur either. - r is a necessary condition for s also means "if s then r" - r is a necessary and sufficient condition for s means "r if and only if s."

Order of operations and constructing a truth table

In expressions that include → as well as other logical operators, the order of operations is that → is performed last.

Video lecture (1) conditional statements

Notes

Video lecture (2) variants of conditional statements

Notes

Converting only if to if then

Rewrite in two ways of if-then: John will break the world record for the mile run only if he runs the mile in under four minutes. p: John will break the world record for the mile run q: he runs the mile in under four minutes version 1 (if not q, then not p): If John doesn't run the mile in under four minutes, then he will not break the world record for the mile run. version 2 (if p then q): If John breaks the world record, then he will have to run the mile in under four minutes.

If and only if example 2

Rewrite the following statement as a conjunction of two if then statements: This computer program is correct if, and only if, it produces correct answers for all possible sets of input data. p: this computer program is correct q: produces all correct answers for all possible sets of input data. If this computer program is correct, then it produces all correct answers for all possible sets of input data AND if this program produces all the correct answers for all possible sets of input data, then it is correct.

Converting a sufficient condition to if-then form

Rewrite the following statement in in-then: Pia's birth on US soil is a sufficient condition for her to be a US citizen. If-then: If Pia was born on US soil, then she is a US citizen.

Showing negation LE using laws

Show that these are LE: ~(p → q) ≣ (p ^ (~q)). ~(p → q) ≣ ~(~p v q) (by implication) ≣ ~(~p) ^ ~ q (by DM) ≣ p ^ ~q (by double negative)

Additional notes on necessary and sufficient

Sufficient r is a sufficient condition for s If r then s Pia's birth on US soil is a sufficient condition For her to be a US citizen If Pia was born on US soil, then she is a US citizen Necessary r is a necessary condition for s If not r then not s

Epp: 53-57

Terms / definitions / examples / summaries

Epp: 57-61

Terms / definitions / summaries

Representations of if-then as or

The LE of "if p, then q" is "not p or q". For example: Re-write "Either you get to work on time or you are fired." Let ~p be "you get to work on time"; and q "you are fired." Then the statement is ~p v q. The LE is: "If you do not get to work on time, then you are fired."

Conditional order of operations

The conditional is performed last in a truth table, with negation, conjunction, and disjunction performed before.

A conditional statement is LE to its contrapositive.

The contrapositive of a conditional statement of the form "if p then q" is "if ~q then ~p."

Contrapositive of a conditional statement

The contrapositive of a conditional statement of the form "if p then q" is obtained by both negating and exchanging the hypothesis and the conclusion, "~q → ~p". A conditional statement is LE to its contrapositive (same truth values).

Converse of a conditional statement

The converse of a conditional statement of the form "if p then q" is obtained by exchanging the hypothesis and the conclusion. Symbolically, it is q → p. A conditional statement and its converse are not LE.

Inverse of a conditional statement

The inverse of a conditional statement of the form "if p then q" is obtained by negating the hypothesis and the conclusion. Inverse is ~p → ~q. A conditional statement and its inverse are not LE. The converse and the inverse of a conditional statement are LE to each other.

Negation of a conditional statement

The negation of "if p then q" is LE to "p and not q", ~(p -> q) <=> p ^ ~q

Conditional statement LE

The statement (p → q) and ((~p) v q) are LE. Example of ((~p) v q): "My car is not in the repair shop or I will miss the class." Let ~p be the statement "My car is not in the shop"; (p would be "My car is in the shop); and q be the statement "I will miss the class"; then the given statement is ~p v q. LE statement in p → q: "If my car is in the repair shop, then I will miss the class." Can also be shown to be LE using a truth table.

Only if and the biconditional

To say "p only if q" means that p can take place only if q takes place also. That is if q does not take place, then p cannot take place. Another way to say this is that if p occurs, the q must also occur. p only if q = if not q then not p = if p then q

Converting a necessary condition to if-then form

Use the contrapositive to rewrite the following statements in two ways: "George's attaining age 35 is a necessary condition for his being president of the US." r: George attaining age 35 s: George being president of the US Version 1: If George is not 35, then he can not be president of the US. Version 2: If George can be president, then George is 35.

Logical inference

When you make a logical inference or deduction, you reason from a hypothesis to a conclusion. Let p and q be statements, p is the hypothesis or antecedent of the conditional, and q is the conclusion or consequent.

Contrapositive english example 1

Write each of the following statements in its equivalent contrapositive form: a. If Howard can swim across the lake, then Howard can swim to the island." = "If Howard can not swim to the island, then Howard can not swim across the lake." b. If today is Easter, then tomorrow is Monday." = "If tomorrow is not Monday, then today is not Easter."

Converse and inverse English examples 1

Write the converse and inverse of the statements: a. If Howard can swim across the lake, then Howard can swim to the island. C = "If Howard can swim to the island, then Howard can swim across the lake." I = "If Howard can't swim across the lake, then Howard can't swim to the island." b. If today is Easter, then tomorrow is Monday. C = "If tomorrow is Monday, then today is Easter." I = " If today is not Easter, then tomorrow is not Monday."

Converse example 1

Write the converse of: "If it walks like a duck and it talks like a duck, then it is a duck." p: "walks like a duck" q: "talks like a duck" r: "it is a duck" Symbolically, p ^ q → r. Its converse is: r → (p ^ q). "If it is a duck, then it walks like a duck and it talks like a duck."

Contrapositive example 2

Write the equivalent contrapositive for: "If n is prime, then n is odd or n is 2." p: "n is prime" q: "n is odd" AND r: "n is 2" So, p → (q v r). Its contrapositive ~(q v r) → ~p. *APPLY DM law, ~q ^ ~r → ~p. So, "If n is not odd and n is not 2, then n is not prime."

Contrapositive example 1

Write the equivalent contrapositive: "If a number is divisible by 9, then the number is divisible by 3." p: "the number is divisible by 9." q: "the number is divisible by 3." Can be written symbolically as p → q. Its contrapositive is ~q → ~p. "If the number is not divisible by 3, then the number is not divisible by 9."

Biconditional example 1

Write the equivalent statement as a conjunction of two if-then statements for: "This integer is even if, and only if, it equals twice some integer." p: "this integer is even" q: "this integer equals twice some integer." So, "If this integer is even, then it equals twice some integer and if this integer equals twice some integer, then it is even."

Inverse example 1

Write the inverse of: "If n is prime, then n is odd or n is 2." p: "n is prime" q: "n is odd" OR r: "n is 2" Symbolically, p → q v r. Inverse, ~p → ~(q v r). *APPLY DM to simplify, ~p → ~q ^ ~r. "If n is not prime, then n is not odd and n is not 2."

Epp: 61-62

notes

video lecture (3) necessary and sufficient conditions

notes

Biconditional order of operations

↔ and → are co-equal. As with v and ^, the only way to indicate precedence between them is to use parentheses.


संबंधित स्टडी सेट्स

Real Estate Principles Chapter 12

View Set

NUR 320: Intracranial EAQ, Chapter 38:, GI, safety, 309 Quiz 4

View Set

SC-900: Microsoft Security, Compliance, and Identity Fundamentals

View Set

Ch 22: The Role of Life insurance in Estate Planning

View Set

Job Related Services Quiz 3: Area and Volume

View Set

Sect 3: Food Safety & Supply Topic B

View Set