Discrete Math Notes:
Chapter 8: Applications of Discrete Mathematics
8.9 The pigeonhole principle
box with more than one pigeon.
Theorem 8.9.1: The pigeonhole principle, if a function f has a domain of size at least n+1 and a target of size at most n, where n is a positive integer, then there are two elements in the domain that map to the same element in the target (i.e., the function is not one-to-one).
Overview:
Example of How Sums of Subsets work
Example 8.9.1: Sums of subsets
Below is a list of 25 six-digit numbers. The pigeonhole principle can be used to show that there are two distinct subsets o' the numbers listed below that add up to the same value
365909 595286 807399 193386 231782
937803 569510 204523 658348 717329
966435 550559 309826 439520 127235
883401 602547 910940 785793 294456
975558 705332 605665 255004 262073
- Function: The function maps each subset to the sum of its elements. For example the subset consisting of the first two numbers in the first column {365909, 595286} would be mapped to 961195 because 365909 + 595286 = 961195. Target: The target set is the set of all possible values for the sum of a subset of the numbers.The value of each number is at most 999999.Since there are 25 numbers, the sum of any subset of the numbers is at most 25 x 999999 = 24999975. Therefore the possible values for the sum of a subset falls in the range from 0 to 24999975 Therefore,the size of the target is at most 24999976 Domain: The domain of the function is the set of all possible subsets of the numbers. Since there are 25 numbers there are 225 possible subsets. The size of the domain is 225
Since the size of the domain is larger than the size of the target, 225 = 33554432 > 249999762 size of thetarget set there are two distinct subsets that sum to the same number
Note that while the pigeonhole principle establishes that there exists two subsets that sum to the same value,it does not say anything about how to actually find the two subsets.Finding two such eguivalent subsets is believed to be computationally difficult. Hard problems like the equivalent subset problem described here are sometimes used as the
computationally difficult probl