Download presentation

1
**Analytical Methods in CS (CIS 505)**

Sanchita Mal-Sarkar

2
**Sets A set is a collection of objects (duplicates are not allowed).**

Objects in the set are called elements or members of the set. Examples: Set of students in Discrete Mathematics. Collection of all positive integers less than 4 A = {1, 2, 3} 1 2 3 A

3
Sets More Examples: Collection of all negative integers greater than -6 B = {-5, -4, -3, -2, -1} -2 -1 -3 - 4 A -5

4
**Another way to represent sets (Set builder notation)**

Sometimes it is impossible/inconvenient to describe a set by listing all its elements. In general, a set can be defined as: {x | P(x)} where P(x) represents a property that the elements of the set have in common. P(x) is a propositional function. Examples: Collection of all positive integers A = {x| x is a positive integer} B = {x | x is odd OR x is less than 10 }

5
**Sets Two sets are equal if they have the same elements. Example:**

If A = {1, 2, 3, 4} B = {x| x is a positive integer and x2 < 20} then A = B

6
**Repeated elements can be ignored**

Example: The set consists of the letter in the word “Book”. It can be denoted in three ways: {b, o, o, k} {b, o, k} {x| x is a letter in the word “book’}

7
**Order is not important Example: Set of all integers less than 4**

It can be represented as: A = {1, 2, 3} A = {2, 3, 1} A = {3, 2, 1}

8
**x is an element of the set A**

x Є A => x is an element of A Example: A = {1, 2, 3} 1 Є A 2 Є A 3 Є A 4 Є A { } Є A Ø Є A A Є A

9
**Universal set Set of all possible elements under consideration.**

Denoted by U (or sometimes W). In Venn diagram, the universal set U will be denoted by a rectangle and the sets within U will be denoted by circles. U A

10
**Empty/Null Set A set that does not have any element in it.**

Denoted by { } or by the symbol Ø. Examples: {x| x is a real number and x2 = -1} = Ø {x| x is a real number and x2 = -9} = Ø {x| x is a real number and x = x +1} = Ø

11
**Subsets A is a subset of B if every element of A is an element of B**

{1, 2, 3} is a subset of {1, 2, 3, 4, 5} (in fact a proper subset) A is a proper subset of B if it is a subset of B but not equal to B. Sets can have other sets as members – { f, {a}, {b}, {a, b}}

12
**Cardinality of a set for some finite integer n where n Є N.**

A set A is called finite if it has n distinct elements for some finite integer n where n Є N. Example of finite set: {1, 2, 3, 4} A set that is not finite is called infinite. Example of infinite set: {x| x is a positive integer} Cardinality of A: Number of distinct elements (n) of a set. Cardinality of A is denoted by |A|.

13
**Power set Power set => Set of all subsets of a set.**

If A is a set, then the set of all subsets of A is called the power set of A. Denoted by P(A) Note that the empty set is always considered to be a subset of every set. Examples: A = {1,2,3} P(A) consists of the following subsets of A: { }, {1},{2}, {3}, {1,2}, {1,3}, {2,3}, and {1,2,3} What is the power set of {a, b, c}?

14
Venn Diagram Venn diagrams are often used to indicate relationships between sets. If A is a subset of B, we can write A כֿ B B A

15
Venn Diagram If A is not a subset of B, we can write A כֿ B A B

16
**Venn Diagram Every set is a subset of itself. A A כֿ A Ø כֿ**

For any set A, Ø A כֿ Since there are no elements of Ø that are not in A

17
Venn Diagram A = B , if and only if A B כֿ and B A כֿ

18
**Venn Diagram {A} כֿ B {{A}} כֿ B However, B A כֿ**

Let A be a set and let B ={A,{A}}. Then, A Є B and {A} Є B. Then {A} כֿ B and {{A}} כֿ B However, B A כֿ

19
Venn Diagram Draw a Venn diagram that represents the following relationships. x Є A, x Є B, x Є C, y Є B, y Є C, and y Є A A x B One solution y C

20
**Venn Diagram A {2, 3} כֿ {1, 4} A כֿ {1, 2, 3} כֿ A**

A = {1, {2, 3}, 4}. Identify whether true or false. 3 Є A {2, 3} Є A. {4} Є A A {2, 3} כֿ {1, 4} A כֿ {1, 2, 3} כֿ A

Similar presentations

© 2019 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google