CONTEMPORARY ARTS VISUAL, Assignments of Visual Arts

All about my module because my assignments is depends on this

Typology: Assignments

2019/2020

Uploaded on 10/19/2020

geng-maniquiz
geng-maniquiz 🇵🇭

1 document

1 / 14

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
M. Hauskrecht
CS 441 Discrete mathematics for CS
CS 441 Discrete Mathematics for CS
Lecture 7
Milos Hauskrecht
milos@cs.pitt.edu
5329 Sennott Square
Sets and set operations
M. Hauskrecht
CS 441 Discrete mathematics for CS
Basic discrete structures
Discrete math =
study of the discrete structures used to represent discrete
objects
Many discrete structures are built using sets
Sets = collection of objects
Examples of discrete structures built with the help of sets:
Combinations
Relations
Graphs
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download CONTEMPORARY ARTS VISUAL and more Assignments Visual Arts in PDF only on Docsity!

CS 441 Discrete mathematics for CS^ M. Hauskrecht

CS 441 Discrete Mathematics for CS

Lecture 7

Milos Hauskrecht [email protected] 5329 Sennott Square

Sets and set operations

CS 441 Discrete mathematics for CS^ M. Hauskrecht

Basic discrete structures

  • Discrete math =
    • study of the discrete structures used to represent discrete objects
  • Many discrete structures are built using sets
    • Sets = collection of objects

Examples of discrete structures built with the help of sets:

  • Combinations
  • Relations
  • Graphs

CS 441 Discrete mathematics for CS^ M. Hauskrecht

Set

  • Definition : A set is a (unordered) collection of objects. These objects are sometimes called elements or members of the set. (Cantor's naive definition)
  • Examples:
    • Vowels in the English alphabet V = { a, e, i, o, u }
    • First seven prime numbers. X = { 2, 3, 5, 7, 11, 13, 17 }

CS 441 Discrete mathematics for CS^ M. Hauskrecht

Representing sets

**Representing a set by:

  1. Listing (enumerating) the members of the set.
  2. Definition by property, using the set builder notation** {x| x has property P}. Example:
  • Even integers between 50 and 63. 1) E = {50, 52, 54, 56, 58, 60, 62} 2) E = {x| 50 <= x < 63, x is an even integer}

If enumeration of the members is hard we often use ellipses. Example: a set of integers between 1 and 100

  • A= {1,2,3 …, 100}

CS 441 Discrete mathematics for CS^ M. Hauskrecht

Equality

Definition: Two sets are equal if and only if they have the same elements.

Example:

  • {1,2,3} = {3,1,2} = {1,2,1,3,2}

Note: Duplicates don't contribute anything new to a set, so remove them. The order of the elements in a set doesn't contribute anything new.

Example: Are {1,2,3,4} and {1,2,2,4} equal? No!

CS 441 Discrete mathematics for CS^ M. Hauskrecht

Special sets

  • Special sets:
    • The universal set is denoted by U: the set of all objects under the consideration.
    • The empty set is denoted as  or { }.

CS 441 Discrete mathematics for CS^ M. Hauskrecht

Venn diagrams

  • A set can be visualized using Venn Diagrams :
    • V={ A, B, C }

U A B C

CS 441 Discrete mathematics for CS^ M. Hauskrecht

A Subset

  • Definition : A set A is said to be a subset of B if and only if every element of A is also an element of B. We use AB to indicate A is a subset of B.
  • Alternate way to define A is a subset of B: x (x  A)  (x  B)

U

A

B

CS 441 Discrete mathematics for CS^ M. Hauskrecht

A proper subset

Definition : A set A is said to be a proper subset of B if and only if AB and AB. We denote that A is a proper subset of B with the notation A  B. U

A

B

CS 441 Discrete mathematics for CS^ M. Hauskrecht

A proper subset

Definition : A set A is said to be a proper subset of B if and only if AB and AB. We denote that A is a proper subset of B with the notation A  B.

Example: A={1,2,3} B ={1,2,3,4,5} Is: A  B? Yes.

U

A

B

CS 441 Discrete mathematics for CS^ M. Hauskrecht

Cardinality

Definition: Let S be a set. If there are exactly n distinct elements in S, where n is a nonnegative integer, we say S is a finite set and that n is the cardinality of S. The cardinality of S is denoted by | S |.

Examples:

  • V={1 2 3 4 5} | V | = 5

• A={1,2,3,4, …, 20}

|A| =

CS 441 Discrete mathematics for CS^ M. Hauskrecht

Infinite set

Definition : A set is infinite if it is not finite.

Examples:

  • The set of natural numbers is an infinite set.
  • N = {1, 2, 3, ... }
  • The set of reals is an infinite set.

CS 441 Discrete mathematics for CS^ M. Hauskrecht

Power set

• P( {1} ) = { , {1} }

• |P({1})| = 2

  • Assume {1,2}
  • P( {1,2} ) = { , {1}, {2}, {1,2} }
  • |P({1,2} )| =
  • Assume {1,2,3}
  • P({1,2,3}) = {, {1}, {2}, {3}, {1,2}, {1,3}, {2,3}, {1,2,3} }
  • |P({1,2,3} | = 8
  • If S is a set with |S| = n then | P(S) | = 2 n

CS 441 Discrete mathematics for CS^ M. Hauskrecht

N-tuple

  • Sets are used to represent unordered collections.
  • Ordered-n tuples are used to represent an ordered collection.

Definition : An ordered n-tuple (x1, x2, ..., xN) is the ordered collection that has x1 as its first element, x2 as its second element, ..., and xN as its N-th element, N  2.

Example:

  • Coordinates of a point in the 2-D plane (12, 16)

x

y

CS 441 Discrete mathematics for CS^ M. Hauskrecht

Cartesian product

Definition : Let S and T be sets. The Cartesian product of S and T , denoted by S x T, is the set of all ordered pairs (s,t), where s  S and t  T. Hence,

  • S x T = { (s,t) | s  S  t  T}.

Examples:

  • S = {1,2} and T = {a,b,c}
  • S x T = { (1,a), (1,b), (1,c), (2,a), (2,b), (2,c) }
  • T x S = { (a,1), (a, 2), (b,1), (b,2), (c,1), (c,2) }
  • Note: S x T  T x S !!!!

CS 441 Discrete mathematics for CS^ M. Hauskrecht

Cardinality of the Cartesian product

  • |S x T| = |S| * |T|.

Example:

  • A= {John, Peter, Mike}
  • B ={Jane, Ann, Laura}
  • A x B= {(John, Jane),(John, Ann) , (John, Laura), (Peter, Jane), (Peter, Ann) , (Peter, Laura) , (Mike, Jane) , (Mike, Ann) , (Mike, Laura)}
  • |A x B| = 9
  • |A|=3, |B|=3  |A| |B|= 9

Definition: A subset of the Cartesian product A x B is called a relation from the set A to the set B.

CS 441 Discrete mathematics for CS^ M. Hauskrecht

Disjoint sets

Definition : Two sets are called disjoint if their intersection is empty.

  • Alternate: A and B are disjoint if and only if A B = .

Example:

  • A={1,2,3,6} B={4,7,8} Are these disjoint?
  • Yes.
  • A B = 

U B A

CS 441 Discrete mathematics for CS^ M. Hauskrecht

Cardinality of the set union

Cardinality of the set union.

  • |A B| = |A| + |B| - |A B|
  • Why this formula?

^  U A

B

CS 441 Discrete mathematics for CS^ M. Hauskrecht

Cardinality of the set union

Cardinality of the set union.

  • |A B| = |A| + |B| - |A B|
  • Why this formula? Correct for an over-count.
  • More general rule:
    • The principle of inclusion and exclusion.

^  U A

B

CS 441 Discrete mathematics for CS^ M. Hauskrecht

Set difference

Definition : Let A and B be sets. The difference of A and B , denoted by A - B , is the set containing those elements that are in A but not in B. The difference of A and B is also called the complement of B with respect to A.

  • Alternate: A - B = { x | x  A  x  B }.

Example: A= {1,2,3,5,7} B = {1,5,6,8}

  • A - B ={2,3,7}

U A

B