Pat will walk from intersection X to intersection Y along a route that is confined to the square grid of four streets and three avenues shown in the map above. How many routes from X to Y can Pat take that have the minimum possible length?
Six
Eight
Ten
Fourteen
Sixteen
网格路径问题
无论路径如何,从X到Y都需要经过3条street和2条avenue,相当于从5个里面挑3个street,street确定了,avenue自然就确定了。
请问为什么相对于是在5个里挑3个呢~这类问题还是不太理解~
最短路径X→Y,无论哪种走法,必须经过3竖2横,即3次向上和2次向右。就是你从一个点出发,要走5步,其中3步向上,2步向右,都能到达同一个点,问有多少种不同的走法。
再直白来说,相当于你有3个一样的苹果,2个一样的梨,将它们排成一排,有多少种排法。
希望能够帮助到你
谢谢~确实是这个思路。
登录 或 注册 后可以参加讨论