COT 3100, Spring 2001 Applications of Discrete Structures

Slides:



Advertisements
Similar presentations
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Advertisements

Discrete Structures & Algorithms Basics of Set Theory EECE 320 — UBC.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Section 1.6: Sets Sets are the most basic of discrete structures and also the most general. Several of the discrete structures we will study are built.
2.1 Sets. DEFINITION 1 A set is an unordered collection of objects. DEFINITION 2 The objects in a set are called the elements, or members, of the set.
Analytical Methods in CS (CIS 505)
1 Set Theory Rosen 6 th ed., § Introduction to Set Theory A set is a structure, representing an unordered collection (group, plurality) of zero.
EE1J2 – Discrete Maths Lecture 7
Sets 1.
CSE115/ENGR160 Discrete Mathematics 02/10/11 Ming-Hsuan Yang UC Merced 1.
Sets 1.
modified from UCI ICS/Math 6D, Fall Sets+Functions-1 Sets “Set”=Unordered collection of Objects “Set Elements”
EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 12 Number theory Mathematical induction Proof by induction Examples.
Sets. Copyright © Peter Cappello Definition Visualize a dictionary as a directed graph. Nodes represent words If word w is defined in terms of word.
Discrete Math 6A Max Welling. Recap 1. Proposition: statement that is true or false. 2. Logical operators: NOT, AND, OR, XOR, ,  3. Compound proposition:
Sets.
Michaelmas Term 2004 Discrete Mathematics CSC 141 Discrete Mathematics Dr. Corina Sas and Ms. Nelly Bencomo
Set, Combinatorics, Probability & Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Set,
Mathematical Preliminaries (Hein 1.1 and 1.2) Sets are collections in which order of elements and duplication of elements do not matter. – {1,a,1,1} =
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
Copyright © 2014 Curt Hill Sets Introduction to Set Theory.
Discrete Structure Sets. 2 Set Theory Set: Collection of objects (“elements”) a  A “a is an element of A” “a is a member of A” a  A “a is not an element.
CS201: Data Structures and Discrete Mathematics I
Chapter 2: Basic Structures: Sets, Functions, Sequences, and Sums (1)
CompSci 102 Discrete Math for Computer Science
Lecture 4: Predicates and Quantifiers; Sets.
Section 2.1. Section Summary Definition of sets Describing Sets Roster Method Set-Builder Notation Some Important Sets in Mathematics Empty Set and Universal.
2014 년 봄학기 강원대학교 컴퓨터과학전공 문양세 이산수학 (Discrete Mathematics)  집합 (Set)
ELEMENTARY SET THEORY.
Sets Goal: Introduce the basic terminology of set theory.
Chapter 2 With Question/Answer Animations. Section 2.1.
Discrete Mathematics Lecture # 10. Set Theory  A well defined collection of {distinct} objects is called a set.  The objects are called the elements.
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.
Discrete Mathematics Set.
Module #3 - Sets 3/2/2016(c) , Michael P. Frank 2. Sets and Set Operations.
Discrete Mathematics CS 2610 August 31, Agenda Set Theory Set Builder Notation Universal Set Power Set and Cardinality Set Operations Set Identities.
Section 2.1. Sets A set is an unordered collection of objects. the students in this class the chairs in this room The objects in a set are called the.
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.
Introduction to Set Theory (§1.6) A set is a new type of structure, representing an unordered collection (group, plurality) of zero or more distinct (different)
Sets, Permutations, and Combinations. Lecture 4-1: Sets Sets: Powerful tool in computer science to solve real world problems. A set is a collection of.
CSE15 Discrete Mathematics 02/13/17
Sets.
Set Definition: A set is unordered collection of objects.
INF385T: Information Modeling Introduction to Unit 2: The Relational Model Sets, Tuples, and Relations: Foundations for Relational Model Slides.
Discrete Mathematical The Set Theory
Set, Combinatorics, Probability & Number Theory
Bogazici University Department of Computer Engineering CmpE 220 Discrete Mathematics 03. Sets Haluk Bingöl.
COT 3100, Spring 2001 Applications of Discrete Structures
The Basic Concepts of Set Theory
Lecture 1 Theory of Automata
Chapter 1 Logic and Proofs Homework 2 Given the statement “A valid password is necessary for you to log on to the campus server.” Express the statement.
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
Introduction to Set Theory
CS100: Discrete structures
Set Theory Rosen 6th ed., §
Module #3: The Theory of Sets
The Basic Concepts of Set Theory
Unit I: Part I Set Theory
2.1 Sets Dr. Halimah Alshehri.
Chapter 2 The Basic Concepts of Set Theory
Predicate Logic (§1.3) Predicate logic is an extension of propositional logic that permits concisely reasoning about whole classes of entities. Propositional.
Module #3: The Theory of Sets
Discrete Mathematics CS 2610
Chapter 2 The Basic Concepts of Set Theory
Discrete Mathematics and its Applications
Lecture Sets 2.2 Set Operations.
Discrete Mathematics and its Applications
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
Today’s topics Sets Reading: Sections Upcoming Definitions
Module #3: The Theory of Sets
Presentation transcript:

COT 3100, Spring 2001 Applications of Discrete Structures Section #1089X - MWF 4th period Dr. Michael P. Frank Lecture #7 Wed., Jan. 23, 2001 1/24/01 Lecture #7

Administrivia Today: Returning graded Quiz #1 papers. Thursday 6:30pm in E121: ACM & Nortel Networks on “The Path to a Wireless Internet” Friday 3pm in E121: Distinguished lecturer Christos Papadimitriou on “Algorithmic Problems Related to the Internet.” Today: Finish §1.3, Predicate Logic; §1.4, Sets. 1/24/01 Lecture #7

Review: Predicate Logic (§1.3) Objects x, y, z, … Predicates P, Q, R, … are functions mapping objects x to propositions P(x). Multi-argument predicates P(x, y). Quantifiers: (x P(x)) =“For all x’s, P(x).” (x P(x))=“There is an x such that P(x).” 1/24/01 Lecture #7

Some Number Theory Examples Let u.d. = the natural numbers 0, 1, 2, … “A number x is even, E(x), if and only if it is equal to 2 times some other number.” x (E(x)  (y x=2y)) “A number is prime, P(x), iff it isn’t the product of two non-unity numbers.” x (P(x)  (yz x=yz  y1  z1)) 1/24/01 Lecture #7

Calculus Example Precisely defining the concept of a limit using quantifiers: 1/24/01 Lecture #7

Deduction Example Definitions: s = Socrates; H(x) = “x is human”; M(x) = “x is mortal”. Premises: H(s) Socrates is human. x H(x)M(x) All humans are mortal. 1/24/01 Lecture #7

Deduction Example Continued Some valid conclusions: H(s)M(s) [Instantiate universal.] If Socrates is human then he is mortal. H(s)  M(s) Socrates is inhuman or mortal. H(s)  (H(s)  M(s)) He’s human, and inhuman or mortal. (H(s)  H(s))  (H(s)  M(s)) [Distributive law.] F  (H(s)  M(s)) [Trivial contradiction.] H(s)  M(s) [False is the identity for OR.] M(s) Socrates is mortal. 1/24/01 Lecture #7

Another Example Definitions: H(x) = “x is human”; M(x) = “x is mortal”; G(x) = “x is a god” Premises: x H(x)M(x) and x G(x)M(x). Show that x (H(x)  G(x)). 1/24/01 Lecture #7

The Derivation x H(x)M(x) and x G(x)M(x). x M(x)H(x) [Contrapositive.] x (G(x)M(x))  (M(x)H(x)) x G(x)H(x) x G(x)  H(x) [Definition of .] x (G(x)  H(x)) [DeMorgan’s law.] x G(x)  H(x) [An equivalence law.] 1/24/01 Lecture #7

End of §1.3 Predicate Logic From this section you should have learned: Predicate logic notation & conventions Conversions: predicate logic  clear English Meaning of quantifiers, equivalences Simple reasoning with quantifiers Next topic: Set theory - a language for talking about collections of objects. 1/24/01 Lecture #7

Intro. to Set Theory (§1.4) A set is an unordered collection/group/ plurality of distinct (different) objects. Set theory deals with operations between, relations among, and statements about sets. Ubiquitous in computer software systems. All math can be defined in terms of some form of set theory (with predicate logic). 1/24/01 Lecture #7

Naïve set theory Basic premise: Any described collection or class of objects (elements) forms a set. Resulting theory turns out to be logically inconsistent: There exist naïve set theory propositions p such that you can prove that both p and p are true. Therefore the theory itself cannot be true to begin with! More sophisticated set theories fix this. 1/24/01 Lecture #7

Basic notations for sets For sets, we’ll use variables S, T, U, … You can denote a set S by listing its elements in curly braces: {a, b, c} is the set of whatever 3 objects are denoted by a, b, c. Set builder notation: For any proposition P(x) over any universe of discourse, {x|P(x)} is the set of all x such that P(x). 1/24/01 Lecture #7

Basic properties of sets Sets are unordered: No matter what a, b, c denote, {a, b, c} = {a, c, b} = {b, a, c} = {b, c, a} = {c, a, b} = {c, b, a} All elements are distinct (unequal); multiple listings make no difference! If a=b, then {a, b, c} = {a, c} = {b, c} = {a, a, b, a, b, c, c, c, c}. Only 2 elements! 1/24/01 Lecture #7

Definition of Set Equality Two sets are equal if and only if they contain all the same elements. In particular, it does not matter how the set is defined or denoted. {1, 2, 3, 4} = {x | x is an integer where x>0 and x<5 } = {x | x is the set of positive integers whose squares are >0 and <25} 1/24/01 Lecture #7

Infinite Sets Conceptually, sets may be infinite (i.e., not finite, without end, unending). Symbols for some special infinite sets: N = {0, 1, 2, …} The Natural numbers. Z = {…, -2, -1, 0, 1, 2, …} The Zntegers. R = The Real numbers, such as 374.1828471929498181917281943125… Infinite sets come in different sizes! 1/24/01 Lecture #7

Positive integers less than 10 Venn Diagrams 2 4 6 8 -1 1 Even integers from 2 to 9 3 5 7 9 Odd integers from 1 to 9 Positive integers less than 10 Primes <10 Integers from -1 to 9 1/24/01 Lecture #7

Basic Set Relations: Member of xS (“x is in S”) is the proposition that object x is an lement or member of set S. e.g. 3N, “a”{x| x is a letter of the alphabet} Can define set equality in terms of  relation: S,T: S=T  (x: xS  xT) “Two sets are equal iff they have all the same members.” xS  (xS) “x is not in S” 1/24/01 Lecture #7

The Empty Set  (“null”, “the empty set”) is the unique set with no elements. ={}={x|False} No matter the domain of discourse, x:x. 1/24/01 Lecture #7

Subset and Superset Relations ST (“S is a subset of T”) means that every element of S is also an element of T. ST  x (xS  xT) S, SS. ST (“S is a superset of T”) means TS. Note S=T  ST ST. means (ST), i.e. x(xS  xT) 1/24/01 Lecture #7

Proper Subsets & Supersets ST (“S is a proper subset of T”) means that ST but . Similar for ST. Example: {1,2}  {1,2,3} S T Venn Diagram equivalent of ST 1/24/01 Lecture #7

Sets Are Objects, Too! The objects that are elements of a set may themselves be sets. E.g. let S={x | x  {1,2,3}} then S={, {1}, {2}, {3}, {1,2}, {1,3}, {2,3}, {1,2,3}} Note that {1}  {{1}} !!!! 1/24/01 Lecture #7

Cardinality and Finiteness |S| (read “the cardinality of S”) is a measure of how many different elements are in S. E.g., ||=0, |{1,2,3}| = 3, |{a,b}| = 2, |{{1,2,3},{4,5}}| = ____ If |S|N, then S is finite. Otherwise, S is infinite. What are some infinite sets we’ve seen? 2 N Z R 1/24/01 Lecture #7

The Power Set Operation The power set P(S) of a set S is the set of all subsets of S. P(S) = {x | xS}. E.g. P({a,b}) = {, {a}, {b}, {a,b}}. Sometimes P(S) is written 2S. Note that for finite S, |P(S)| = 2|S|. It turns out that |P(N)| > |N|. There are different sizes of infinite sets! 1/24/01 Lecture #7

Naïve Set Theory is Inconsistent Some naïve descriptions of sets lead to structures that are not well-defined. (That do not have consistent properties.) These “sets” mathematically cannot exist. E.g. let S = {x | xx }. Is SS? Consistent set theories must restrict the language that can be used to describe sets. For purposes of this class, don’t worry about it! 1/24/01 Lecture #7

Ordered n-tuples Like sets, but duplicates matter and the order makes a difference. For nN, an ordered n-tuple or a sequence of length n is written (a1, a2, …, an). The first element is a1, etc. Note (1, 2)  (2, 1)  (2, 1, 1). Empty sequence, singlets, pairs, triples, quadruples, quintuples, …, n-tuples. 1/24/01 Lecture #7

Cartesian Products of Sets For sets A, B, their Cartesian product AB  {(a, b) | aA  bB }. E.g. {a,b}{1,2} = {(a,1),(a,2),(b,1),(b,2)} Note that for finite A, B, |AB|=|A||B|. Note that the Cartesian product is not commutative: AB: AB=BA. Extends to A1  A2  …  An... 1/24/01 Lecture #7

End of §1.4 Sets S, T, U… Special sets N, Z, R. Set notations {a,b,...}, {x|P(x)}… Set relation operators xS, ST, ST, S=T, ST, ST. (These form propositions.) Finite vs. infinite sets. Set operations |S|, P(S), ST. 1/24/01 Lecture #7