csci 115
Download
Skip this Video
Download Presentation
CSCI 115

Loading in 2 Seconds...

play fullscreen
1 / 15

CSCI 115 - PowerPoint PPT Presentation


  • 177 Views
  • Uploaded on

CSCI 115. Chapter 2 Logic. CSCI 115. §2 .1 Propositions and Logical Operations. §2 .1 – Propositions and Log Ops. Logical Statement Logical Connectives Propositional variables Conjunction (and: ) Disjunction (or: ) Negation (not: ~) Truth tables.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' CSCI 115' - amy


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
csci 115

CSCI 115

Chapter 2

Logic

csci 1151

CSCI 115

§2.1

Propositions and Logical Operations

2 1 propositions and log ops
§2.1 – Propositions and Log Ops
  • Logical Statement
  • Logical Connectives
    • Propositional variables
    • Conjunction (and: )
    • Disjunction (or: )
    • Negation (not: ~)
  • Truth tables
2 1 propositions and log ops1
§2.1 – Propositions and Log Ops
  • Quantifiers
    • Consider A = {x| P(x)}
    • t  A if and only if P(t) is true
    • P(x) – predicate or propositional function
  • Programming
    • if, while
    • Guards
2 1 propositions and log ops2
§2.1 – Propositions and Log Ops
  • Universal Quantification – true for all values of x
    • x P(x)
  • Existential Quantification – true for at least one value
    • x P(x)
  • Negation of quantification
csci 1152

CSCI 115

§2.2

Conditional Statements

2 2 conditional statements
§2.2 – Conditional Statements
  • Conditional statement: If p then q
    • p  q
    • p – antecedent (hypothesis)
    • q – consequent (conclusion)
  • Truth tables
2 2 conditional statements1
§2.2 – Conditional Statements
  • Given a conditional statement p  q
    • Converse
    • Inverse
    • Contrapositive
  • Biconditional (if and only if)
    • p  q is equivalent to ((p  q)  (q  p))
2 2 conditional statements2
§2.2 – Conditional Statements
  • Statements
    • Tautology (always true)
    • Absurdity (always false)
    • Contingency (truth value depends on the values of the propositional variables)
  • Logical equivalence ()
csci 1153

CSCI 115

§2.3

Methods of Proof

2 3 methods of proof
§2.3 – Methods of Proof
  • Prove a statement
    • Choose a method
  • Disprove a statement
    • Find a counterexample
  • Prove or disprove a statement
    • Where do I start?
2 3 methods of proof1
§2.3 – Methods of Proof
  • Direct Proof
  • Proof by contradiction
  • Mathematical Induction (§2.4)
2 3 methods of proof2
§2.3 – Methods of Proof
  • Valid rules of inference
    • ((p  q)  (q  r))  (p  r)
    • ((p  q)  p)  q Modus Ponens
    • ((p  q)  ~q)  ~p Modus Tollens
    • ~~p  p Negation
    • p  ~~p Negation
    • p  p Repitition
  • Common mistakes – the following are NOT VALID
    • ((p  q)  q)  p
    • ((p  q)  ~p)  ~q
csci 1154

CSCI 115

§2.4

Mathematical Induction

2 4 mathematical induction
§2.4 – Mathematical Induction
  • If we want to show P(n) is true nZ, n > n0 where n0 is a fixed integer, we can do this by:

i) Show P(n0) is true

      • Basic step

ii) Show that for k > n0, if P(k) is true, then P(k + 1) is true

      • Inductive step
ad