Q: Waldo and Basil are exactly m blocks west and n blocks north from Central Park, and always go with the green light until they run out of options. Assuming that the probability of the light being green is 1/2 in each direction, that if the light is green in one direction it is red in the other, and that the lights are not synchronized, find the expected number of red lights that Waldo and Basil will encounter.

Lights Solution

lib/DbaDatabase.php:134: Warning: dba_replace() [<a href='function.dba-replace'>function.dba-replace</a>]: You cannot perform a modification to a database without proper access