├── .gitignore ├── 00_CompletionStats.ipynb ├── 2014_01_SumOfSquares.ipynb ├── 2014_02_Hooks.ipynb ├── 2014_05_TileAndTrouble.ipynb ├── 2014_06_QuestionMark.ipynb ├── 2014_07_ChainReaction.ipynb ├── 2014_08_NumberCross.ipynb ├── 2014_10_MineSweeping.ipynb ├── 2014_11_WrongDivision.ipynb ├── 2015_05_TicTacOh.ipynb ├── 2015_06_Polymath.ipynb ├── 2015_07_GoodChemistry.ipynb ├── 2015_08_NumberCross2.ipynb ├── 2015_09_ThinkOfTheChildren.ipynb ├── 2015_10_HexAgony.ipynb ├── 2015_11_PairDance.ipynb ├── 2015_12_ProfessorRando.ipynb ├── 2016_01_ProfessorRandoRedux.ipynb ├── 2016_02_TravelAgent.ipynb ├── 2016_03_KnightMoves-Z3.ipynb ├── 2016_03_KnightMoves.ipynb ├── 2016_05_Hooks2-z3.ipynb ├── 2016_05_Hooks2.ipynb ├── 2016_06_GetOutTheVote.ipynb ├── 2016_07_NumberCross3.ipynb ├── 2016_08_SwingTime.ipynb ├── 2016_09_ChessDance.ipynb ├── 2016_10_TriTriAgain.ipynb ├── 2017_01_HexAgony2.ipynb ├── 2017_02_WhatAboutBob.ipynb ├── 2017_03_BirthdayBash.ipynb ├── 2017_04_KnightMoves2-Z3.ipynb ├── 2017_04_KnightMoves2.ipynb ├── 2017_05_KenKen(Concatenated).ipynb ├── 2017_06_WellWellWell.ipynb ├── 2017_07_SplitDivision-Improved.ipynb ├── 2017_07_SplitDivision.ipynb ├── 2017_09_SquareRun.ipynb ├── 2017_11_BlockParty-Z3.ipynb ├── 2017_11_BlockParty.ipynb ├── 2018_01_RatherSquareSudoku-Z3.ipynb ├── 2018_01_RatherSquareSudoku.ipynb ├── 2018_02_Hooks3-z3.ipynb ├── 2018_02_Hooks3.ipynb ├── 2018_03_ItsSymmetric.ipynb ├── 2018_05_SwingTime2.ipynb ├── 2018_06_TwentyFourSeven.ipynb ├── 2018_06_TwentyFourSeven_Z3.ipynb ├── 2018_08_Hooks4-z3.ipynb ├── 2018_08_Hooks4.ipynb ├── 2018_09_SpiralRegion.ipynb ├── 2018_10_Subtiles.ipynb ├── 2018_11_PentUpFrustration.ipynb ├── 2018_12_BlockParty2-z3.ipynb ├── 2018_12_BlockParty2.ipynb ├── 2019_01_Fences.ipynb ├── 2019_03_TwentyFourSeven2by2-Z3.ipynb ├── 2019_03_TwentyFourSeven2by2.ipynb ├── 2019_04_Remote Sudoku.ipynb ├── 2019_04_RemoteSudoku-Z3.ipynb ├── 2019_06_Hooks5-z3.ipynb ├── 2019_06_Hooks5.ipynb ├── 2019_08_KnightMoves3-Z3.ipynb ├── 2019_08_KnightMoves3.ipynb ├── 2019_09_BlockParty3-Z3.ipynb ├── 2019_09_BlockParty3.ipynb ├── 2019_10_TriTriAgainAgain.ipynb ├── 2019_11_Hooks6-z3.ipynb ├── 2019_11_Hooks6.ipynb ├── 2020_01_AlterNate.ipynb ├── 2020_05_Expelled.ipynb ├── 2020_07_WhatATrit.ipynb ├── 2020_08_StudyAndPonder.ipynb ├── 2020_09_Tangled.ipynb ├── 2020_10&11_CandyCollectors.ipynb ├── 2020_12_TwentyFourSeven2by2_2-z3.ipynb ├── 2020_12_TwentyFourSeven2by2_2.ipynb ├── 2021_01_FigurineFiguring.ipynb ├── 2021_02_Hooks7-z3.ipynb ├── 2021_02_Hooks7.ipynb ├── 2021_04_Bracketology101.ipynb ├── 2021_05_PastTens.ipynb ├── 2021_06_RobotWeightlifting.ipynb ├── 2021_07_ItsSymmetric2.ipynb ├── 2021_08_RobotTugOfWar(SageMath).ipynb ├── 2021_08_RobotTugOfWar(python).ipynb ├── 2021_09_KnightMoves4.ipynb ├── 2021_10_RobotSwimmingTrials.ipynb ├── 2021_11_SplitDivision2.ipynb ├── 2021_12_RobotArchery.ipynb ├── 2022_01_Hooks8-z3.ipynb ├── 2022_01_Hooks8.ipynb ├── 2022_02_Eldrow.ipynb ├── 2022_04_AlmostMagic.ipynb ├── 2022_05_Robot_Updated_Swimming_Trials.ipynb ├── 2022_06_BlockParty4.ipynb ├── 2022_07_AndysMorningStroll.ipynb ├── 2022_08_NewYorkMinute.ipynb ├── 2022_10_TheMarshyMess.ipynb ├── 2022_11_PentUpFrustration2.ipynb ├── 2022_12_DieAgony.ipynb ├── 2023_01_Lesses_More.ipynb ├── 2023_02_TwentyFourSeven_FourInOne.ipynb ├── 2023_03_Robot_Long_Jump.ipynb ├── 2023_04_Arc_edge_Acreage.ipynb ├── 2023_05_Game_Night.ipynb ├── 2023_06_Hooks9-z3.ipynb ├── 2023_06_Hooks9.ipynb ├── 2023_07_ChocoBanana-z3.ipynb ├── 2023_07_ChocoBanana.ipynb ├── 2023_08_SingleCross2.ipynb ├── 2023_09_Getting_from_a_to_b.ipynb ├── 2023_10_a_weird_tour.ipynb ├── 2023_11_knight_moves_5.ipynb ├── 2023_12_HallOfMirrors2.ipynb ├── 2024_01_SomeFSquares.ipynb ├── 2024_02_Some Off Square.ipynb ├── 2024_03_Hooks10.ipynb ├── 2024_04_RobotCaptureTheFlag.ipynb ├── 2024_05_NumberCross4.ipynb ├── 2024_06_AlteredStates2.ipynb ├── 2024_08_TreeEdgeTriage.ipynb ├── 2024_09_Fences-2.ipynb ├── 2024_10_knight_moves_6.ipynb ├── 2024_11_BesideThePoint.ipynb ├── 2025_01_SomewhatSquareSudoku.ipynb ├── 2025_03_HallOfMirrors3.ipynb ├── 2025_04_SumOneSomewhere-.ipynb ├── 2025_05_NumberCross5.ipynb ├── EldrowWordlist.csv ├── Numberphile2023.ipynb ├── Path.jpg ├── README.md ├── Semaphore.jpg ├── cbanana_raw.txt ├── cbanana_solved.txt └── requirements.txt /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | pip-wheel-metadata/ 24 | share/python-wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | MANIFEST 29 | 30 | # PyInstaller 31 | # Usually these files are written by a python script from a template 32 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 33 | *.manifest 34 | *.spec 35 | 36 | # Installer logs 37 | pip-log.txt 38 | pip-delete-this-directory.txt 39 | 40 | # Unit test / coverage reports 41 | htmlcov/ 42 | .tox/ 43 | .nox/ 44 | .coverage 45 | .coverage.* 46 | .cache 47 | nosetests.xml 48 | coverage.xml 49 | *.cover 50 | *.py,cover 51 | .hypothesis/ 52 | .pytest_cache/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | target/ 76 | 77 | # Jupyter Notebook 78 | .ipynb_checkpoints 79 | 80 | # IPython 81 | profile_default/ 82 | ipython_config.py 83 | 84 | # pyenv 85 | .python-version 86 | 87 | # pipenv 88 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 89 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 90 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 91 | # install all needed dependencies. 92 | #Pipfile.lock 93 | 94 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 95 | __pypackages__/ 96 | 97 | # Celery stuff 98 | celerybeat-schedule 99 | celerybeat.pid 100 | 101 | # SageMath parsed files 102 | *.sage.py 103 | 104 | # Environments 105 | .env 106 | .venv 107 | env/ 108 | venv/ 109 | ENV/ 110 | env.bak/ 111 | venv.bak/ 112 | 113 | # Spyder project settings 114 | .spyderproject 115 | .spyproject 116 | 117 | # Rope project settings 118 | .ropeproject 119 | 120 | # mkdocs documentation 121 | /site 122 | 123 | # mypy 124 | .mypy_cache/ 125 | .dmypy.json 126 | dmypy.json 127 | 128 | # Pyre type checker 129 | .pyre/ 130 | -------------------------------------------------------------------------------- /00_CompletionStats.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 1, 6 | "id": "b8335901-bf75-4944-95c7-7ab5e908db29", 7 | "metadata": { 8 | "tags": [] 9 | }, 10 | "outputs": [], 11 | "source": [ 12 | "import requests\n", 13 | "from bs4 import BeautifulSoup,SoupStrainer\n", 14 | "import pandas as pd\n", 15 | "from IPython.display import Markdown, display,HTML,Image\n", 16 | "from selenium import webdriver\n", 17 | "import time\n", 18 | "from pandas.plotting import table \n", 19 | "import matplotlib.pyplot as plt\n", 20 | "import string\n", 21 | "\n", 22 | "# Borrowed the offset idea from this (much more professionally done) tableau page\n", 23 | "# https://public.tableau.com/app/profile/heidi.stockton/viz/PuzzlesofJaneStreet/JaneStreet\n", 24 | "# No adjustments for similar names etc (apologies)" 25 | ] 26 | }, 27 | { 28 | "cell_type": "code", 29 | "execution_count": 2, 30 | "id": "94944254-3f39-47c8-bf21-5e47e3e01e64", 31 | "metadata": { 32 | "tags": [] 33 | }, 34 | "outputs": [], 35 | "source": [ 36 | "# get the solution links\n", 37 | "pages = ['https://www.janestreet.com/puzzles/archive/index.html']+['https://www.janestreet.com/puzzles/archive/page'+str(i)+'/index.html' for i in range(2,13)]\n", 38 | "links = ['https://www.janestreet.com/puzzles/current-puzzle/']\n", 39 | "for url in pages:\n", 40 | " res = requests.get(url)\n", 41 | " soup = BeautifulSoup(res.content, 'html.parser')\n", 42 | " links += ['https://www.janestreet.com/'+i['href'] for i in soup.find_all('a', {'class' :'solution-link'})] " 43 | ] 44 | }, 45 | { 46 | "cell_type": "code", 47 | "execution_count": 3, 48 | "id": "05bea8ec-259c-4690-bea5-4181d37ba86e", 49 | "metadata": { 50 | "tags": [] 51 | }, 52 | "outputs": [], 53 | "source": [ 54 | "# scrape the names of solvers\n", 55 | "participants = []\n", 56 | "order = 1\n", 57 | "driver = webdriver.Firefox()\n", 58 | "for url in links:\n", 59 | " driver.get(url)\n", 60 | " time.sleep(5)\n", 61 | " htmlSource = driver.page_source\n", 62 | " soup = BeautifulSoup(htmlSource, 'html.parser')\n", 63 | " participants += [[str(url).split(\"/\")[-1],i.split(\" (\")[0],order] for i in soup.find_all('p', {'class' :'correct-submissions'})[0].stripped_strings]\n", 64 | " order +=1" 65 | ] 66 | }, 67 | { 68 | "cell_type": "code", 69 | "execution_count": 4, 70 | "id": "d7c4c1e2-e588-4328-8a2f-0319add0f92c", 71 | "metadata": { 72 | "tags": [] 73 | }, 74 | "outputs": [ 75 | { 76 | "data": { 77 | "text/html": [ 78 | "
\n", 96 | " | Solved | \n", 97 | "Attempts | \n", 98 | "Score | \n", 99 | "
---|---|---|---|
Name | \n", 102 | "\n", 103 | " | \n", 104 | " | \n", 105 | " |
Evan Semet | \n", 110 | "43 | \n", 111 | "44 | \n", 112 | "0.843137 | \n", 113 | "
Karl Mahlburg | \n", 116 | "61 | \n", 117 | "68 | \n", 118 | "0.813333 | \n", 119 | "
Senthil Rajasekaran | \n", 122 | "67 | \n", 123 | "79 | \n", 124 | "0.779070 | \n", 125 | "
Gareth Owen | \n", 128 | "49 | \n", 129 | "59 | \n", 130 | "0.742424 | \n", 131 | "
Aaditya Raghavan | \n", 134 | "51 | \n", 135 | "62 | \n", 136 | "0.739130 | \n", 137 | "
Lazar Ilic | \n", 140 | "46 | \n", 141 | "56 | \n", 142 | "0.730159 | \n", 143 | "
Danica Xiong | \n", 146 | "24 | \n", 147 | "26 | \n", 148 | "0.727273 | \n", 149 | "
Blaine Hill | \n", 152 | "22 | \n", 153 | "24 | \n", 154 | "0.709677 | \n", 155 | "
Calvin Pozderac | \n", 158 | "70 | \n", 159 | "92 | \n", 160 | "0.707071 | \n", 161 | "
Manuel Felizardo Roxo | \n", 164 | "17 | \n", 165 | "18 | \n", 166 | "0.680000 | \n", 167 | "
Miguel Barbosa Pereira | \n", 170 | "30 | \n", 171 | "39 | \n", 172 | "0.652174 | \n", 173 | "
Pedro Pereira | \n", 176 | "16 | \n", 177 | "18 | \n", 178 | "0.640000 | \n", 179 | "
Tiago França | \n", 182 | "16 | \n", 183 | "18 | \n", 184 | "0.640000 | \n", 185 | "
Josh Richman | \n", 188 | "24 | \n", 189 | "31 | \n", 190 | "0.631579 | \n", 191 | "
Anton 3 Terekhov | \n", 194 | "23 | \n", 195 | "30 | \n", 196 | "0.621622 | \n", 197 | "
\n", 270 | " | Solved | \n", 271 | "Attempts | \n", 272 | "Score | \n", 273 | "
---|---|---|---|
Name | \n", 276 | "\n", 277 | " | \n", 278 | " | \n", 279 | " |
Calvin Pozderac | \n", 284 | "70 | \n", 285 | "92 | \n", 286 | "0.707071 | \n", 287 | "
Senthil Rajasekaran | \n", 290 | "67 | \n", 291 | "79 | \n", 292 | "0.779070 | \n", 293 | "
Karl Mahlburg | \n", 296 | "61 | \n", 297 | "68 | \n", 298 | "0.813333 | \n", 299 | "
Sean Egan | \n", 302 | "54 | \n", 303 | "86 | \n", 304 | "0.580645 | \n", 305 | "
Keith Schneider | \n", 308 | "51 | \n", 309 | "83 | \n", 310 | "0.566667 | \n", 311 | "
Aaditya Raghavan | \n", 314 | "51 | \n", 315 | "62 | \n", 316 | "0.739130 | \n", 317 | "
Gareth Owen | \n", 320 | "49 | \n", 321 | "59 | \n", 322 | "0.742424 | \n", 323 | "
Lazar Ilic | \n", 326 | "46 | \n", 327 | "56 | \n", 328 | "0.730159 | \n", 329 | "
Evan Semet | \n", 332 | "43 | \n", 333 | "44 | \n", 334 | "0.843137 | \n", 335 | "
Heidi Stockton | \n", 338 | "40 | \n", 339 | "105 | \n", 340 | "0.357143 | \n", 341 | "
Sébastien Geeraert | \n", 344 | "38 | \n", 345 | "77 | \n", 346 | "0.452381 | \n", 347 | "
Sanandan Swaminathan | \n", 350 | "35 | \n", 351 | "55 | \n", 352 | "0.564516 | \n", 353 | "
Michael Delyser | \n", 356 | "31 | \n", 357 | "81 | \n", 358 | "0.352273 | \n", 359 | "
Cubist | \n", 362 | "31 | \n", 363 | "61 | \n", 364 | "0.455882 | \n", 365 | "
Hutama | \n", 368 | "30 | \n", 369 | "113 | \n", 370 | "0.250000 | \n", 371 | "
You’re going to play Tic Tac Toe against a computer program, and you get to go\n", 45 | "first. The program is not very smart, and its strategy, which you are aware of,\n", 46 | "is to just mark a uniformly randomly chosen un-filled square on each turn. It\n", 47 | "would be really embarrassing not to beat this computer program, so in your eyes,\n", 48 | "a tie game is just as bad as a loss. What’s the maximum chance of winning you\n", 49 | "can give yourself?
\n", 50 | "The best way to face off against this computer program is to mark a corner. If\n", 248 | "the program does not select the middle square, you can always win. If it does\n", 249 | "(1/8), you select one of the 2 spots adjacent to your first mark. If the\n", 250 | "computer does not block you, you win. If it does block you (1/6), you block\n", 251 | "them, and have a chance to win. If the computer blocks you again (1/4), it has\n", 252 | "forced a tie, but otherwise you win. So, the best strategy yields a\n", 253 | "1-(1/8)(1/6)(1/4) = 191/192 chance of winning.
\n", 254 | "Congratulations to those of you who submitted correct answers this month,\n", 255 | "especially Didrik Jonassen, this month’s winner of a Jane Street t-shirt!
\n", 256 | "\n", 257 | "\n", 258 | "As we have twice before, we find ourselves engrossed in a robot sports competition. In the Robot Swimming Trials, 3N identical robots compete for N equivalent spots in the finals by swimming N races. Each robot precommits to spending a certain amount of its fuel in each race. After all the races are run, the spots in the finals are given to the winners of the races, moving from the fastest winner to the slowest. (Once a robot wins a race, it is ineligible to win another race.) A robot’s speed is strictly increasing in the amount of fuel it spends, and ties are broken by randomly choosing the winner among the robots that have spent the same amount of fuel.
\n", 33 | "Mathematically speaking, the 3N robots each submit a strategy, which is an N-tuple of nonnegative real number “bids” summing to 1, representing the fuel burned in each of the N races. The winners of the races are then determined from the highest bid (across all races and all robots) on down, with ties broken randomly. Once a robot wins a race their other bids are deleted, so we are guaranteed to get N distinct qualifiers for the finals.
\n", 34 | "For example, suppose N=3 and the 3N=9 robots submit their strategies as
\n", 35 | "Robot | \n", 39 | "Race 1 | \n", 40 | "Race 2 | \n", 41 | "Race 3 | \n", 42 | "
---|---|---|---|
Automatonya | \n", 47 | "0.6 | \n", 48 | "0.1 | \n", 49 | "0.3 | \n", 50 | "
Botty | \n", 53 | "0.6 | \n", 54 | "0.3 | \n", 55 | "0.1 | \n", 56 | "
Chroma | \n", 59 | "0 | \n", 60 | "1 | \n", 61 | "0 | \n", 62 | "
Data | \n", 65 | "0.3 | \n", 66 | "0.5 | \n", 67 | "0.2 | \n", 68 | "
Electro | \n", 71 | "0.2 | \n", 72 | "0.8 | \n", 73 | "0 | \n", 74 | "
Fernandroid | \n", 77 | "0.4 | \n", 78 | "0.5 | \n", 79 | "0.1 | \n", 80 | "
Gregulator | \n", 83 | "0.5 | \n", 84 | "0.5 | \n", 85 | "0 | \n", 86 | "
Hannanobot | \n", 89 | "0 | \n", 90 | "0.9 | \n", 91 | "0.1 | \n", 92 | "
IO | \n", 95 | "0.2 | \n", 96 | "0.7 | \n", 97 | "0.1 | \n", 98 | "
The second race gets resolved first because Chroma’s bid of 1 is the highest overall, and Chroma is declared the winner of that time trial. Next, the first race is resolved because 0.6 is the highest remaining bid (we ignore the 0.9, 0.8, and 0.7 in the second race because it already has a winner). We flip a fair coin to determine who is the winner between Automatonya and Botty; say that Automatonya gets lucky and is declared the winner. Then the third race is decided, and Data is declared the winner, because 0.2 is the highest bid among robots that have not yet won (Automatonya’s 0.3 is ignored).
\n", 102 | "Over the storied history of the RST, the metagame settled into what was widely believed to be the Nash equilibrium: each robot uniformly randomly selects a race and devotes all of their fuel to it. Let’s call this the discrete strategy. However, rumors are circulating that this conventional wisdom is not entirely accurate: for a large enough N, the discrete strategy is not the Nash equilibrium. You’ve been tasked to find two pieces of information:
\n", 103 | "What is the smallest N for which the trial does not have the discrete strategy as the Nash equilibrium?
\n", 104 | "For this N, if the other 3N-1 robots naively play the discrete\n", 105 | "strategy and your robot plays optimally (exploiting this knowledge of\n", 106 | "your opponents’ strategies), with what probability p will you make the finals (rounded to 6 significant digits)?
\n", 107 | "Please submit your answer in the form “N, p”.
\n", 108 | "We are given that our opponents are all playing the discrete strategy,\n", 189 | "which means they will all be independently choosing a race uniformly\n", 190 | "randomly and devoting\n", 191 | "all of their fuel to it. Since we are searching for the smallest N\n", 192 | "so that the discrete strategy is not optimal, we will be playing\n", 193 | "something other than this strategy. This means we won’t be assigning\n", 194 | "all of our fuel to any one race, but since all of our opponents are\n", 195 | "“bidding” 1 or 0 on every race, the best non-discrete strategies will\n", 196 | "involve bidding a nonzero amount on every race, which will beat all of\n", 197 | "the 0 bids (but lose to all of the 1 bids). So without loss of\n", 198 | "generality we can assume the strategy of bidding 1/N on every race,\n", 199 | "we can call this the uniform strategy.
\n", 200 | "Now we need to compute the smallest N for which this beats out the\n", 201 | "discrete strategy. The uniform strategy wins a race exactly when none\n", 202 | "of the 3N-1 other discrete-strategy-playing robots select that race\n", 203 | "for their fuel. It’s straightforward to compute this probability for a\n", 204 | "single race, (1-1/N)^(3N-1). But the assignment of discrete\n", 205 | "strategies is not independent across the N races! Assuming they were\n", 206 | "would give an incorrect answer of N=9 and p=0.350245…
\n", 207 | "Also, these events of winning a race with the uniform strategy are\n", 208 | "not disjoint across the N races! Assuming they were would give\n", 209 | "an incorrect answer of N=8 and p=0.370916…
\n", 210 | "Instead, a nice recursion could be found to count up the number of\n", 211 | "arrangements of the 3N-1 other players that left at least one race\n", 212 | "undefended. For example, let P(R,m,n) equal the probability that, if we\n", 213 | "need to assign R robots to (m+n) total races, m of which already have\n", 214 | "a robot assigned and n of which don’t, we will eventually assign at\n", 215 | "least one robot to all (m+n) races. Then assigning the next robot to a\n", 216 | "race uniformly randomly implies the recursion:
\n", 217 | "P(R,m,n) = (m * P(R-1,m,n) + n * P(R-1,m+1,n-1))/(m+n).
\n", 218 | "Along with the boundary values
\n", 219 | "P(R,m,0) = 1 (all races have been assigned at least one robot)
\n", 220 | "and for n>0,
\n", 221 | "P(0,m,n) = 0 (we’ve run out of robots and we still have an unassigned\n", 222 | "race),
\n", 223 | "we can compute values of P efficiently by induction. We want to find\n", 224 | "the smallest N such that
\n", 225 | "1 - P(3N-1,0,N) > 1/3,
\n", 226 | "which occurs at N=8 and p=0.334578….
\n", 227 | "Congrats to this month’s solvers who computed the correct size and\n", 228 | "probability of winning the swimming trials!
\n", 229 | "\n", 230 | "\n", 231 | "