i need some help with shortest path recursion.
a recursive function is given a and b (makes a rectangle) and the function returns how many different ways the character can move from tile to tile to reach the end goal.
what i'm having trouble with:
-the shortest path is always a+b - 1. how is this important?
-how would my recursion function know if a certain path is already counted?
-how does the recursion function keep track of how many different paths if it has to change the value of a and b to get to the end goal?
i'm probably looking at this wrong but if someone can point me to the right direction i can do all the work. i just don't understand what the relationships are.
a recursive function is given a and b (makes a rectangle) and the function returns how many different ways the character can move from tile to tile to reach the end goal.
what i'm having trouble with:
-the shortest path is always a+b - 1. how is this important?
-how would my recursion function know if a certain path is already counted?
-how does the recursion function keep track of how many different paths if it has to change the value of a and b to get to the end goal?
i'm probably looking at this wrong but if someone can point me to the right direction i can do all the work. i just don't understand what the relationships are.


