Maths Olympiad Prep

Library / /12 of 155

Combinatorics Difficulty 4.8 AIME Prove it Saudi Arabia

A set SS is called neighboring if it has the following two properties:
i) SS has exactly 4 elements,
ii) for every element xSx \in S at least one of the x1x-1 or x+1x+1 belongs to SS.
Find the number of all neighboring subsets of the set {1,2,,n}\{1,2, \ldots, n\}.

Solution

Let xx be the smallest index and yy be the largest index of the neighboring set. Then our set consists of elements
ax,ax+1,ay1,ay a_{x}, a_{x+1}, a_{y-1}, a_{y}
So the number of neighboring sets is equal to the number of pairs (x,y)(x, y) where yx3y-x \geq 3. The number of such sets is equal to
1+2++(n3)=(n3)(n2)2 1+2+\cdots+(n-3)=\frac{(n-3)(n-2)}{2}

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic and difficulty added by this site.