Take a test Sign in 中文
← Exercise 1,265 →
Search
Go to
{{searchResults.length}} {{searchResults.length === 1 ? 'result' : 'results'}} for “{{searchWords}}” No results found for “{{searchWords}}” × back to contents
Contents · by chapter
Basic Algebra (10)
Statistics (13)
Equations (42)
Functions (30)
Polynomials (34)
Sequences (34)
Logarithm (30)
Extrema (18)
Complex Numbers (34)
Quadratic Curve(Conic section) (22)
Logic (14)

Exercises and their solutions

Exercise 1,265
Arjun and Beth take turns removing one brick or two adjacent bricks from one wall among several walls of bricks (one brick tall), gaps possibly creating new walls. Arjun plays first, and the player who removes the last brick wins. For which starting configuration does Beth have a winning strategy? \[(7,1,1),\quad(7,2,1),\quad(7,3,1),\quad(7,3,2),\quad(7,4,2)\]
← Back to Problem 1,265
Solution
  1. As in the problem, start with $g(0)=0$; for a single wall of $n$ bricks the table lists the positions one move can reach (first removing one brick, then two adjacent bricks), their values $g(a)\oplus g(b)$, and the smallest value missing from that list:
    \begin{center}
    \begin{tabular}{cllc}
    $n$ & reachable positions & their values & $g(n)$\\ \hline
    $1$ & empty & $0$ & $1$\\
    $2$ & $1$, empty & $1,0$ & $2$\\
    $3$ & $2$, $1+1$, $1$ & $2,0,1$ & $3$\\
    $4$ & $3$, $1+2$, $2$, $1+1$ & $3,3,2,0$ & $1$\\
    $5$ & $4$, $1+3$, $2+2$, $3$, $1+2$ & $1,2,0,3,3$ & $4$\\
    $6$ & $5$, $1+4$, $2+3$, $4$, $1+3$, $2+2$ & $4,0,1,1,2,0$ & $3$\\
    $7$ & $6$, $1+5$, $2+4$, $3+3$, $5$, $1+4$, $2+3$ & $3,5,3,0,4,0,1$ & $2$
    \end{tabular}
    \end{center}
  2. XORs: $(7,1,1)\to2$, $(7,2,1)\to1$, $(7,3,1)\to2\oplus3\oplus1=0$, $(7,3,2)\to3$, $(7,4,2)\to1$.
  3. Only $\boxed{(7,3,1)}$ has XOR $0$, so Beth wins there.
Search Go to Prev      Next

Contact Us

Thanks! Your message has been sent.
By year