- #1

Alexsandro

- 51

- 0

You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

- Thread starter Alexsandro
- Start date

- #1

Alexsandro

- 51

- 0

- #2

TenaliRaman

- 644

- 1

Again let's do some encoding,

Whenever the monkey is successfull in its jump, encode that as a 1 and if it fails encode that as a 0. Hence the sequence of jumps made by the monkey are encoded as a n-bit binary string.

Then the required expectation is the expected longest sequence of 1's in the binary string. This expectation can be calculated from first principles, again a bit tedious.

E[longest sequence of 1's]

= 0 * P(longest sequence of 1's = 0)

+ 1 * P(longest sequence of 1's = 1)

+ 2 * P(longest sequence of 1's = 2)

+...+ n * P(longest sequence of 1's = n)

The probabilities can be calculated by looking that 2^n possible binary representations.

-- AI

- #3

balakrishnan_v

- 50

- 0

log(n+1)/log(2) fruits

Last edited:

- #4

balakrishnan_v

- 50

- 0

log(n+1)/log(2) fruits

Share:

- Replies
- 0

- Views
- 327

- Last Post

- Replies
- 11

- Views
- 670

- Replies
- 8

- Views
- 110

- Replies
- 2

- Views
- 68

- Last Post

- Replies
- 14

- Views
- 464

- Replies
- 5

- Views
- 805

- Replies
- 6

- Views
- 304

- Last Post

- Replies
- 5

- Views
- 367

- Replies
- 12

- Views
- 859

- Replies
- 2

- Views
- 122