A release-checked easy problem for training Brainteasers.
Question
You are given the option to purchase or sell a stock for $\$n$ today. You are also told that the stock will either double in value or halve in value tomorrow. In addition to buying or selling the stock, you may bet on the outcome of the value of the stock in a casino. If you bet $x$ dollars on the correct outcome, you will receive $x$ dollars, otherwise you will lose your bet. Given this information, come up with the optimal solution to always profit. Report your guaranteed profit when $n = 100$.
Practice focus
This Brainteasers problem is tagged Brainteasers. State the random variables and conditioning information explicitly, then check the result against boundary cases before opening hints or a solution.