4 comments

  • vjerancrnjak1 hour ago
    Bruteforce thinking works in this case, given that there&#x27;s only ~12*2^12 total states and transition matrix is very sparse, 1&#x2F;11 is quick to calculate.<p>But not all of these states are valid, visited set is just defined by 2 markers on the circle (and the start position), so now state count is much smaller.<p>Ladybug needs to be on 7 or 5 while having a nice (7,5) visited state to reach 6, movements inside (7, 5) don&#x27;t really matter, so state count gets to 12*11&#x2F;2=66. Quite small and enough to do by hand.<p>edit: been thinking a bit on finding a short proof, as 1&#x2F;11 (or 1&#x2F;(N-1) in general case) sounds like there could be a nice short proof, but it only made me realize how these constructive proofs are so clean and any attempts to formalize this gets me into graph theory vibes where I just feel like proof is making nonsymbolic leaps in reasoning that I just can&#x27;t feel are true.
  • archargelod4 hours ago
    &gt; After 5000 runs, they were all 8.4-9.7%<p>This sample size is really small. I ran 100 million simulations in Nim[0] (takes around a minute). And distribution converges toward 9.09% on all positions equally:<p><pre><code> Average turns: 65.99609065001634 Final position distribution: 4: 9.095% 11: 9.093% 7: 9.091% 3: 9.091% 10: 9.090% 9: 9.090% 1: 9.090% 8: 9.090% 2: 9.090% 6: 9.090% 5: 9.089% 0: 0.000% </code></pre> [0] - <a href="https:&#x2F;&#x2F;play.nim-lang.org&#x2F;#pasty=hwdfbsfh" rel="nofollow">https:&#x2F;&#x2F;play.nim-lang.org&#x2F;#pasty=hwdfbsfh</a> (reduced amount of runs to not abuse playground server resources)
  • ludwik4 hours ago
    Shouldn&#x27;t the code say:<p><pre><code> position = (position + direction + 1) % 12; </code></pre> Or have I misunderstood something?
    • LiamPowell4 hours ago
      The +12 is to keep the number positive. The direction contains the movement so a +1 wouldn&#x27;t make sense.
    • nulptr3 hours ago
      The +12 there is so that % works correctly (ie the number never becomes negative)