Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added problem summary in .md file #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@ Here is the frog problem code I wrote in an Edinburgh pub.
Feel free to make better version. This one has not changed since I wrote it. V1 was the same code but saved before I changed it to work for different distances so I have not bothered upload it as well (it was still very unifinished).

Video is here: https://youtu.be/ZLTyX4zL2Fc

## The problem

A frog is on one side of the pond and wants to get on the other side. There are 𝑛 lily leaves ahead in a line, the 𝑛-th leave laying on the other end of the pond and being the destination. Whatever the position the frog is at any time, it will only go ahead and the probability to land on one of the leaves left in front of it (including the destination) is uniform. For example, if we have 10 leaves ahead, there is a probability of 110 that it will land on any of them.

a) What is the expected value for the number of jumps it will take the frog to arrive to the destination leaf?
b) Can you come up with a formula for that? (It can't be a recursive expression...)