discrete mathematics 2012 lecture 3faculty.washington.edu/.../dm-lecture-2.2.pdf2 and 3 or 4 implies...

31
Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 () Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 1/1

Upload: others

Post on 04-Oct-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

Discrete Mathematics 2012Lecture 3

Ngày 8 tháng 9 năm 2012

() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 1 / 1

Page 2: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

Logic-2

(Applications)

Applications of logic are abundant. Systems specifications wherecomplex systems are designed use logic. Chips, web searches,programming languages, puzzle solving all use logic.For instance, Sudoku puzzles can be solved using logic. Just introduce729 propositions p(m,n, k) which will mean “the number k goes in rowm column n” then construct compound propositions that state that inevery row, in every column and in the nine 3× 3 blocks every integerfrom 1 to 9 must appear.

One of the most important development that had a profound impact onour life, is our ability to implement logical operations by electronicdevices. The generic name of electronic devices that implement logicoperations is logic gates. Imagine, without logic gates there would beno Facebook. Can you imagine living in a world without Facebook?

() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 1 / 1

Page 3: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

Logic-2

(Applications)

Applications of logic are abundant. Systems specifications wherecomplex systems are designed use logic. Chips, web searches,programming languages, puzzle solving all use logic.For instance, Sudoku puzzles can be solved using logic. Just introduce729 propositions p(m,n, k) which will mean “the number k goes in rowm column n” then construct compound propositions that state that inevery row, in every column and in the nine 3× 3 blocks every integerfrom 1 to 9 must appear.

One of the most important development that had a profound impact onour life, is our ability to implement logical operations by electronicdevices. The generic name of electronic devices that implement logicoperations is logic gates. Imagine, without logic gates there would beno Facebook. Can you imagine living in a world without Facebook?

() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 1 / 1

Page 4: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

Logic-2

(Applications)

Applications of logic are abundant. Systems specifications wherecomplex systems are designed use logic. Chips, web searches,programming languages, puzzle solving all use logic.For instance, Sudoku puzzles can be solved using logic. Just introduce729 propositions p(m,n, k) which will mean “the number k goes in rowm column n” then construct compound propositions that state that inevery row, in every column and in the nine 3× 3 blocks every integerfrom 1 to 9 must appear.One of the most important development that had a profound impact onour life, is our ability to implement logical operations by electronicdevices. The generic name of electronic devices that implement logicoperations is logic gates. Imagine, without logic gates there would beno Facebook. Can you imagine living in a world without Facebook?

() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 1 / 1

Page 5: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

How important are logic gates? Walther Bothe received the NobelPrice in physics in 1954 for his development of the first electronicdevice that implemented the ∧ gate.

Today, we know how to implement logic gates at the molecular level.

Most programming languages implement four logical operators:

1 not2 and3 or4 implies (usually through the reserved word if)

DefinitionTwo propositions are logically equivalent if they have the same truthtable.

Example

p ∨ (q ∧ r) and (p ∨ q) ∧ (p ∨ r) are logically equivalent.

() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 2 / 1

Page 6: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

How important are logic gates? Walther Bothe received the NobelPrice in physics in 1954 for his development of the first electronicdevice that implemented the ∧ gate.

Today, we know how to implement logic gates at the molecular level.

Most programming languages implement four logical operators:

1 not2 and3 or4 implies (usually through the reserved word if)

DefinitionTwo propositions are logically equivalent if they have the same truthtable.

Example

p ∨ (q ∧ r) and (p ∨ q) ∧ (p ∨ r) are logically equivalent.

() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 2 / 1

Page 7: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

How important are logic gates? Walther Bothe received the NobelPrice in physics in 1954 for his development of the first electronicdevice that implemented the ∧ gate.

Today, we know how to implement logic gates at the molecular level.

Most programming languages implement four logical operators:1 not

2 and3 or4 implies (usually through the reserved word if)

DefinitionTwo propositions are logically equivalent if they have the same truthtable.

Example

p ∨ (q ∧ r) and (p ∨ q) ∧ (p ∨ r) are logically equivalent.

() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 2 / 1

Page 8: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

How important are logic gates? Walther Bothe received the NobelPrice in physics in 1954 for his development of the first electronicdevice that implemented the ∧ gate.

Today, we know how to implement logic gates at the molecular level.

Most programming languages implement four logical operators:1 not2 and

3 or4 implies (usually through the reserved word if)

DefinitionTwo propositions are logically equivalent if they have the same truthtable.

Example

p ∨ (q ∧ r) and (p ∨ q) ∧ (p ∨ r) are logically equivalent.

() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 2 / 1

Page 9: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

How important are logic gates? Walther Bothe received the NobelPrice in physics in 1954 for his development of the first electronicdevice that implemented the ∧ gate.

Today, we know how to implement logic gates at the molecular level.

Most programming languages implement four logical operators:1 not2 and3 or

4 implies (usually through the reserved word if)

DefinitionTwo propositions are logically equivalent if they have the same truthtable.

Example

p ∨ (q ∧ r) and (p ∨ q) ∧ (p ∨ r) are logically equivalent.

() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 2 / 1

Page 10: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

How important are logic gates? Walther Bothe received the NobelPrice in physics in 1954 for his development of the first electronicdevice that implemented the ∧ gate.

Today, we know how to implement logic gates at the molecular level.

Most programming languages implement four logical operators:1 not2 and3 or4 implies (usually through the reserved word if)

DefinitionTwo propositions are logically equivalent if they have the same truthtable.

Example

p ∨ (q ∧ r) and (p ∨ q) ∧ (p ∨ r) are logically equivalent.

() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 2 / 1

Page 11: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

How important are logic gates? Walther Bothe received the NobelPrice in physics in 1954 for his development of the first electronicdevice that implemented the ∧ gate.

Today, we know how to implement logic gates at the molecular level.

Most programming languages implement four logical operators:1 not2 and3 or4 implies (usually through the reserved word if)

DefinitionTwo propositions are logically equivalent if they have the same truthtable.

Example

p ∨ (q ∧ r) and (p ∨ q) ∧ (p ∨ r) are logically equivalent.

() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 2 / 1

Page 12: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

How important are logic gates? Walther Bothe received the NobelPrice in physics in 1954 for his development of the first electronicdevice that implemented the ∧ gate.

Today, we know how to implement logic gates at the molecular level.

Most programming languages implement four logical operators:1 not2 and3 or4 implies (usually through the reserved word if)

DefinitionTwo propositions are logically equivalent if they have the same truthtable.

Example

p ∨ (q ∧ r) and (p ∨ q) ∧ (p ∨ r) are logically equivalent.

() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 2 / 1

Page 13: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

There are a few surprises when considering equivalence ofpropositions. Here is a list of some of them:

1 Are (p → q)→ s and p → (q → s) equivalent?

2 Are p | q and q | p equivalent?3 What about p | (q | s) and (p | q) | s?

DefinitionA set of logical operators is a functionally complete collection ifevery truth table has an equivalent proposition using only operatorsfrom this set.

CommentIn the next slide we shall see some examples of functionally completecollections. A bit surprising is that the | and ↓ each by itself is afunctionally complete collection. It is also noteworthy that the nandgate is the cheapest to build.

() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 3 / 1

Page 14: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

There are a few surprises when considering equivalence ofpropositions. Here is a list of some of them:

1 Are (p → q)→ s and p → (q → s) equivalent?2 Are p | q and q | p equivalent?

3 What about p | (q | s) and (p | q) | s?

DefinitionA set of logical operators is a functionally complete collection ifevery truth table has an equivalent proposition using only operatorsfrom this set.

CommentIn the next slide we shall see some examples of functionally completecollections. A bit surprising is that the | and ↓ each by itself is afunctionally complete collection. It is also noteworthy that the nandgate is the cheapest to build.

() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 3 / 1

Page 15: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

There are a few surprises when considering equivalence ofpropositions. Here is a list of some of them:

1 Are (p → q)→ s and p → (q → s) equivalent?2 Are p | q and q | p equivalent?3 What about p | (q | s) and (p | q) | s?

DefinitionA set of logical operators is a functionally complete collection ifevery truth table has an equivalent proposition using only operatorsfrom this set.

CommentIn the next slide we shall see some examples of functionally completecollections. A bit surprising is that the | and ↓ each by itself is afunctionally complete collection. It is also noteworthy that the nandgate is the cheapest to build.

() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 3 / 1

Page 16: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

There are a few surprises when considering equivalence ofpropositions. Here is a list of some of them:

1 Are (p → q)→ s and p → (q → s) equivalent?2 Are p | q and q | p equivalent?3 What about p | (q | s) and (p | q) | s?

DefinitionA set of logical operators is a functionally complete collection ifevery truth table has an equivalent proposition using only operatorsfrom this set.

CommentIn the next slide we shall see some examples of functionally completecollections. A bit surprising is that the | and ↓ each by itself is afunctionally complete collection. It is also noteworthy that the nandgate is the cheapest to build.

() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 3 / 1

Page 17: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

There are a few surprises when considering equivalence ofpropositions. Here is a list of some of them:

1 Are (p → q)→ s and p → (q → s) equivalent?2 Are p | q and q | p equivalent?3 What about p | (q | s) and (p | q) | s?

DefinitionA set of logical operators is a functionally complete collection ifevery truth table has an equivalent proposition using only operatorsfrom this set.

CommentIn the next slide we shall see some examples of functionally completecollections. A bit surprising is that the | and ↓ each by itself is afunctionally complete collection. It is also noteworthy that the nandgate is the cheapest to build.

() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 3 / 1

Page 18: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

The proposition (p ∨ q ∨ r ∨ s ∨ t) is false only if the five propositionsinside it are all false. In all other cases it will be true. Alternatively, itstruth table has 32 entries, 31 of them are true and only one is false.

Similary, the proposition (p ∧ q ∧ ¬r ∧ s ∧ ¬t) is true if and only if thefive propositions inside are all true. In all other cases it will be false.Alternatively, its truth table has 32 entries, 31 of them are false andonly one is true.

Definition

1 A proposition of the form (p1 ∨ p2 ∨ . . . ∨ pk) is called adisjunction.

2 A proposition of the form (p1 ∧ p2 ∧ . . . ∧ pk) is called aconjunction.

3 A proposition of the form (D1 ∧ D2 ∧ . . .Dm) where each Di is adisjunction is called a conjunction of disjunctions.

4 Similarly, a proposition of the form (C1 ∨ C2 ∨ . . .Ck) where eachCi is a conjunction is called a disjunction of conjunctions.

() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 4 / 1

Page 19: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

The proposition (p ∨ q ∨ r ∨ s ∨ t) is false only if the five propositionsinside it are all false. In all other cases it will be true. Alternatively, itstruth table has 32 entries, 31 of them are true and only one is false.

Similary, the proposition (p ∧ q ∧ ¬r ∧ s ∧ ¬t) is true if and only if thefive propositions inside are all true. In all other cases it will be false.Alternatively, its truth table has 32 entries, 31 of them are false andonly one is true.

Definition

1 A proposition of the form (p1 ∨ p2 ∨ . . . ∨ pk) is called adisjunction.

2 A proposition of the form (p1 ∧ p2 ∧ . . . ∧ pk) is called aconjunction.

3 A proposition of the form (D1 ∧ D2 ∧ . . .Dm) where each Di is adisjunction is called a conjunction of disjunctions.

4 Similarly, a proposition of the form (C1 ∨ C2 ∨ . . .Ck) where eachCi is a conjunction is called a disjunction of conjunctions.

() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 4 / 1

Page 20: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

The proposition (p ∨ q ∨ r ∨ s ∨ t) is false only if the five propositionsinside it are all false. In all other cases it will be true. Alternatively, itstruth table has 32 entries, 31 of them are true and only one is false.

Similary, the proposition (p ∧ q ∧ ¬r ∧ s ∧ ¬t) is true if and only if thefive propositions inside are all true. In all other cases it will be false.Alternatively, its truth table has 32 entries, 31 of them are false andonly one is true.

Definition1 A proposition of the form (p1 ∨ p2 ∨ . . . ∨ pk) is called a

disjunction.

2 A proposition of the form (p1 ∧ p2 ∧ . . . ∧ pk) is called aconjunction.

3 A proposition of the form (D1 ∧ D2 ∧ . . .Dm) where each Di is adisjunction is called a conjunction of disjunctions.

4 Similarly, a proposition of the form (C1 ∨ C2 ∨ . . .Ck) where eachCi is a conjunction is called a disjunction of conjunctions.

() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 4 / 1

Page 21: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

The proposition (p ∨ q ∨ r ∨ s ∨ t) is false only if the five propositionsinside it are all false. In all other cases it will be true. Alternatively, itstruth table has 32 entries, 31 of them are true and only one is false.

Similary, the proposition (p ∧ q ∧ ¬r ∧ s ∧ ¬t) is true if and only if thefive propositions inside are all true. In all other cases it will be false.Alternatively, its truth table has 32 entries, 31 of them are false andonly one is true.

Definition1 A proposition of the form (p1 ∨ p2 ∨ . . . ∨ pk) is called a

disjunction.2 A proposition of the form (p1 ∧ p2 ∧ . . . ∧ pk) is called a

conjunction.

3 A proposition of the form (D1 ∧ D2 ∧ . . .Dm) where each Di is adisjunction is called a conjunction of disjunctions.

4 Similarly, a proposition of the form (C1 ∨ C2 ∨ . . .Ck) where eachCi is a conjunction is called a disjunction of conjunctions.

() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 4 / 1

Page 22: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

The proposition (p ∨ q ∨ r ∨ s ∨ t) is false only if the five propositionsinside it are all false. In all other cases it will be true. Alternatively, itstruth table has 32 entries, 31 of them are true and only one is false.

Similary, the proposition (p ∧ q ∧ ¬r ∧ s ∧ ¬t) is true if and only if thefive propositions inside are all true. In all other cases it will be false.Alternatively, its truth table has 32 entries, 31 of them are false andonly one is true.

Definition1 A proposition of the form (p1 ∨ p2 ∨ . . . ∨ pk) is called a

disjunction.2 A proposition of the form (p1 ∧ p2 ∧ . . . ∧ pk) is called a

conjunction.3 A proposition of the form (D1 ∧ D2 ∧ . . .Dm) where each Di is a

disjunction is called a conjunction of disjunctions.

4 Similarly, a proposition of the form (C1 ∨ C2 ∨ . . .Ck) where eachCi is a conjunction is called a disjunction of conjunctions.

() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 4 / 1

Page 23: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

The proposition (p ∨ q ∨ r ∨ s ∨ t) is false only if the five propositionsinside it are all false. In all other cases it will be true. Alternatively, itstruth table has 32 entries, 31 of them are true and only one is false.

Similary, the proposition (p ∧ q ∧ ¬r ∧ s ∧ ¬t) is true if and only if thefive propositions inside are all true. In all other cases it will be false.Alternatively, its truth table has 32 entries, 31 of them are false andonly one is true.

Definition1 A proposition of the form (p1 ∨ p2 ∨ . . . ∨ pk) is called a

disjunction.2 A proposition of the form (p1 ∧ p2 ∧ . . . ∧ pk) is called a

conjunction.3 A proposition of the form (D1 ∧ D2 ∧ . . .Dm) where each Di is a

disjunction is called a conjunction of disjunctions.4 Similarly, a proposition of the form (C1 ∨ C2 ∨ . . .Ck) where each

Ci is a conjunction is called a disjunction of conjunctions.() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 4 / 1

Page 24: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

TheoremEvery truth table represents a proposition which has an equivalentconjunction of disjunctions.This implies that ¬,∨,∧ is a functionally complete collection of logicoperators.

Every truth table represents a proposition which has an equivalentdisjunction of conjunctions.

Chứng minh.

Start writing...

CommentThis explains why programming languages implement only four logicaloperators. All others can be easily implemented using them. See forexample the Sage example. Even though as we shall soon see, we canuse less operators, the choice to implement those is to make it moreconvenient for the programmer.

() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 5 / 1

Page 25: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

TheoremEvery truth table represents a proposition which has an equivalentconjunction of disjunctions.This implies that ¬,∨,∧ is a functionally complete collection of logicoperators.

Every truth table represents a proposition which has an equivalentdisjunction of conjunctions.

Chứng minh.

Start writing...

CommentThis explains why programming languages implement only four logicaloperators. All others can be easily implemented using them. See forexample the Sage example. Even though as we shall soon see, we canuse less operators, the choice to implement those is to make it moreconvenient for the programmer.

() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 5 / 1

Page 26: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

TheoremEvery truth table represents a proposition which has an equivalentconjunction of disjunctions.This implies that ¬,∨,∧ is a functionally complete collection of logicoperators.Every truth table represents a proposition which has an equivalentdisjunction of conjunctions.

Chứng minh.

Start writing...

CommentThis explains why programming languages implement only four logicaloperators. All others can be easily implemented using them. See forexample the Sage example. Even though as we shall soon see, we canuse less operators, the choice to implement those is to make it moreconvenient for the programmer.

() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 5 / 1

Page 27: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

TheoremEvery truth table represents a proposition which has an equivalentconjunction of disjunctions.This implies that ¬,∨,∧ is a functionally complete collection of logicoperators.Every truth table represents a proposition which has an equivalentdisjunction of conjunctions.

Chứng minh.

Start writing...

CommentThis explains why programming languages implement only four logicaloperators. All others can be easily implemented using them. See forexample the Sage example. Even though as we shall soon see, we canuse less operators, the choice to implement those is to make it moreconvenient for the programmer.

() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 5 / 1

Page 28: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

DefinitionA proposition which is true for every assertion (assigning truth valuesto the variables) is called a tautology.

ExampleThe simplest example is the proposition p ∨ ¬p. We will see other,more complicated examples in the exercises and drills.

DefinitionA proposition which is false for all possible assertions is called acontradiction.

ExampleAgain, the simplest example is the proposition p ∧ ¬p.

() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 6 / 1

Page 29: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

DefinitionA proposition which is true for every assertion (assigning truth valuesto the variables) is called a tautology.

ExampleThe simplest example is the proposition p ∨ ¬p. We will see other,more complicated examples in the exercises and drills.

DefinitionA proposition which is false for all possible assertions is called acontradiction.

ExampleAgain, the simplest example is the proposition p ∧ ¬p.

() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 6 / 1

Page 30: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

DefinitionA proposition which is true for every assertion (assigning truth valuesto the variables) is called a tautology.

ExampleThe simplest example is the proposition p ∨ ¬p. We will see other,more complicated examples in the exercises and drills.

DefinitionA proposition which is false for all possible assertions is called acontradiction.

ExampleAgain, the simplest example is the proposition p ∧ ¬p.

() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 6 / 1

Page 31: Discrete Mathematics 2012 Lecture 3faculty.washington.edu/.../DM-Lecture-2.2.pdf2 and 3 or 4 implies (usually through the reserved word if) Definition Two propositions are logically

DefinitionA proposition which is true for every assertion (assigning truth valuesto the variables) is called a tautology.

ExampleThe simplest example is the proposition p ∨ ¬p. We will see other,more complicated examples in the exercises and drills.

DefinitionA proposition which is false for all possible assertions is called acontradiction.

ExampleAgain, the simplest example is the proposition p ∧ ¬p.

() Discrete Mathematics 2012 Lecture 3 Ngày 8 tháng 9 năm 2012 6 / 1