DOC PREVIEW
UNL CSCE 235 - Logic

This preview shows page 1-2-3-4-5-36-37-38-39-40-73-74-75-76-77 out of 77 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 77 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 77 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 77 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 77 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 77 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 77 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 77 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 77 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 77 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 77 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 77 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 77 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 77 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 77 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 77 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 77 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Introductionto LogicCSE235Introduction to LogicSlides by Christopher M. BourkeInstructor: Berthe Y. ChoueirySpring 2006Computer Science & Engineering 235Introduction to Discrete MathematicsSections 1.1-1.2 of [email protected] / 1Introductionto LogicCSE235Introduction IPropositional calculus (or logic) is the study of the logicalrelationship between objects called propositions and forms thebasis of all mathematical reasoning.DefinitionA prop osition is a statement that is either true or false, but notboth (we usually denote a proposition by letters; p, q, r, s, . . .).2 / 1Introductionto LogicCSE235Introduction IIDefinitionThe value of a proposition is called its truth value; denoted byT or 1 if it is true and F or 0 if it is false.Opinions, interrogative and imperative sentences are notpropositions.Truth table:p013 / 1Introductionto LogicCSE235Examples IExample (Propositions)Today is Monday.The derivative of sin x is cos x.Every even number has at least two factors.Example (Not Propositions)C++ is the best language.When is the pretest?Do your homework.4 / 1Introductionto LogicCSE235Examples IIExample (Propositions?)2 + 2 = 5Every integer is divisible by 12.Microsoft is an excellent company.5 / 1Introductionto LogicCSE235Logical ConnectivesConnectives are used to create a compound proposition fromtwo or more other propositions.Negation (denoted ¬ or !)And (denoted ∧) or Logical ConjunctionOr (denoted ∨) or Logical DisjunctionExclusive Or (XOR, denoted ⊕)Implication (denoted →)Biconditional; “if and only if” (denoted ↔)6 / 1Introductionto LogicCSE235NegationA proposition can be negated. This is also a proposition. Weusually denote the negation of a proposition p by ¬p.Example (Negated Propositions)Today is not Monday.It is not the case that today is Monday.It is not the case that the derivative of sin x is cos x.Truth table:p ¬p0 11 07 / 1Introductionto LogicCSE235Logical AndThe logical connective And is true only if both of thepropositions are true. It is also referred to as a conjunction.Example (Logical Connective: And)It is raining and it is warm.(2 + 3 = 5) ∧ (√2 < 2)Schr¨odinger’s cat is dead and Schr¨odinger’s cat is notdead.Truth table:p q p ∧ q0 0 00 1 01 0 01 1 18 / 1Introductionto LogicCSE235Logical OrThe logical disjunction (or logical or) is true if one or both ofthe propositions are true.Example (Logical Connective: Or)It is raining or it is the second day of lecture.(2 + 2 = 5) ∨ (√2 < 2)You may have cake or ice cream.1Truth table:p q p ∧ q p ∨ q0 0 0 00 1 0 11 0 0 11 1 1 11Can I have both?9 / 1Introductionto LogicCSE235Exclusive OrThe exclusive or of two propositions is true when exactly one ofits propositions is true and the other one is false.Example (Logical Connective: Exclusi ve Or)The circuit is either is on or off.Let ab < 0, then either a < 0 or b < 0 but not both.You may have cake or ice cream, but not both.Truth table:p q p ⊕ q0 0 00 1 11 0 11 1 010 / 1Introductionto LogicCSE235Implications IDefinitionLet p and q be propos itions. The implicationp → qis the proposition that is false when p is true and q is false andtrue otherwise.Here, p is called the “hypothesis” (or “antecedent” or“premise”) and q is called the “conclusion” or “consequence”.Truth table:p q p → q0 0 10 1 11 0 01 1 111 / 1Introductionto LogicCSE235Implications IIThe implication p → q can be e quivalently read asif p then qp implies qif p, qp only if qq if pq when pq whenever pp is a sufficient condition for q (p is sufficient for q)q is a necessary condition for p (q is necessary for p)q follows from p12 / 1Introductionto LogicCSE235ExamplesExampleIf you buy your air ticket in advance, it is cheaper.If 2 + 2 = 5 then all unicorns are pink.If x is a real number, then x2≥ 0.If it rains, the grass gets wet.If the sprinklers operate, the grass gets wet.13 / 1Introductionto LogicCSE235ExerciseWhich of the following implications is true?If −1 is a positive number, then 2 + 2 = 5.true: the hypothesis is obviously false, thus no matterwhat the conclusion, the implication holds.If −1 is a positive number, then 2 + 2 = 4.true: for the same reason as aboveIf sin x = 0 then x = 0.false: x can be any multiple of π; i.e. if we let x = 2πthen clearly sin x = 0, but x 6= 0. The implication “ifsin x = 0 then x = kπ for some integer k” is true.14 / 1Introductionto LogicCSE235ExerciseWhich of the following implications is true?If −1 is a positive number, then 2 + 2 = 5.true: the hypothesis is obviously false, thus no matterwhat the conclusion, the implication holds.If −1 is a positive number, then 2 + 2 = 4.true: for the same reason as aboveIf sin x = 0 then x = 0.false: x can be any multiple of π; i.e. if we let x = 2πthen clearly sin x = 0, but x 6= 0. The implication “ifsin x = 0 then x = kπ for some integer k” is true.15 / 1Introductionto LogicCSE235ExerciseWhich of the following implications is true?If −1 is a positive number, then 2 + 2 = 5.true: the hypothesis is obviously false, thus no matterwhat the conclusion, the implication holds.If −1 is a positive number, then 2 + 2 = 4.true: for the same reason as aboveIf sin x = 0 then x = 0.false: x can be any multiple of π; i.e. if we let x = 2πthen clearly sin x = 0, but x 6= 0. The implication “ifsin x = 0 then x = kπ for some integer k” is true.16 / 1Introductionto LogicCSE235ExerciseWhich of the following implications is true?If −1 is a positive number, then 2 + 2 = 5.true: the hypothesis is obviously false, thus no matterwhat the conclusion, the implication holds.If −1 is a positive number, then 2 + 2 = 4.true: for the same reason as aboveIf sin x = 0 then x = 0.false: x can be any multiple of π; i.e. if we let x = 2πthen clearly sin x = 0, but x 6= 0. The implication “ifsin x = 0 then x = kπ for some integer k” is true.17 / 1Introductionto LogicCSE235BiconditionalDefinitionThe biconditionalp ↔ qis the proposition that is true when p and q have the sametruth values. It is false otherwise.Note that it is equivalent to (p → q) ∧ (q → p)Truth table:p q p → q q → p p ↔ q0 0 1 1 10 1 1 0 01 0 0 1 01 1 1 1 118 / 1Introductionto LogicCSE235Examplesp ↔ q can be e quivalently read asp if and only if qp is necessary and sufficient for qif p then q, and converselyp iff q (Note typo in textbook, page 9, line 3.)Examplex > 0 if and only if x2is positive.The alarm goes off iff a burglar breaks in.You may have pudding if and only


View Full Document

UNL CSCE 235 - Logic

Documents in this Course
Proofs

Proofs

82 pages

Induction

Induction

85 pages

Proofs

Proofs

52 pages

Sets

Sets

8 pages

Recursion

Recursion

16 pages

Proofs

Proofs

82 pages

Functions

Functions

71 pages

Recursion

Recursion

50 pages

Functions

Functions

54 pages

Graphs

Graphs

56 pages

Induction

Induction

32 pages

Relations

Relations

60 pages

Graphs

Graphs

10 pages

Recursion

Recursion

80 pages

Recursion

Recursion

81 pages

Functions

Functions

16 pages

Recursion

Recursion

16 pages

Sets

Sets

52 pages

Relations

Relations

60 pages

Load more
Download Logic
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Logic and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Logic 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?