Review - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

Review

Description:

the converse of 'If A then B' is 'If B then A' Contrapositive ... Venn diagram. Review. Western Washington University. 6. Set Operations. Union. Intersection ... – PowerPoint PPT presentation

Number of Views:35
Avg rating:3.0/5.0
Slides: 10
Provided by: anniegro
Category:
Tags: diagram | review | venn

less

Transcript and Presenter's Notes

Title: Review


1
Review
  • CS311
  • Western Washington University

2
Terminology
  • Converse
  • the converse of If A then B is If B then A
  • Contrapositive
  • the contrapositive of If A then B is If not B,
    then not A

3
Proof Techniques
  • Proof by Example
  • There is a prime number between 80 and 88
  • Proof by Exhaustive Checking
  • The sum of any of the odd numbers 1, 3, and 5 is
    an even number
  • Proof Using Variables
  • The sum of any two odd integers is even
  • Direct Proof
  • If A then B
  • assume A is true to prove B
  • Indirect Proof
  • If A then B
  • prove the contrapositive If not B, then not A
  • proof by contradiction
  • assume the entire statement is false

4
  • If and Only If Proofs
  • requires proving the conditional AND its converse
  • Proof by Induction
  • Needed to prove properties of functions and
    procedures
  • To prove P(n), first prove P(0), then assume P(k)
    is true to prove that P(k1) is true
  • P(N) gt 1 2 3 n n(n1)/2
  • P(0) gt 0 0(01)/2 0
  • Assume P(k) gt 12kk(k1)/2
  • Prove P(k1)
  • 12kk1(12k)(k1) by the associative
    property of addition
  • k(k1)/2 (k1) by assumption
  • (k1)((k1) 1)/2 by factoring

5
Sets
  • A set is a collection of things called its
    elements, members, or objects
  • Set notation and terms
  • membership
  • listing
  • empty set
  • equality
  • inequality
  • subset
  • S x x has property P
  • power set
  • Natural numbers
  • Integers
  • Rational numbers
  • Venn diagram

6
Set Operations
  • Union
  • Intersection
  • Disjoint
  • Difference
  • Symmetric difference (Exclusive OR)
  • Cardinality

7
Sets, Bags, Tuples
  • Sets
  • h, u, g, h h, u, g u, g, h
  • duplicates are ignored
  • order is unimportant
  • Bags
  • h, u, g, h h, h, u, g , but does not equal
    h, u, g
  • duplicates are not ignored
  • order is unimportant
  • Tuple
  • lth, u, g, hgt does not equal lth, h, u, ggt
  • order matters
  • Products of Sets
  • A x B lta,bgt a is an element of A, and b is
    an element of B

8
Function Terminology
  • A -gt B denotes the set of all functions from A to
    B
  • f is a function from A to B
  • fA-gtB
  • A is the domain of f
  • B is the codomain of f
  • the range of f is the set of elements in B that
    are associated with some element in A f(a) a
    ? A
  • Partial function
  • a partial function from A to B may not be defined
    for some elements of A
  • I.e. division for Rationals
  • Composition
  • fA-gtB and gB-gtC
  • g?fA-gtC

9
Languages
  • A language is a set of strings
  • An alphabet is the set of elements used to
    compose the strings of a language
  • A grammar is a set of rules defining the
    structure of the strings in a language
  • 4 parts
  • N - an alphabet of grammar symbols called non
    terminals
  • T - an alphabet of symbols called terminals
  • S - a non terminal starting point
  • P - production rules of the form A-gtB where A and
    B are strings over the alphabet N union T
Write a Comment
User Comments (0)
About PowerShow.com