6.042J Lecture Notes - Lecture 20: Pigeonhole Principle, Bijection, Disjoint Sets

99 views4 pages

Document Summary

Number of operations to update a data structure. This is the same as saying how many comparisons are needed to sort n items. This is the same as saying how many multiplications are needed to compute d. Sum rule: if sets a and b are disjoint, then the number of elements in their union is simply the sum of the number of elements in the two sets. Example: if a class has 43 women and 54 men, then the total enrollment is 97 students. Example: there are 26 lower case letters, 26 upper case letters, and 10 digits, so there are 62 characters. Product rule: if there are sets a and b such that |a| = m and |b| = n, then |a x b| = mn. Note: a x b denotes all possible ordered pairs such that the rst element is from a and the second element is from b.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents