# [Solutions] Bay Area Mathematical Olympiad 2019

1. Let $a$ and $b$ be positive whole numbers such that $\dfrac{4:5}{11}<\dfrac{a}{b}<\dfrac{5}{11}$. Find the fraction $\dfrac{a}{b}$ for which the sum $a+b$ is as small as possible.
2. In the figure below, parallelograms $ABCD$ and $BFEC$ have areas $1234$ cm$^2$ and $2804$ cm$^2$, respectively. Points $M$ and $N$ are chosen on sides $AD$ and $FE$, respectively, so that segment $MN$ passes through $B$. Find the area of $\vartriangle MNC$.
3. Initially, all the squares of an $8\times 8$ grid are white. You start by choosing one of the squares and coloring it gray. After that, you may color additional squares gray one at a time, but you may only color a square gray if it has exactly $1$ or $3$ gray neighbors at that moment (where a neighbor is a square sharing an edge). For example, the configuration below (of a smaller $3\times 4$ grid) shows a situation where six squares have been colored gray so far. The squares that can be colored at the next step are marked with a dot. Is it possible to color all the squares gray? Justify your answer.
4. You are traveling in a foreign country whose currency consists of five different-looking kinds of coins. You have several of each coin in your pocket. You remember that the coins are worth $1, 2, 5, 10$, and $20$ florins, but you have no idea which coin is which and you don’t speak the local language. You find a vending machine where a single candy can be bought for $1$ florin: you insert any kind of coin, and receive $1$ candy plus any change owed. You can only buy one candy at a time, but you can buy as many as you want, one after the other. What is the least number of candies that you must buy to ensure that you can determine the values of all the coins? Prove that your answer is correct.
5. In triangle $\vartriangle ABC$, we have marked points $A_1$ on side $BC$, $B_1$ on side $AC$, and $C_1$ on side $AB$ so that $AA_1$ is an altitude, $BB_1$ is a median, and $CC_1$ is an angle bisector. It is known that $\vartriangle A_1B_1C_1$ is equilateral. Prove that $\vartriangle ABC$ is equilateral too. (Note: A median connects a vertex of a triangle with the midpoint of the opposite side. Thus, for median $BB_1$ we know that $B_1$ is the midpoint of side $AC$ in $\vartriangle ABC$.)
6. Let $S$ be a finite set of nonzero real numbers, and let $f : S\to S$ be a function with the following property: for each $x \in S$, either $f ( f (x)) = x+ f (x)$ or $f ( f (x)) = \dfrac{x+ f (x)}{2}$. Prove that $f (x) = x$ for all $x \in S$.
7. Every positive integer is either nice or naughty, and the Oracle of Numbers knows which are which. However, the Oracle will not directly tell you whether a number is nice or naughty. The only questions the Oracle will answer are questions of the form “What is the sum of all nice divisors of $n$?,” where $n$ is a number of the questioner’s choice. For instance, suppose (just for this example) that $2$ and $3$ are nice, while $1$ and $6$ are naughty. In that case, if you asked the Oracle, “What is the sum of all nice divisors of $6$?,” the Oracle’s answer would be $5$. Show that for any given positive integer $n$ less than $1$ million, you can determine whether $n$ is nice or naughty by asking the Oracle at most four questions.