eribosot, (edited )
@eribosot@mastodon.social avatar

A group of 100 players are playing a game of chance. All players start with $100. All players play 500 turns of the game.

Each turn, a player must bet half of their money or, if they're down to their last dollar or less, all of their money.

During each turn, they have 51% chance of winning. If they win, they double their bet amount back; if they lose, they get nothing back.

After 500 rounds, how much money does the most successful player have?

donlamb_1,
@donlamb_1@mastodon.online avatar

@eribosot I ran this using python. It came up with some very large numbers for the max. possibly you can point out my error.

eribosot,
@eribosot@mastodon.social avatar

@donlamb_1

First of all, I hope you picked an answer before you started coding. This is cheating ;)

Second, when you set amt, you don't take the amount out of the arr[y]. As in, you place a bet, but the money you bet appears out of thin air. arr[y] = arr[y] + amt*2 should not have the *2.

Also, 50 should be 51.

As luck would have it, I coded it myself (after guessing, and getting it terribly wrong). Here's the relevant fragment of my PowerShell code.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • GTA5RPClips
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • tacticalgear
  • cubers
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • osvaldo12
  • ngwrru68w68
  • kavyap
  • InstantRegret
  • JUstTest
  • everett
  • Durango
  • cisconetworking
  • khanakhh
  • ethstaker
  • tester
  • anitta
  • Leos
  • normalnudes
  • modclub
  • megavids
  • provamag3
  • lostlight
  • All magazines