17
04/11/13 Collections of Sets Discrete Structures (CS 173) Derek Hoiem, University 1

04/11/13

  • Upload
    onan

  • View
    31

  • Download
    0

Embed Size (px)

DESCRIPTION

Collections of Sets. 04/11/13. Discrete Structures (CS 173) Derek Hoiem, University of Illinois. Today’s class. Collections of sets: basics Review of midterm. Midterm grade distribution. min23 median81 mean78 max100 p ctl grade 1056 2068 3073 4078 5081 6085 7088 - PowerPoint PPT Presentation

Citation preview

Page 1: 04/11/13

04/11/13

Collections of Sets

Discrete Structures (CS 173)Derek Hoiem, University of Illinois 1

Page 2: 04/11/13

Today’s class

• Collections of sets: basics

• Review of midterm

2

Page 3: 04/11/13

Midterm grade distributionmin 23median 81mean 78max 100

pctl grade 10 5620 6830 7340 7850 8160 8570 8880 9190 94

3

Page 4: 04/11/13

Example: Image segmentation

• An image is divided into regions based on color or other appearance features

• Each region is a set of pixels• The segmentation is a collection of regions, or a collection of

sets of pixels

4

Page 5: 04/11/13

Sets of sets

5

Page 6: 04/11/13

The powerset of set is the set of all possible subsets of

Example: the powerset of is

6

Example: the powerset of the set of pixels is the set of all possible image regions (including discontinuous regions)

If we have pixels, how many possible regions are there?

Page 7: 04/11/13

Functions on setsPowersets most often used for defining the domain or co-domain of a function that operates on sets

Example 1: function to compute the mean intensity of pixels in a region

7

is a set of pixel indices is an element of (an image index) is the pixel intensity

Page 8: 04/11/13

Functions on setsPowersets most often used for defining the domain or co-domain of a function that operates on sets

Example 2: function to return indices of red pixels

8

is an element of (an image index) is the intensity in red channel

Page 9: 04/11/13

Partitions

There are 10 kinds of people: those who understand binary and those who don’t.

A partition of is a collection of non-empty subsets of , such that each element of is contained by exactly one subset

9

Page 10: 04/11/13

Partitions with Finite SetsA collection of sets is a partition of (1) : (2) No overlap within elements of : if (3) No element of is empty

10

The segmentation is a partition of the image pixels: the regions do not overlap, are non-empty, and their union includes all pixels

Page 11: 04/11/13

Partitions with Infinite SetsA collection of sets is a partition of if

11

Example 1: The set of natural numbers can be partitioned into those between 0 and 9, 10 and 99, 100 and 999, and -1, etc. (elements of each set have the same number of digits)

Example 2: Any elements of the set of real numbers that round to the same integer are in a set. The collection of these sets is a partition on the set of real numbers.

Page 12: 04/11/13

Partitions of continuous spacesQuantization: map to a partition of

– Clustering– Decision trees

12

Represent any points that fall into each cell with an integer

Treat all points within a cell as the same

Represent points in cell with summary statistics, such as mean

Simplifies matching and function fitting

Page 13: 04/11/13

Partition of continuous space (R2)

13Source: http://en.wikipedia.org/wiki/List_of_U.S._states_by_population_density

Population density by state

Population distribution over area approximated by population within each state or county

Population density by county

Page 14: 04/11/13

Things that are not partitions

is not a partition of

is not a partition of

, is not a partition of the natural numbers

, is not a partition of the natural numbers

14

Page 15: 04/11/13

Some nit-picky things to remember

• Important to distinguish between a one-element set and an element: – Common programming error (e.g., function is expecting a

set but gets a number)

• Every powerset contains the empty set as an element

• An element of a collection (or set of sets) is a set

15

Page 16: 04/11/13

Review of midterm

16

Page 17: 04/11/13

Next week• Combinations and counting

– Dice rolls and poker hands• Finite state machines

17