Compare instruction lengths to one endpoint
This lesson uses a finite model to practise compare instruction lengths to one endpoint and checks every stated constraint.
The video could not load. Check your connection and try again, or download it directly.
Download video
Open Chinese transcript
- 路线甲是右、右、上,共三步;路线乙是上、右、下、右、上,共五步。
- 先走甲:向右两格,再向上一格,终点在起点的右二上一区域。
- 再走乙:上下移动中有一步上和一步下互相抵消,最后净移动也是右二上一。
- 两条路线终点相同,才可以比较哪组指令更短。甲三步,乙五步。
- 五减三等于二,所以甲比乙短两步。
- 比较路线不能只数步数;先确认起点和终点相同,再比较才有意义。本题两条路线都没有走出方格。
Sources for this explanation
Logical thinking
Record the conditions, apply the finite method, and substitute the result back into the original problem.
Worked example
Route A has 3 unit steps and B has 5, with the same endpoint. Which is shorter and by how much?
Both routes have net movement two right and one up. Route A uses 3 steps and B uses 5, so A is shorter by two steps.
Try one question
Both routes have net movement one right and one up. A uses 2 steps and B 4, so A is shorter by 2.