# 2011 AMC 12B Problems/Problem 25

## Problem

For every $m$ and $k$ integers with $k$ odd, denote by $\left[\frac{m}{k}\right]$ the integer closest to $\frac{m}{k}$. For every odd integer $k$, let $P(k)$ be the probability that

$$\left[\frac{n}{k}\right] + \left[\frac{100 - n}{k}\right] = \left[\frac{100}{k}\right]$$

for an integer $n$ randomly chosen from the interval $1 \leq n \leq 99!$. What is the minimum possible value of $P(k)$ over the odd integers $k$ in the interval $1 \leq k \leq 99$?

$\textbf{(A)}\ \frac{1}{2} \qquad \textbf{(B)}\ \frac{50}{99} \qquad \textbf{(C)}\ \frac{44}{87} \qquad \textbf{(D)}\ \frac{34}{67} \qquad \textbf{(E)}\ \frac{7}{13}$

## Solution

### Solution 1

Answer: $(D) \frac{34}{67}$

First of all, you have to realize that

if $\left[\frac{n}{k}\right] + \left[\frac{100 - n}{k}\right] = \left[\frac{100}{k}\right]$

then $\left[\frac{n - k}{k}\right] + \left[\frac{100 - (n - k)}{k}\right] = \left[\frac{100}{k}\right]$

So, we can consider what happen in $1\le n \le k$ and it will repeat. Also since range of $n$ is $1$ to $99!$, it is always a multiple of $k$. So we can just consider $P(k)$ for $1\le n \le k$.

Let $\text{fpart}(x)$ be the fractional part function

This is an AMC exam, so use the given choices wisely. With the given choices, and the previous explanation, we only need to consider $k = 99$, $87$, $67$, $13$. $1\le n \le k$

For $k > \frac{200}{3}$, $\left[\frac{100}{k}\right] = 1$. 3 of the $k$ that should consider lands in here.

For $n < \frac{k}{2}$, $\left[\frac{n}{k}\right] = 0$, then we need $\left[\frac{100 - n}{k}\right] = 1$

else for $\frac{k}{2}< n < k$, $\left[\frac{n}{k}\right] = 1$, then we need $\left[\frac{100 - n}{k}\right] = 0$

For $n < \frac{k}{2}$, $\left[\frac{100 - n}{k}\right] = \left[\frac{100}{k} - \frac{n}{k}\right]= 1$

So, for the condition to be true, $100 - n > \frac{k}{2}$ . ( $k > \frac{200}{3}$, no worry for the rounding to be $> 1$)

$100 > k > \frac{k}{2} + n$, so this is always true.

For $\frac{k}{2}< n < k$, $\left[\frac{100 - n}{k}\right] = 0$, so we want $100 - n < \frac{k}{2}$, or $100 < \frac{k}{2} + n$

$100 <\frac{k}{2} + n < \frac{3k}{2}$

For k = 67, $67 > n > 100 - \frac{67}{2} = 66.5$

For k = 69, $69 > n > 100 - \frac{69}{2} = 67.5$

etc.

We can clearly see that for this case, $k = 67$ has the minimum $P(k)$, which is $\frac{34}{67}$. Also, $\frac{7}{13} > \frac{34}{67}$ .

So for AMC purpose, answer is $\boxed{\textbf{(D) }\frac{34}{67}}$.

[b]Proof:[/b]

Notice that for these integers $99,87,67$:

$0\rightarrow 49,50,51\rightarrow 98$

$100\rightarrow 51,50,49\rightarrow 2$

$P=\frac{98}{99}$

$0\rightarrow 43,44\rightarrow 56,57\rightarrow 86$

$87\rightarrow 57,56\rightarrow 44,43\rightarrow 14$

$P=\frac{74}{87}$

$0\rightarrow 33,34\rightarrow 66$

$100\rightarrow 67,66\rightarrow 34$

$P=\frac{34}{67}$

That the probability is $\frac{2k-100}{k}=2-\frac{100}{k}$. Even for $k=13$, $P(13)=\frac{9}{13}=\frac{100}{13}-7$. And $P(11)=\frac{10}{11}=10-\frac{100}{11}$.

Perhaps the probability for a given $k$ is $\left\lceil{\frac{100}{k}}\right\rceil-\frac{100}{k}$ if $\left[\frac{100}{k}\right]=\left\lfloor{\frac{100}{k}}\right\rfloor$ and $\frac{100}{k}-\left\lfloor{\frac{100}{k}}\right\rfloor$ if $\left[\frac{100}{k}\right]=\left\lceil{\frac{100}{k}}\right\rceil$.

So $P>\frac{1}{2}$ and $P_\text{min}=\frac{k_\text{min}+1}{2k_\text{min}}=\frac{101}{201}$. Because $201=3\cdot 67\mid 99!$  !

Now, let's say we are not given any answer, we need to consider $k < \frac{200}{3}$.

I claim that $P(k) \ge \frac{1}{2} + \frac{1}{2k}$

If $\left[\frac{100}{k}\right]$ got round down, then $1 \le n \le \frac{k}{2}$ all satisfy the condition along with $n = k$

because if $\text{fpart}\left(\frac{100}{k}\right) < \frac{1}{2}$ and $\text{fpart} \left(\frac{n}{k}\right) < \frac{1}{2}$, so must $\text{fpart} \left(\frac{100 - n}{k}\right) < \frac{1}{2}$

and for $n = k$, it is the same as $n = 0$.

, which makes

$P(k) \ge \frac{1}{2} + \frac{1}{2k}$.

If $\left[\frac{100}{k}\right]$ got round up, then $\frac{k}{2} \le n \le k$ all satisfy the condition along with $n = 1$

because if $\text{fpart}\left(\frac{100}{k}\right) > \frac{1}{2}$ and $\text{fpart} \left(\frac{n}{k}\right) > \frac{1}{2}$

Case 1) $\text{fpart} \left(\frac{100 - n}{k}\right) < \frac{1}{2}$

-> $\text{fpart}\left(\frac{100}{k}\right) = \text{fpart} \left(\frac{n}{k}\right) +\text{fpart} \left(\frac{100 - n}{k}\right)$

Case 2)

$\text{fpart} \left(\frac{100 - n}{k}\right) > \frac{1}{2}$

-> $\text{fpart}\left(\frac{100}{k}\right) + 1 = \text{fpart} \left(\frac{n}{k}\right) +\text{fpart} \left(\frac{100 - n}{k}\right)$

and for $n = 1$, since $k$ is odd, $\left[\frac{99}{k}\right] \neq \left[\frac{100}{k}\right]$

-> $99.5 = k (p + .5)$ -> $199 = k (2p + 1)$, and $199$ is prime so $k = 1$ or $k =199$, which is not in this set

, which makes

$P(k) \ge \frac{1}{2} + \frac{1}{2k}$.

Now the only case without rounding, $k = 1$. It must be true.

### Solution 2

It suffices to consider $0\le n < k-1.$ Now for each of these $n,$ let $f(n)=[\frac{n}{k}], g(n)=[\frac{100}{k}]-[\frac{100-n}{k}].$ If we let $k=67,$ then the following graphs result for $f$ and $g.$

$f:$ $[asy] size(10cm); for (int i = 0; i < 67; ++i) { if (i<=33) dot((i,0)); else dot((i,1)); } label("(0,0)",(0,0),SW); label("(66,1)",(66,1),NE); [/asy]$

$g:$ $[asy] size(10cm); for (int i = 0; i < 67; ++i) { dot((i,0)); } label("(0,0)",(0,0),NW); label("(66,0)",(66,0),SE); [/asy]$

Our probability is the number of $0\le i such that $f(i)+g(i)=0$ over $k.$ Of course, this always holds for $i=0.$ If we let $k$ vary, then the graph of $f$ is always very similar to what it looks like above (groups of $\frac{k+1}{2},\frac{k-1}{2}$ dots). However, the graph of $g$ can vary greatly. In the above diagram, $g(i)=0$ for all $i,$ while it is possible for $g(i)=-1$ for all $i\neq 0.$ In order to minimize the number of $i$ which satisfy $f(i)+g(i)=0,$ we either want $g(i)=0$ for $0\le i or $g(i)=-1$ for $1\le i This way, we see that at least half of the numbers from $1$ to $k-1$ satisfy the given equation. So, our desired probability is at least $\frac{k+1}{2k}.$ As shown by the diagram above, the probability is $\frac{34}{67}$ for $k=67.$ Clearly no better solutions can exist when $k<67.$ On the other hand, for $k>67$ $87$ and $99$ do not yield better probabilities. Therefore, our answer is $\boxed{67.}$