CSE 311 Foundations of Computing I

Slides:



Advertisements
Similar presentations
Prof. Johnnie Baker Module Basic Structures: Sets
Advertisements

Sets Lecture 11: Oct 24 AB C. This Lecture We will first introduce some basic set theory before we do counting. Basic Definitions Operations on Sets Set.
Discrete Mathematics Lecture 5 Alexander Bukharovich New York University.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Instructor: Hayk Melikya
(CSC 102) Discrete Structures Lecture 14.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Week 21 Basic Set Theory A set is a collection of elements. Use capital letters, A, B, C to denotes sets and small letters a 1, a 2, … to denote the elements.
Discrete Structures Chapter 3 Set Theory Nurul Amelina Nasharuddin Multimedia Department.
Discrete Mathematics Lecture 5
Sets 1.
Sets 1.
SETS A set B is a collection of objects such that for every object X in the universe the statement: “X is a member of B” Is a proposition.
Discrete Maths Objective to re-introduce basic set ideas, set operations, set identities , Semester 2, Set Basics 1.
February 5, 2015Applied Discrete Mathematics Week 1: Logic and Sets 1 Homework Solution PQ  (P  Q) (  P)  (  Q)  (P  Q)  (  P)  (  Q) truetruefalsefalsetrue.
CSE 311 Foundations of Computing I Lecture 6 Predicate Logic, Logical Inference Spring
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
A Brief Summary for Exam 1 Subject Topics Propositional Logic (sections 1.1, 1.2) –Propositions Statement, Truth value, Proposition, Propositional symbol,
CSE 311 Foundations of Computing I Lecture 8 Proofs and Set Theory Spring
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Copyright  The McGraw-Hill Companies, Inc. Permission required for reproduction.
Set A formal collection of objects, which can be anything May be finite or infinite Can be defined by: – Listing the elements – Drawing a picture – Writing.
Basic Structures: Sets, Functions, Sequences, and Sums CSC-2259 Discrete Structures Konstantin Busch - LSU1.
Sets Define sets in 2 ways  Enumeration  Set comprehension (predicate on membership), e.g., {n | n  N   k  k  N  n = 10  k  0  n  50} the set.
Foundations of Computing I CSE 311 Fall It’s Boolean algebra again Definition for  based on  Definition for  based on  Complement works like.
CompSci 102 Discrete Math for Computer Science
Mathematical Preliminaries
CSE 311 Foundations of Computing I Lecture 9 Proofs and Set Theory Autumn 2012 CSE
Chapter 2 With Question/Answer Animations. Section 2.1.
Sets Definition: A set is an unordered collection of objects, called elements or members of the set. A set is said to contain its elements. We write a.
CSE 311 Foundations of Computing I Lecture 10 Set Theory Autumn 2012 Autumn 2012CSE
Based on slides by Patrice Belleville and Steve Wolfman CPSC 121: Models of Computation Unit 11: Sets.
Discrete Mathematics CS 2610 January 27, part 2.
Discrete Mathematics Set.
CSE 311: Foundations of Computing Fall 2013 Lecture 8: Proofs and Set theory.
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
1 Set Theory Second Part. 2 Disjoint Set let A and B be a set. the two sets are called disjoint if their intersection is an empty set. Intersection of.
Notions & Notations (2) - 1ICOM 4075 (Spring 2010) UPRM Department of Electrical and Computer Engineering University of Puerto Rico at Mayagüez Spring.
Introduction to Graph Theory & its Applications
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
Week 8 - Wednesday.  What did we talk about last time?  Relations  Properties of relations  Reflexive  Symmetric  Transitive.
Foundations of Computing I CSE 311 Fall Announcements Homework #2 due today – Solutions available (paper format) in front – HW #3 will be posted.
CSE 311: Foundations of Computing Fall 2013 Lecture 9: Set theory and functions.
Section 6.1 Set and Set Operations. Set: A set is a collection of objects/elements. Ex. A = {w, a, r, d} Sets are often named with capital letters. Order.
Lecture 6 Set Theory.
Applied Discrete Mathematics Week 1: Logic and Sets
CHAPTER 3 SETS, BOOLEAN ALGEBRA & LOGIC CIRCUITS
Set Operations CS 202, Spring 2008 Epp, chapter 5.
Discrete Structures – CNS 2300
Discrete Mathematical The Set Theory
CSE 311 Foundations of Computing I
Week 7 - Monday CS322.
CSE15 Discrete Mathematics 02/15/17
CSE 321 Review Session Dave Bacon.
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
Exercises Show that (P  Q)  (P)  (Q)
Set Operations Section 2.2.
CSE 311 Foundations of Computing I
CSE 311 Foundations of Computing I
CSE 311 Foundations of Computing I
CSE 311: Foundations of Computing
CSE 311: Foundations of Computing
CSE 311: Foundations of Computing
A Brief Summary for Exam 1
CSE 321 Discrete Structures
Applied Discrete Mathematics Week 3: Sets
Math/CSE 1019N: Discrete Mathematics for Computer Science Winter 2007
CSE 321 Discrete Structures
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
CSE 321 Discrete Structures
Presentation transcript:

CSE 311 Foundations of Computing I Lecture 9 Set Theory and Functions Spring 2013

Announcements Reading assignments Sets and Functions 2.1-2.3 6th and 7th Editions Monday: Modular Arithmetic 4.1-4.2 7th Edition 3.4, 3.6 up to p. 227 6th Edition

Important: Applications of Inference Rules You can use equivalences to make substitutions of any subformula Inference rules only can be applied to whole formulas (not correct otherwise). e.g. 1. pq Given 2. (p  r) q Intro  from 1. Does not follow! e.g p=F, q=F, r=T

Set Theory Formal treatment dates from late 19th century Direct ties between set theory and logic Important foundational language

Definition: A set is an unordered collection of objects x  A : “x is an element of A” “x is a member of A” “x is in A” x  A :  (x  A) / Give some examples: Finite sets, Multiple domains N, Z, Q, R Emptyset Sets containing sets

Definitions A and B are equal if they have the same elements A is a subset of B if every element of A is also in B A = B   x (x  A  x  B) A  B   x (x  A  x  B) A  B

Empty Set and Power Set Empty set ∅ does not contain any elements Power set of a set A = set of all subsets of A 𝓟(A) = { B : B  A}

Cartesian Product : A  B A  B = { (a, b) | a  A  b  B}

Set operations / _ / A  B = { x | (x  A)  (x  B) } union A  B = { x | (x  A)  (x  B) } intersection / A - B = { x | (x  A)  (x  B) } set difference symmetric difference A  B = { x | (x  A)  (x  B) } _ A = { x | x  A } (with respect to universe U) / complement

It’s Boolean algebra again Definition for ∪ based on  Definition for ∩ based on  Complement works like 

De Morgan’s Laws A  B = A  B A  B = A  B A B Proof technique: To show C = D show x  C  x  D and x  D  x  C Prove A  B = A  B Begin with x  A  B  x  A  x  B

Distributive Laws A  (B  C) = (A  B)  (A  C)

Characteristic vectors: Representing sets using bits Suppose universe U is {1,2,...,n} Can represent set B ⊆ U as a vector of bits: b1b2...bn where bi=1  (i ∈ B) bi=0  (i ∈ B) Called the characteristic vector of set B Given characteristic vectors for A and B What is characteristic vector for A  B? A  B ? /

Boolean operations on bit-vectors: (a.k.a. bit-wise operations) 01101101 Java: z=x|y          00110111   01111111 00101010         Java: z=x&y    00001111   00001010 01101101 Java: z=x^y             00110111   01011010

A simple identity If x and y are bits: (x  y)  y = ? What if x and y are bit-vectors?

Private Key Cryptography Alice wants to be able to communicate message secretly to Bob so that eavesdropper Eve who hears their conversation, cannot tell what Alice’s message is. Alice and Bob can get together and privately share a secret key K ahead of time.

One-time pad Later, Alice has n-bit message m to send to Bob Alice and Bob privately share random n-bit vector K Eve does not know K Later, Alice has n-bit message m to send to Bob Alice computes C = m  K Alice sends C to Bob Bob computes m = C  K which is (m  K)  K Eve cannot figure out m from C unless she can guess K

Unix/Linux file permissions ls –l drwxr-xr-x ... Documents/ -rw-r--r-- ... file1 Permissions maintained as bit vectors Letter means bit is 1 - means bit is 0.

Russell’s Paradox S = { x | x  x } /

Functions review A function from A to B an assignment of exactly one element of B to each element of A. We write f: A→B. “Image of a” = f(a) Domain of f : A Range of f = set of all images of elements of A

Image, Preimage A B 1 a b 2 c 3 d 4 e

Is this a function? one-to-one? onto? 1 a b 2 c 3 d 4 e 5 6