SETS, RELATIONS, FUNCTIONS

Slides:



Advertisements
Similar presentations
More Set Definitions and Proofs 1.6, 1.7. Ordered n-tuple The ordered n-tuple (a1,a2,…an) is the ordered collection that has a1 as its first element,
Advertisements

Discrete Mathematics I Lectures Chapter 6
Discrete Mathematics Lecture 5 Alexander Bukharovich New York University.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Instructor: Hayk Melikya
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.
Denoting the beginning
SET.   A set is a collection of elements.   Sets are usually denoted by capital letters A, B, Ω, etc.   Elements are usually denoted by lower case.
Discrete Mathematics Lecture 4 Harper Langston New York University.
Introduction to Sets. A set is just a collection of stuff But the stuff must be written inside curly braces Each item in the curly braces is separated.
CS5371 Theory of Computation Lecture 1: Mathematics Review I (Basic Terminology)
EE1J2 – Discrete Maths Lecture 5 Analysis of arguments (continued) More example proofs Formalisation of arguments in natural language Proof by contradiction.
Mathematics.
Set Notation.
This section will discuss the symbolism and concepts of set theory
Set theory Sets: Powerful tool in computer science to solve real world problems. A set is a collection of distinct objects called elements. Traditionally,
Introduction to Proofs
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,
Sets Defined A set is an object defined as a collection of other distinct objects, known as elements of the set The elements of a set can be anything:
CS 103 Discrete Structures Lecture 10 Basic Structures: Sets (1)
Chapter 7 Logic, Sets, and Counting Section 2 Sets.
1 ENM 503 Block 1 Algebraic Systems Lesson 2 – The Algebra of Sets The Essence of Sets What are they?
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
CompSci 102 Discrete Math for Computer Science
Week 6 - Friday.  What did we talk about last time?  Solving recurrence relations.
Naïve Set Theory. Basic Definitions Naïve set theory is the non-axiomatic treatment of set theory. In the axiomatic treatment, which we will only allude.
1 Introduction to Abstract Mathematics Sets Section 2.1 Basic Notions of Sets Section 2.2 Operations with sets Section 2.3 Indexed Sets Instructor: Hayk.
Chapter SETS DEFINITION OF SET METHODS FOR SPECIFYING SET SUBSETS VENN DIAGRAM SET IDENTITIES SET OPERATIONS.
Basic Principles (continuation) 1. A Quantitative Measure of Information As we already have realized, when a statistical experiment has n eqiuprobable.
CSE 311 Foundations of Computing I Lecture 9 Proofs and Set Theory Autumn 2012 CSE
THEORY OF COMPUTATION Komate AMPHAWAN 1. 2.
Chapter 2 With Question/Answer Animations. Section 2.1.
Based on slides by Patrice Belleville and Steve Wolfman CPSC 121: Models of Computation Unit 11: Sets.
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
Discrete Mathematics CS 2610 August 31, Agenda Set Theory Set Builder Notation Universal Set Power Set and Cardinality Set Operations Set Identities.
1 Introduction to Abstract Mathematics Proof Methods , , ~, ,  Instructor: Hayk Melikya Purpose of Section:Most theorems in mathematics.
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.
Section 1.7. Section Summary Mathematical Proofs Forms of Theorems Direct Proofs Indirect Proofs Proof of the Contrapositive Proof by Contradiction.
CPCS 222 Discrete Structures I
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.
Proof And Strategies Chapter 2. Lecturer: Amani Mahajoub Omer Department of Computer Science and Software Engineering Discrete Structures Definition Discrete.
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.
CISC1100: Sets Fall 2014 Xiaolan Zhang
Dr. Ameria Eldosoky Discrete mathematics
The Foundations: Logic and Proofs
Chapter 2 Sets and Functions.
CHAPTER 3 SETS, BOOLEAN ALGEBRA & LOGIC CIRCUITS
The Language of Sets If S is a set, then
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Set, Combinatorics, Probability & Number Theory
Lecture 1 Theory of Automata
Chapter 3 The Real Numbers.
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)
CS100: Discrete structures
Set Operations Section 2.2.
The Foundations: Logic and Proofs
Copyright © Cengage Learning. All rights reserved.
Discrete Mathematics CS 2610
Chapter 7 Logic, Sets, and Counting
Lecture Sets 2.2 Set Operations.
Sets & Set Operations.
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
Presentation transcript:

SETS, RELATIONS, FUNCTIONS Dr Alexander Bolotov – Principal Lecturer, Course Leader for BSc, BEng/MEng Software Engineering, BSc Artificial Intelligence Room N7.120 Email: A.Bolotov@wmin.ac.uk http://www2.wmin.ac.uk/bolotoa

Why is Set Theory important for Computer Science? Set Theory is an important language and tool for reasoning, It's a basis for Mathematics| Set Theory is a useful tool for reasoning about computation and the objects of computation. It is a source of fundamental ideas in Computer Science from theory to practice; and likely to stay for long time. Computer Science, had many of its constructs and ideas inspired by Set Theory. Start with Object orientation, where the concepts of CLASS, INHERITANCE reflect sets and set-theoretical operations! Finally, a knowledge of Set Theory should facilitate your ability to think abstractly. It will provide you with a foundation on which to build a firm understanding and analysis of the new ideas in Computer Science that you will meet.

A set is a collection of objects (of any nature!) What is a set? A set is a collection of objects (of any nature!) Names of the objects are written inside curly braces separated by commas Some examples of sets include: {☼, 5, ♣} {1, 2, 3, 5, 7} {computer system fundamentals, mathematics for computing, …} {a,b,c,d,e,f,g,h,I,j,k,l,m,o,p,q,r,s,t,u,v,w,x,y,z} {Finland, Norway, Sweden, Denmark}

Some well known and named sets “N” is the natural numbers {0, 1, 2, 3, 4, 5, …} “Z” is the set of integers {…-2,-1,0,1,2,…} “Q” is the set of rational numbers (any number that can be written as a fraction “R” is the set of real numbers (all the numbers/fractions/decimals that you can imagine

Notation You don’t list anything more than once The order of objects doesn’t matter 5

Both of these would be considered identical sets since they have all the same elements and only the order is different. and {☼, 5, ♣} and {5,♣, ☼} 6

More notation:  and  ☼  {☼, 5, ♣} means: “☼ is an element of {☼, 5, ♣}” 6  {☼, 5, ♣} means: “6 is not an element of {☼, 5, ♣}” {☼, 5}  {☼, 5, ♣} means: “{☼,5} is a subset of {☼, 5, ♣}”

Formal Definitions Definition [proper subset]: A set A is a proper subset of a set B (abbreviated as A  B) if the following conditions hold Every element of A is an element of B B has at least one element x which is not an element of A (abbreviated as A  B) Examples: {1,2,3}  {1,2,3,4} as both conditions above hold {☼, 5}  {☼, 5, ♣} means: “{☼,5} is a subset of {☼, 5, ♣}”

Formal Definitions Definition [equal sets]: A set A is equivalent to a set B (abbreviated as A  B) if the following conditions hold 1) Every element of A is an element of B 2) Every element of B is an element of A Examples: {1,2,3}  {1,2,3} as both conditions above hold {♣ ,☼, 5}  {☼, 5, ♣}

Formal Definitions Definition [weak subset]: A is a weak subset of B (abbreviated A  B) if A  B or A  B This is analogous to the relations “less” and “less or equal” Examples: {1,2}  {1,2,3} as one of the conditions above holds, i.e. {1,2}  {1,2,3} {♣ ,☼, 5}  {☼, 5, ♣} as one of the conditions above holds, i.e. {♣ ,☼, 5}  {☼, 5, ♣}

EMPTY AND UNIVERSAL SETS When we speak about sets we can collect objects of any nature. However, to be sensible we do want to collect objects that have something in common: could be some common properties or some relations. This “something in common” allows us to make useful abstractions. Examples: a set of people (people are animals but have some common features, i.e. social for example)

EMPTY AND UNIVERSAL SETS Thus, we introduce a so called universal set, abbreviated as U. Universal set collects any object of any set which we are considering. It gives us a reference to the nature of objects under considerations. It “sets up” the scenario, if you want. FACT: for every set A, for every element x  A the following holds: x  U

EXAMPLE PROOF Prove the following proposition: Proposition: for every set A, the following holds: A  U Proof: Given a universal set U, use the following FACT: “for every set A, for every element x  A the following holds: x  U” Therefore, for every set A, if x  A then x  U EndProof

EMPTY AND UNIVERSAL SETS Consider a set of round squares. It looks like there are no objects in this set? Such a set is called the empty set abbreviated as or  FACT: for every set A the following holds: {}  A

EXAMPLE PROOF Prove the following proposition: Proposition: for every set A, the following holds: {}  A Proof: We will prove this by refutation: assume the contrary, i.e. that Given an arbitrary set we have {}  A i.e that {} is not a subset of A. Therefore, there exists (at least one) element x of {}, such that f x  A. This clearly contradicts the statement that {} has no elements. So our assumption that {}  A was wrong. We conclude then that EndProof

Proof by Contradiction (reductio ad absurdum) We need to prove some statement A from some conditions Cond Instead of proving it directly we can assume the contrary, not-A Now we are trying to reason and derive a contradiction from this assumption. If we have derived a contradiction from not-A it means that our assumption was wrong So we conclude not-not-A, or simply A

Set Operations Union A B Create a new set by combining all of the elements of two sets A B U

Union Examples

Intersection Create a new set, C, using the elements the two sets have in common A B C U

Intersection Examples

Difference Create a new set, C, by taking all of the elements of the first set (A) and removing from it all of the elements in the second set (B) B A C U A

Difference Examples

U A’ A Complementation Given the universal set U, and a set A, a complementation of A denoted as A’ is the set of all those objects of the universal set that are not elements of A. U A’ A 23

LAWS of SET ALGEBRA Commutative Laws Distributivity Laws Other Laws

Power Set or Definition: A Power set is a set that consists of all of the subsets of the set A

Power Set Examples

Cartesian Product Creates a new set from sets A, B and C, which consists of ordered tuples of elements (one from each set) in all possible combinations.

What is a coordinate pair Tuples are written in the form <x, y> or <x,y,z> depending on the number of sets in the Cartesian product Definition: A Cartesian Product of sets A1 x A2 x …. X An {x,y,…,z|xA1, yA2, … zAn}

Cartesian Product Examples