More Set Definitions and Proofs - PowerPoint PPT Presentation

About This Presentation
Title:

More Set Definitions and Proofs

Description:

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, a2 as its ... – PowerPoint PPT presentation

Number of Views:72
Avg rating:3.0/5.0
Slides: 14
Provided by: hodges
Category:

less

Transcript and Presenter's Notes

Title: More Set Definitions and Proofs


1
More Set Definitions and Proofs
  • 1.6, 1.7

2
Ordered n-tuple
  • The ordered n-tuple (a1,a2,an) is the ordered
    collection that has a1 as its first element, a2
    as its second element . . . And an as its nth
    element.
  • 2-tuples are called ordered pairs.

3
Cartesian Product of A and B
  • Let A and B be sets. The Cartesian product of A
    and B, denoted A x B is the set of all ordered
    pairs (a,b) where a ?A and b ? B. Hence
  • A x B (a,b) a ?A ? b ? B
  • The Cartesian product of the sets A1,A2, .. , An
    denoted by A1 x A2 x x An is the set of ordered
    n-tuples (a1,a2,..,an) where ai belongs to Ai for
    I 1,2,... ,n.
  • A1 x A2 xx An (a1,a2,..,an) ai ?Ai for
    I1,2,n

4
Generalized Unions and Intersections
A1 ?A2 ? ... ? An
A1 ?A2 ? ... ? An
5
Let Ai 1,2,3ifor i 1,2,3,(that is, A11
A21,2 A31,2,3 etc)
1,2,3, . . ., n
Find
1
Find
6
Let Ai i,i1,i2
Z
Find
n, n1, n2,
Find
7
Symmetric Difference Problem
  • Prove(A?B) ? B A
  • A?B ? elements in A or B but not in both.

8
Prove (A?B) ? B A
  • A B A?B (A?B) ? B
  • 1 1 0 1
  • 1 0 1 1
  • 0 1 1 0
  • 0 0 0 0

9
Prove (A?B) ? B A
  • Proof We must show that (A?B) ? B ? A and that A
    ? (A?B) ? B.
  • First we will show that (A?B) ? B ? A . Let e?
    (A?B) ? B. Then e ? (A?B) or e ? B but not both.
    If e ? (A?B), then either e?A or e?B. If e?A
    and e?B then we are done. If e?B, and e?A, then
    e? (A?B) but can not be an element of (A?B) ? B
    by definition so this case can not exist.

10
Proof of (A?B) ? B A, cont.
  • Now we will show that A ? (A?B) ? B . Let e?A.
    Either e is also ?B or e?B. If e ?B, then e
    ?(A?B) so e is an element of (A?B) ? B. If e?B,
    e is an element of (A?B) and e must be an element
    of (A?B) ? B .
  • Thus (A?B) ? B A.

11
Computer Representation of Sets
How to store the elements of sets and make
computing the union, intersection, difference,
etc., easier? Assume U is finite and of
reasonable size. It has cardinality n. First,
specify an arbitrary ordering of the elements of
U. Represent a subset A of U with a bit string of
length n, where the ith bit is 1 if ui belongs
to A and 0 if ui does not belong to A.
12
Using the Computer Representation
  • Let U 1,2,3,4,5,6,7,8,9,10. Assume an
    ordering of the elements as written
  • What bit string represents the subset of all odd
    integers?
  • What bit string represents the set of all
    integers that do not exceed 5?
  • Whats the complement of this set?

1010101010
1111100000
0000011111
  • General rule for complements?

13
Using the Computer Representation
  • The bits strings of 1,2,3,4,5 and 1,3,5,7,9
    are 111110000 and 1010101010, respectively
  • What is the union of these sets?1111100000 ?
    1010101010
  • What is the intersection of these
    sets?1111100000 ? 1010101010
  • Whats the general rules?

1111101010
1010100000
bitwise OR for union bitwise AND for intersection
Write a Comment
User Comments (0)
About PowerShow.com