返回题库

AIME 2018 II · 第 15 题

AIME 2018 II — Problem 15

专题
Contest Math
难度
L4
来源
AIME

题目详情

Problem

Find the number of functions ff from {0,1,2,3,4,5,6}\{0, 1, 2, 3, 4, 5, 6\} to the integers such that f(0)=0f(0) = 0, f(6)=12f(6) = 12, and

xyf(x)f(y)3xy|x - y| \leq |f(x) - f(y)| \leq 3|x - y| for all xx and yy in {0,1,2,3,4,5,6}\{0, 1, 2, 3, 4, 5, 6\}.

Official Solution (MAA)

Because f(n)f(n) and f(n+1)f(n+1) can differ by at most 3 for n=0,1,2,3,4,5n=0,1,2,3,4,5, ff can decrease at most once. This is because if ff decreases 22 times (or more) then we get a contradiction: 12=f(6)34+(1)2=1012 = f(6) \le 3\cdot 4 + (-1)\cdot 2 = 10.

If ff never decreases, then f(n+1)f(n){1,2,3}f(n+1)-f(n)\in \{1,2,3\} for all nn. Let a,ba, b, and cc denote the number of times this difference is 1,21, 2, and 33, respectively. Then a+b+c=6a+b+c=6 and a+2b+3c=12a+2b+3c = 12. Subtracting the first equation from the second yields b+2c=6b+2c=6, so (b,c)=(6,0),(4,1),(2,2)(b,c)=(6,0), (4,1), (2,2), or (0,3)(0,3). These yield a=0,1,2a=0,1,2, or 33, respectively, so the number of possibilities in this case is

(60,6,0)+(61,4,1)+(62,2,2)+(63,0,3)=141.\binom{6}{0,6,0}+\binom{6}{1,4,1}+\binom{6}{2,2,2}+\binom{6}{3,0,3}=141. If ff decreases from f(0)f(0) to f(1)f(1) or from f(5)f(5) to f(6)f(6), then f(2)f(2) or f(4)f(4), respectively, is determined. The only solutions to a+b+c=4a+b+c=4 and a+2b+3c=10a+2b+3c=10 are (a,b,c)=(1,0,3)(a,b,c)=(1,0,3) and (a,b,c)=(0,2,2)(a,b,c)=(0,2,2), so the number of functions is

2[(41,0,3)+(40,2,2)]=20.2\left[\binom{4}{1,0,3}+\binom{4}{0,2,2}\right]=20. Finally, suppose that f(n+1)forsomef(n+1) for somen=1,2,3,4.Notethatthecondition. Note that the condition|(n+1)-(n-1)|\le |f(n+1)-f(n-1)|impliesthatimplies thatf(n+1)-f(n-1)\ge 2,soitmustbethat, so it must be thatf(n)-f(n+1)=1$ and

f(n+2)f(n+1)=f(n)f(n1)=3.f(n+2)-f(n+1)=f(n)-f(n-1)=3. This means that f(n1)f(n-1) and f(n+2)f(n+2) are uniquely determined by the value of f(n)f(n), and, in particular, that f(n+2)f(n1)=5f(n+2)-f(n-1)=5. As a result, there are three more values of ff to determine, and they must provide a total increase of 77. The only ways to do this are either to have two differences of 33 and one difference of 11, which can be arranged in 33 ways, or to have one difference of 33 and two differences of 22, which can be arranged in 33 ways. Thus for each of the 44 possibilities for nn, there are 66 ways to arrange the increases, giving a total of 2424 ways.

The total number of functions is 141+20+24=185141+20+24=\boxed{185}.

解析

Solution 1

First, suppose x=y+1x = y + 1. Then, the inequality becomes 1f(y+1)f(y)31 \leq |f(y + 1) - f(y)| \leq 3. In other words, the (positive) difference between consecutive function values is 11, 22, or 33. Let dk:=f(k)f(k1)d_k := f(k) - f(k - 1). Note that

f(x)f(y)=k=y+1xdk.f(x) - f(y) = \sum_{k=y+1}^{x} d_k.

Thus, k=16dk=f(6)f(0)=12\sum_{k=1}^{6} d_k = f(6) - f(0) = 12. Note that at most one value of dkd_k in {d1,d2,d3,d4,d5,d6}\left\{d_1, d_2, d_3, d_4, d_5, d_6\right\} can be negative. This is because the maximum value of d1+d2+d3+d4+d5+d6d_1 + d_2 + d_3 + d_4 + d_5 + d_6 would be 3+3+3+311=103 + 3 + 3 + 3 - 1 - 1 = 10 if more than one value of dkd_k is negative. Plugging x=y+2x = y + 2 into the original inequality yields 2f(y+2)f(y)62 \leq |f(y + 2) - f(y)| \leq 6, which becomes 2dy+2+dy+162 \leq \left|d_{y+2} + d_{y+1}\right| \leq 6. The only way for dy+2+dy+1d_{y+2} + d_{y+1} to be negative while satisfying this inequality is for (dy+2,dy+1)\left(d_{y+2}, d_{y+1}\right) to equal (1,3)(1, -3) or (3,1)(-3, 1). However, this forces d1+d2+d3+d4+d5+d63+3+3+3+13=10<12d_1 + d_2 + d_3 + d_4 + d_5 + d_6 \leq 3 + 3 + 3 + 3 + 1 - 3 = 10 < 12, which is disallowed. Hence, we conclude that the following stronger inequality,

2dy+2+dy+16,2 \leq d_{y + 2} + d_{y + 1} \leq 6,

is always true. We now have two cases of functions to count. For future reference let DD be the (ordered) sequence {d1,d2,d3,d4,d5,d6}\left\{d_1, d_2, d_3, d_4, d_5, d_6\right\}.

Case 1: There is exactly one instance of dk=1d_k = -1.

By the "stronger" inequality above, dk1=3d_{k-1} = 3 if k>1k > 1, and dk+1=3d_{k+1} = 3 if k<6k < 6. If 2k52 \leq k \leq 5, then DD contains the subsequence {3,1,3}\left\{3, -1, 3\right\}, and the other three dd-values sum to 77, so they are either 33, 33, and 11 in some order, or they are 22, 22, and 33 in some order. Thus, each k{2,3,4,5}k \in \{2, 3, 4, 5\} for which dk=1d_k = -1 produces 66 sequences DD. If k=1k = 1 or k=6k = 6, then DD begins with {1,3}\{-1, 3\} or ends with {3,1}\{3, -1\}, respectively. Either way, the remaining four dd-values sum to 1010, so they can be any permutation of {3,3,2,2}\{3, 3, 2, 2\} (six permutations) or {3,3,3,1}\{3, 3, 3, 1\} (four permutations). Each of these vaues of kk yields 6+4=106 + 4 = 10 sequences, so our total count for Case 1 is 46+210=444 \cdot 6 + 2 \cdot 10 = 44.

Case 2: All values of dd are positive.

Then, DD is a permutation of {3,3,3,1,1,1}\{3, 3, 3, 1, 1, 1\}, {3,3,2,2,1,1}\{3, 3, 2, 2, 1, 1\}, {3,2,2,2,2,1}\{3, 2, 2, 2, 2, 1\}, or {2,2,2,2,2,2}\{2, 2, 2, 2, 2, 2\}. The number of ways to permute three 33s and three 11s is 6!3!3!=20\frac{6!}{3! \cdot 3!} = 20. The number of ways to permute two 33s, two 22s, and two 11s is 6!2!2!2!=90\frac{6!}{2! \cdot 2! \cdot 2!} = 90. The number of ways to permute one 33, four 22s, and one 11 is 6!1!4!1!=30\frac{6!}{1! \cdot 4! \cdot 1!} = 30. Finally, there is obviously only 11 way to permute six 22s. Our total count for Case 2 is 20+90+30+1=14120 + 90 + 30 + 1 = 141.

To complete the justification that all of these 44+141=18544 + 141 = \boxed{185} cases satisfy the original inequality, we leverage the fact that {f(x)}x=06\{f(x)\}_{x=0}^{6} is either monotonically increasing (Case 2) or the union of two monotonically increasing subsequences (Case 1). Consider any monotonically increasing subsequence that starts at x=ax = a and ends at x=bx = b. For a<kba < k \leq b, dkd_k will be positive, allowing us to remove the absolute value bars from the original inequality:

xyf(x)f(y)3(xy).x - y \leq f(x) - f(y) \leq 3(x - y).

Now, the inequality is transitive; supposing ax3<x2<x1ba \leq x_3 < x_2 < x_1 \leq b, if the inequality is satisfied at (x,y)=(x1,x2)(x, y) = \left(x_1, x_2\right) and at (x,y)=(x2,x3)(x, y) = \left(x_2, x_3\right), then it is also satisfied at (x,y)=(x1,x3)(x, y) = \left(x_1, x_3\right). If we ever have a decreasing part where f(x+1)<f(x)f(x + 1) < f(x), then we can use some variant of the inequality 2f(x+1)f(x1)62 \leq f(x + 1) - f(x - 1) \leq 6, which we derived earlier. This is a specific case of xyf(x)f(y)3(xy)x - y \leq f(x) - f(y) \leq 3(x - y), so we can finish off the argument by invoking transitivity.

-kgator

Solution 2

Based on the conditions for dkd_k obtained in Solution 1, followed by some well-known stars & bars techniques to reduce the case work. To recap, the conditions for dk=f(k)f(k1)d_k = f(k) - f(k-1) are:

k=16dk=12\sum_{k=1}^6 d_k = 12 dk=1,or1dk3d_k = -1, \hspace{0.1cm} \text{or} \hspace{0.2cm} 1 \leq d_k \leq 3 dk+dk+12d_k + d_{k+1} \geq 2 Case 1: dk=1d_k = -1 for some kk. Since di+di+12d_i + d_{i+1} \geq 2, dk+1d_{k+1} and dk1d_{k-1} must both be 3.

Case 1a: d1=1d_1 = -1 or d6=1d_6 = -1. In this case, we have d2=3d_2=3 or d5=3d_5=3, respectively. So the remaining four did_i values add up to 10 with each value ranging between 1 and 3. This stars and bars problem is equivalent to a+b+c+d=2a+b+c+d =2 with a,b,c,da,b,c,d between 0 and 2, so the number of possibilities is (53){5 \choose 3} each.

Case 1b: dk=1d_k = -1 for k=2,3,4,5k=2,3,4,5. In this case, dk+1=dk1=3d_{k+1}=d_{k-1} =3. So the remaining 3 did_i values add up to 7 with each value ranging between 1 and 3. This stars and bars problem is equivalent to a+b+c=2a+b+c =2 with a,b,c,da,b,c,d between 0 and 2, so the number of possibilities is (42){4 \choose 2} each.

So the total for Case 1 is 2(53)+4(42)=442{5 \choose 3} + 4 {4 \choose 2} = 44.

Case 2: 1dk31 \leq d_k \leq 3 for all kk. k=16dk=12\sum_{k=1}^{6} d_k = 12. Let gk=3dkg_k = 3-d_k we get k=16gk=6\sum_{k=1}^{6} g_k = 6 for 0gk20 \leq g_k \leq 2. This is a stars and bars problem with maximum capacity and the solution is given by applying PIE:

(115)6(85)+(62)=141{11 \choose 5} - 6{8 \choose 5} + {6 \choose 2} = 141 . Now the final answer is 44+141=18544 + 141 = 185.

-mathdummy