Dove hole principle or drawer principle

Source: Internet
Author: User
Tags in domain

Principle Overview:

There are n pigeons and M pigeon caves, all pigeons live in the pigeon Cave, and if n>m, then at least two pigeons must live in the same pigeon cave.

Function View:

Think of the pigeon as a definition of the element ai in domain A, the pigeon cave as the element in the range B BJ, pigeon Live pigeon Cave as a function relationship.

Pigeon Cave principle:

Set F is a function from finite set A to finite set B, if |a|>|b|, then there must be a1,a2∈a,a1≠a2, so that f (A1) =f (A2) =B∈BF is included in B (Bf is the elephant domain).

Contrary: if to any a1,a2∈a,a1≠a2,f (A1) ≠f (A2), |a|=|bf|≤|b| and |a|>|b| contradiction

Note:

The principle of pigeon cave is to judge the adequacy of a non-one function.

This principle looks easy to understand and has a wide range of applications.

Example 1: In any permutation of n2+1 different integers, it is proved that there must be an ascending or descending subsequence with a length of n+1.

Proof :

Set this sequence as: A1,a2,...,ak, ..., starting from AK the length of the subsequence is XK, the descending subsequence length is YK, and each AK (K=1,2,...,N2+1) corresponds to (Xk,yk).

If there is no ascending or descending subsequence with a length of n+1, then xk≤n,yk≤n, the shape (Xk,yk) of the different points to a maximum of N2, and AK has n2+1, there must be Ai,aj (1≤i

Because Ai≠aj, if ai aj, then Yi is at least 1 larger than YJ, with (xi,yj) = (Xj,yj) contradiction.

Example 2: 132 balls placed in 77 boxes, each box at least one ball, verify: there must be 21 balls in a few adjacent boxes.

Proof :

Set the K box to put the ball for BK, get b1,b2,...,b77, press test instructions, looking for I and j,i>j≥0, make bj+1+bj+2+ ... +bi=21, which is the completion certificate.

Set ak=, Get A1,a2,...,a77, obviously, {AK} is strictly monotonically Rising, Ai≠aj (i≠

Set ck=, Get C1,c2,...,c77,{ck} is also strictly monotonous rise, CI≠CJ (I≠j), and c77=153,ci=ai+21.

{AK} and {CK} together a total of 154, but only in the 1~153 value, by the pigeon cave principle, there will be two the same, and not with the AK, also will not be CK in, may wish ai=cj=aj+21,ai-aj=21, that, get bj+1 +bj+2+ ... +bi=21.

Example 3:

The X1,X2,...,XN is any integer of arbitrary arrangement, proving that there are several successive numbers, and their sum is a multiple of n.

proof : Set ai=

If there is a multiple of n in the AI, the proposition is established

If there is not a multiple of n in the AI, the remainder of the AI is only taken in 1~n-1 by n

With AI (i=1,2,...,n) as pigeons, 1~n-1 as pigeon holes, Ai,aj, so Ai≡aj (MODN) (i>j), then n| (Ai-aj), xj+1+xj+2+ ... +xi is a multiple of n.

Excerpt from Baidu Library: dove Hole principle

Dove hole principle or drawer principle

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.