Willy Walks to School (Part III)

Mr. Siddique has left Takoma Park to go to Bangladesh, and because of that, Willy has transferred to Robert Frost, which lies at ( 5 , 5 ) (5,5) . Willy still lives at the origin.

Willy again wishes to walk to school. However, Arman owns a square plot of land with vertices at M = ( 2 , 2 ) , E = ( 2 , 3 ) , A = ( 3 , 3 ) , N = ( 3 , 2 ) M=(2,2), E=(2,3), A=(3,3), N=(3,2) , and he commands Willy to never ever walk along the boundary of his land: that is, Willy cannot touch any four vertices of Arman's land or walk along any side of his square plot of land.

Now, how many ways can Willy walk to school? (Willy can only walk up and right.)

(See here for details.)


The answer is 52.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Brad Morin
Aug 27, 2016

Willy can avoid Arman's block by going around the right side or going around the left side.

  • Going to the right, Willy must avoid (3, 2), which requires passing through either (4, 1) or (5, 0), both on independent paths.

      There are _five_ ways to go from (0,0) to (4,1) and five ways to finish a path to (5,5).
    
      That makes twenty-five independent, complete paths through (4,1).
    
      There is only one path from (0,0) to (5,0) and one path from (5,0) to (5,5).
    
      That makes one independent, complete path through (5,0).
    
      That makes twenty-six different paths going to the right.
    
  • Going to the left involves paths symmetric to going to the right, which makes another twenty-six paths.

Thus, there are fifty-two independent paths.

Devansh Singh
Jun 21, 2017
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
def isrestricted(x,y):
    if (x==2 or x==3) and (y==2 or y==3):
        return 1
    return 0

def trav(x=0,y=0):
    if x==5 and y==5:
        return 1
    elif x>5 or y>5:
        return 0
    elif isrestricted(x,y):
        return 0
    return trav(x+1,y)+trav(x,y+1)

print(trav())

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...