Random Walks in the Plane Taxicab Distance

Random Walks in the Plane Taxicab Distance
Loading the math board and drawing, please wait…
2014-08-19 06:34
This example demonstrates the process of calculating path lengths using the taxicab distance (Manhattan distance) during a random walk in the plane. Key math concepts include Probability & Statistics, Coordinate Geometry, Sequences and Series. It utilizes commands like Random, If, Segment, DotPlot, PolyLine in GeoGebra for construction. Suitable for high school and above students to understand random processes, distance measurement, and mathematical modeling.

GeoGebra Commands & Parameters

  1. Random(1, 4) → B1
  2. Random(1, 4) → B2
  3. Random(1, 4) → B3
  4. Random(1, 4) → B4
  5. Random(1, 4) → B5
  6. Random(1, 4) → B6
  7. Random(1, 4) → B7
  8. Random(1, 4) → B8
  9. Random(1, 4) → B9
  10. Random(1, 4) → B10
  11. Random(1, 4) → B11
  12. Random(1, 4) → B12
  13. If(B1 ≟ 1, A1 + (1, 0), If[B1 ≟ 2, A1 + (0, 1), If[B1 ≟ 3, A1 + (-1, 0), A1 + (0, -1)]]) → A2
  14. If(B2 ≟ 1, A2 + (1, 0), If[B2 ≟ 2, A2 + (0, 1), If[B2 ≟ 3, A2 + (-1, 0), A2 + (0, -1)]]) → A3
  15. If(B3 ≟ 1, A3 + (1, 0), If[B3 ≟ 2, A3 + (0, 1), If[B3 ≟ 3, A3 + (-1, 0), A3 + (0, -1)]]) → A4
  16. If(B4 ≟ 1, A4 + (1, 0), If[B4 ≟ 2, A4 + (0, 1), If[B4 ≟ 3, A4 + (-1, 0), A4 + (0, -1)]]) → A5
  17. If(B5 ≟ 1, A5 + (1, 0), If[B5 ≟ 2, A5 + (0, 1), If[B5 ≟ 3, A5 + (-1, 0), A5 + (0, -1)]]) → A6
  18. If(B6 ≟ 1, A6 + (1, 0), If[B6 ≟ 2, A6 + (0, 1), If[B6 ≟ 3, A6 + (-1, 0), A6 + (0, -1)]]) → A7
  19. If(B7 ≟ 1, A7 + (1, 0), If[B7 ≟ 2, A7 + (0, 1), If[B7 ≟ 3, A7 + (-1, 0), A7 + (0, -1)]]) → A8
  20. If(B8 ≟ 1, A8 + (1, 0), If[B8 ≟ 2, A8 + (0, 1), If[B8 ≟ 3, A8 + (-1, 0), A8 + (0, -1)]]) → A9
  21. If(B9 ≟ 1, A9 + (1, 0), If[B9 ≟ 2, A9 + (0, 1), If[B9 ≟ 3, A9 + (-1, 0), A9 + (0, -1)]]) → A10
  22. If(B10 ≟ 1, A10 + (1, 0), If[B10 ≟ 2, A10 + (0, 1), If[B10 ≟ 3, A10 + (-1, 0), A10 + (0, -1)]]) → A11
  23. If(B11 ≟ 1, A11 + (1, 0), If[B11 ≟ 2, A11 + (0, 1), If[B11 ≟ 3, A11 + (-1, 0), A11 + (0, -1)]]) → A12
  24. If(B12 ≟ 1, A12 + (1, 0), If[B12 ≟ 2, A12 + (0, 1), If[B12 ≟ 3, A12 + (-1, 0), A12 + (0, -1)]]) → A13
  25. Segment(A1, A13) → a
  26. If(B1 ≟ 1, "E", If[B1 ≟ 2, "N", If[B1 ≟ 3, "W", "S"]]) → C1
  27. If(B2 ≟ 1, "E", If[B2 ≟ 2, "N", If[B2 ≟ 3, "W", "S"]]) → C2
  28. If(B3 ≟ 1, "E", If[B3 ≟ 2, "N", If[B3 ≟ 3, "W", "S"]]) → C3
  29. If(B4 ≟ 1, "E", If[B4 ≟ 2, "N", If[B4 ≟ 3, "W", "S"]]) → C4
  30. If(B5 ≟ 1, "E", If[B5 ≟ 2, "N", If[B5 ≟ 3, "W", "S"]]) → C5
  31. If(B6 ≟ 1, "E", If[B6 ≟ 2, "N", If[B6 ≟ 3, "W", "S"]]) → C6
  32. If(B7 ≟ 1, "E", If[B7 ≟ 2, "N", If[B7 ≟ 3, "W", "S"]]) → C7
  33. If(B8 ≟ 1, "E", If[B8 ≟ 2, "N", If[B8 ≟ 3, "W", "S"]]) → C8
  34. If(B9 ≟ 1, "E", If[B9 ≟ 2, "N", If[B9 ≟ 3, "W", "S"]]) → C9
  35. If(B10 ≟ 1, "E", If[B10 ≟ 2, "N", If[B10 ≟ 3, "W", "S"]]) → C10
  36. If(B11 ≟ 1, "E", If[B11 ≟ 2, "N", If[B11 ≟ 3, "W", "S"]]) → C11
  37. If(B12 ≟ 1, "E", If[B12 ≟ 2, "N", If[B12 ≟ 3, "W", "S"]]) → C12
  38. DotPlot(data) → list1
  39. PolyLine(A1, A2, A11, A12, A13, A3, A4, A5, A6, A7, A8, A9, A10) → c
  40. PolyLine((0, 0), (x(A13), 0), A13) → d

AI Drawing Prompt Reference

Demonstrate a random walk in the plane using taxicab distance to calculate path lengths. Start at the origin and move randomly one unit right, up, left, or down at each step, connecting these points to form a polyline. Color-code each move according to its direction (East, North, West, South). Finally, draw a straight line from the starting point to the endpoint to visualize the total path and directional changes.
The prompt above was compiled from the original drawing commands and is for reference only.