Grid Path Combinations

[b]The Scenario:[/b] [br]Imagine you are controlling a robot navigating a city grid starting at [b]Point A(0,0)[/b]. Your mission is to reach the target at [b]Point B[/b]. But there is a catch! You have limited battery, so you must take the [b]shortest path[/b] possible.[br][list][*]Then you should only move [b]Right (R)[math]\Rightarrow[/math][/b]or [b]Up (U)[/b] [math]\Uparrow[/math].[br][/*][*]You are only allowed to walk in grey lines. You cannot move diagonally![/*][*]Therefore, in this model, you are strictly limited to Right and Up moves only.[/*][/list][br][b]How to Explore: [/b][br][list=1][*]Use the [b]Sliders[icon]https://www.geogebra.org/images/ggb/toolbar/mode_slider.png[/icon][/b] to set the distance of the target (How many steps Right & Up).[/*][*]Click [b]"Generate another path!" button [icon]https://www.geogebra.org/images/ggb/toolbar/mode_buttonaction.png[/icon][/b] to see how the computer creates a random route using only your allowed steps.[br][br][/*][/list][b]Task 2: Draw Your Own Path:[/b] [br]I enabled the [b]Pen[/b] or [b]Point[icon]/images/ggb/toolbar/mode_point.png[/icon][/b] and [b]Segment[/b] [icon]/images/ggb/toolbar/mode_segment.png[/icon] tools for you.[br][list][*]Try to draw a [b]some of the shortest paths[/b] from A to B(3,4)[/*][*][b]Check:[/b] For every path, you used exactly 3 Right and 4 Up steps, right? (You have to, otherwise you won't reach B!)[br][/*][/list][br][b]The Goal:[/b] [br]In a small grid, it may be easy to draw paths. But as the grid gets larger, there may be hundreds of different ways to reach the destination.[br][b]Our goal is not to draw them all, but to discover the mathematical pattern behind them.[/b]
[b]Part 2: Unlocking the Formula[/b][br]Look at the generated paths again.[br]Even though every path looks different on the map, they all share a secret:[br][list][*]To reach a target at [b]Right = r[/b] and [b]Up = u[/b], you strictly need [b]r [/b]Right moves and [b]u[/b] Up moves.[br][/*][*][b]Total Steps (t)[/b] = r + u[br][/*][*]Every path is just a scrambled "word" made of these letters.[br][list][*][i]Example for (3,4):[/i] [code]RRRUUUU[/code], [code]URURURU[/code], [code]UUUURRR[/code]...[br][/*][/list][/*][/list]Instead of drawing lines, think about empty boxes for your total steps: [ _ ] [ _ ] [ _ ] [ _ ] [ _ ] [ _ ] [ _ ][br]You have 7 total steps. You just need to choose which 3 of them will be "Right" (R).[br]Once you place the R's, the U's automatically fill the empty spots![br]So, the question is simply: "In how many ways can we choose 3 spots out of 7?"[br][br][size=100][b]This is the definition of [/b][color=#ff0000][b]Combination:[br]        [/b][/color][color=#980000][b]Total number of Paths =[/b] [/color][math]\binom{TotalSteps}{RightSteps}[/math][color=#980000]=[/color][math]\binom{t}{r}[/math][color=#980000]=[/color][math]\frac{t!}{r!.\left(t-r\right)!}[/math][i] (See t - r = u)[/i][/size][br][br][b]Warning:[/b] You might ask: "Why did we choose Right moves? Can't we choose Up moves?"[br]Yes, you can![br][list][*]Selecting [b]3 spots for Right[/b] is exactly the same as leaving [b]4 spots for Up[/b].[br][/*][*]Mathematically, choosing r items is the same as choosing the remaining (n-r) items.[/*][*]Remember the property:[math]\binom{r+u}{r}[/math]=[math]\binom{r+u}{u}[/math] [/*][/list]

Information: Grid Path Combinations