BrainDen.com - Brain Teasers
• 0

## Question

Consider a plane in which you are at the origin. The only movements you are allowed to make are up, down, left, or right by exactly one unit. let f(n) be the number of paths of length n that you can take to get to the point (1,2) from your starting point at (0,0). it can be shown that f(n) is 0 for any even n and any n less than 3. find a formula for f(n) for all odd n greater than or equal to 3.

## Recommended Posts

• 0

for 3 you have 3: RUU URU UUR

for 5 you have all combos of RULUR; and all combos of UDRUU. (5!/(2*2) +5!/3! = 50.)

for 7 you have all combos of RLRLUUR; all combos of RLUDUUR; and all combos of UDUDUUR;

(7!/(3!*2!*2!) +7!/(3!*2!) +7!/(4!*2!) = 210 +420 +105 = 735)

and with each increase of 2, we can substistute either UD or RL.

so, in general we have

f(n) = n!/(((n-3)/2 +1)!*((n-3)/2)!*2!) +n!/(((n-5)/2 +1)!*((n-5)/2)!*3!)...+n!/(((1!*0!*((n-3)/2 +2)!*((n-3)/2)!))

not sure if that can be reduced, but it doesn't look like it.

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.