[Algebra]
Problem: Let $A$ be the sum of the digits of the number you will receive from position 7 , and let $B$ be the sum of the digits of the number you will receive from position 9 . Let $(x, y)$ be a point randomly selected from the interior of the triangle whose consecutive vertices are $(1,1),(B, 7)$ and $(17,1)$. Compute the probability that $x>A-1$.

Solution: Let $P=(1,1), Q=(17,1)$, and $R=(B, 7)$ be the vertices of the triangle, and let $X=(B, 1)$ be the foot of the perpendicular from $R$ to $\overleftrightarrow{P Q}$. Let $M=(A-1,1)$ and let $\ell$ be the vertical line through $M$; then the problem is to determine the fraction of the area of $\triangle P Q R$ that lies to the right of $\ell$.

Note that $B \geq 0$ and $A \geq 0$ because they are digit sums of integers. Depending on their values, the line $\ell$ might intersect any two sides of the triangle or none at all. Each case



requires a separate computation. There are two cases where the computation is trivial. First, when $\ell$ passes to the left of or through the leftmost vertex of $\triangle P Q R$, which occurs when $A-1 \leq \min (B, 1)$, the probability is 1 . Second, when $\ell$ passes to the right of or through the rightmost vertex of $\triangle P Q R$, which occurs when $A-1 \geq \max (B, 17)$, the probability is 0 . The remaining cases are as follows.

Case 1: The line $\ell$ intersects $\overline{P Q}$ and $\overline{P R}$ when $1 \leq A-1 \leq 17$ and $A-1 \leq B$.

Case 2: The line $\ell$ intersects $\overline{P Q}$ and $\overline{Q R}$ when $1 \leq A-1 \leq 17$ and $A-1 \geq B$.

Case 3: The line $\ell$ intersects $\overline{P R}$ and $\overline{Q R}$ when $17 \leq A-1 \leq B$.

Now proceed case by case.

Case 1: Let $T$ be the point of intersection of $\ell$ and $\overline{P R}$. Then the desired probability is $[M Q R T] /[P Q R]=1-[P M T] /[P Q R]$. Since $\triangle P M T \sim \triangle P X R$ and the areas of similar triangles are proportional to the squares of corresponding sides, $[P M T] /[P X R]=(P M / P X)^{2}$. Since $\triangle P X R$ and $\triangle P Q R$ both have height $X R$, their areas are proportional to their bases: $[P X R] /[P Q R]=P X / P Q$. Taking the product, $[P M T] /[P Q R]=(P M / P X)^{2}(P X / P Q)=$ $\frac{P M^{2}}{P X \cdot P Q}=\frac{(A-2)^{2}}{(B-1)(17-1)}$, and the final answer is

$$
\frac{[M Q R T]}{[P Q R]}=1-\frac{[P M T]}{[P Q R]}=1-\frac{(A-2)^{2}}{16(B-1)}
$$

Case 2: Let $U$ be the point of intersection of $\ell$ and $\overline{Q R}$. A similar analysis to the one in the previous case yields

$$
\frac{[M Q U]}{[P Q R]}=\frac{[M Q U]}{[X Q R]} \cdot \frac{[X Q R]}{[P Q R]}=\left(\frac{M Q}{X Q}\right)^{2} \frac{X Q}{P Q}=\frac{(18-A)^{2}}{16(17-B)}
$$

Case 3: Let $T$ be the point of intersection of $\ell$ and $\overline{P R}$ and let $U$ be the point of intersection of $\ell$ and $\overline{Q R}$ as in the previous cases. Let $S$ be the point on $\overline{P R}$ such that $\overline{Q S} \perp \overline{P Q}$. Then $\triangle T U R \sim \triangle S Q R$, so the areas of these two triangles are proportional to the squares of the corresponding altitudes $M X$ and $Q X$. Thinking of $\overleftrightarrow{P R}$ as the common base, $\triangle S Q R$ and $\triangle P Q R$ have a common altitude, so the ratio of their areas is $S R / P R$. Since $\triangle P Q S \sim$ $\triangle P X R, P S / P R=P Q / P X$ and so $\frac{S R}{P R}=1-\frac{P S}{P R}=1-\frac{P Q}{P X}=\frac{Q X}{P X}$. Therefore the desired probability is

$$
\frac{[T U R]}{[P Q R]}=\frac{[T U R]}{[S Q R]} \cdot \frac{[S Q R]}{[P Q R]}=\left(\frac{M X}{Q X}\right)^{2} \frac{Q X}{P X}=\frac{(B-A+1)^{2}}{(B-17)(B-1)}
$$

Using the answers from positions 7 and $9, A=4+1+4=9$ and $B=2+7=9$. The first case applies, so the probability is

$$
1-\frac{(9-2)^{2}}{16(9-1)}=1-\frac{49}{128}=\frac{\mathbf{7 9}}{\mathbf{1 2 8}}
$$

Final answer: $\frac{79}{128}$