{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

2-3-4- Graphs and Trees (part 1)

# 2-3-4- Graphs and Trees (part 1) - c ElementarySetTheory...

This preview shows pages 1–12. Sign up to view the full content.

c © Jalal Kawash 2009 Peeking into Computer Science Click to edit Master subtitle style  10/11/10 © Jalal Kawash 2009 Elementary Set Theory Peeking into Computer Science

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
c © Jalal Kawash 2009 Peeking into Computer Science  10/11/10 Reading Assignment Mandatory: Chapter 2 – Sections 2.4 and 2.5 22
c © Jalal Kawash 2009 Peeking into Computer Science  10/11/10 Sets set  is a collection of objects; we call these objects the  elements  of the set. Examples: Students in this class form (ie, are elements of) a set 33

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
c © Jalal Kawash 2009 Peeking into Computer Science  10/11/10 Representing Small Sets Small sets can be represented by listing its  members A = {paper, scissors, rock} All possible choices in the game B = {pawn, rook, knight, bishop, queen, king} All chess pieces 44
c © Jalal Kawash 2009 Peeking into Computer Science  10/11/10 Representing Big Sets May not be possible to list all members Some sets are infinite A = {x | x is a current student at UofC} All current students at UofC 55

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
c © Jalal Kawash 2009 Peeking into Computer Science  10/11/10 Properties of Sets Duplicates are not allowed (or do not count)  {paper, scissors, rock} is the same as {paper, scissors,  rock, rock}  We should not repeat elements Order of members is irrelevant {paper, scissors, rock} 66
c © Jalal Kawash 2009 Peeking into Computer Science  10/11/10 Multi-sets Duplication is allowed {Sara, Sam, Frank, Julie, Sam, Frank} 77

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
c © Jalal Kawash 2009 Peeking into Computer Science  10/11/10 Ordered Tuples We use curly brackets (braces) to represent sets {rock, paper} = {paper, rock} If order is important we use ordered tuples (rock, paper) ≠ (paper, rock) Maybe meaning ( choice of player 1 choice of player 2 ) General form of a tuple: (v1, v2, v3, … vn) 88
c © Jalal Kawash 2009 Peeking into Computer Science  10/11/10 Set Inclusion  B means that all members of A are also  members of B Read A is a subset (or equal to) of B Examples: {1,2}   {1,2,7} 99

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
c © Jalal Kawash 2009 Peeking into Computer Science  10/11/10 Set Membership We write x  S to say that x is an element of the  set S Examples: 2  {1, 2, 3} \$  {\$, ¢, £, ¥, €,  } a   {a} 10

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 46

2-3-4- Graphs and Trees (part 1) - c ElementarySetTheory...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online