Random Walks in the Plane Taxicab Distance
Loading the math board and drawing, please wait…
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
Random(1, 4) → B1Random(1, 4) → B2Random(1, 4) → B3Random(1, 4) → B4Random(1, 4) → B5Random(1, 4) → B6Random(1, 4) → B7Random(1, 4) → B8Random(1, 4) → B9Random(1, 4) → B10Random(1, 4) → B11Random(1, 4) → B12If(B1 ≟ 1, A1 + (1, 0), If[B1 ≟ 2, A1 + (0, 1), If[B1 ≟ 3, A1 + (-1, 0), A1 + (0, -1)]]) → A2If(B2 ≟ 1, A2 + (1, 0), If[B2 ≟ 2, A2 + (0, 1), If[B2 ≟ 3, A2 + (-1, 0), A2 + (0, -1)]]) → A3If(B3 ≟ 1, A3 + (1, 0), If[B3 ≟ 2, A3 + (0, 1), If[B3 ≟ 3, A3 + (-1, 0), A3 + (0, -1)]]) → A4If(B4 ≟ 1, A4 + (1, 0), If[B4 ≟ 2, A4 + (0, 1), If[B4 ≟ 3, A4 + (-1, 0), A4 + (0, -1)]]) → A5If(B5 ≟ 1, A5 + (1, 0), If[B5 ≟ 2, A5 + (0, 1), If[B5 ≟ 3, A5 + (-1, 0), A5 + (0, -1)]]) → A6If(B6 ≟ 1, A6 + (1, 0), If[B6 ≟ 2, A6 + (0, 1), If[B6 ≟ 3, A6 + (-1, 0), A6 + (0, -1)]]) → A7If(B7 ≟ 1, A7 + (1, 0), If[B7 ≟ 2, A7 + (0, 1), If[B7 ≟ 3, A7 + (-1, 0), A7 + (0, -1)]]) → A8If(B8 ≟ 1, A8 + (1, 0), If[B8 ≟ 2, A8 + (0, 1), If[B8 ≟ 3, A8 + (-1, 0), A8 + (0, -1)]]) → A9If(B9 ≟ 1, A9 + (1, 0), If[B9 ≟ 2, A9 + (0, 1), If[B9 ≟ 3, A9 + (-1, 0), A9 + (0, -1)]]) → A10If(B10 ≟ 1, A10 + (1, 0), If[B10 ≟ 2, A10 + (0, 1), If[B10 ≟ 3, A10 + (-1, 0), A10 + (0, -1)]]) → A11If(B11 ≟ 1, A11 + (1, 0), If[B11 ≟ 2, A11 + (0, 1), If[B11 ≟ 3, A11 + (-1, 0), A11 + (0, -1)]]) → A12If(B12 ≟ 1, A12 + (1, 0), If[B12 ≟ 2, A12 + (0, 1), If[B12 ≟ 3, A12 + (-1, 0), A12 + (0, -1)]]) → A13Segment(A1, A13) → aIf(B1 ≟ 1, "E", If[B1 ≟ 2, "N", If[B1 ≟ 3, "W", "S"]]) → C1If(B2 ≟ 1, "E", If[B2 ≟ 2, "N", If[B2 ≟ 3, "W", "S"]]) → C2If(B3 ≟ 1, "E", If[B3 ≟ 2, "N", If[B3 ≟ 3, "W", "S"]]) → C3If(B4 ≟ 1, "E", If[B4 ≟ 2, "N", If[B4 ≟ 3, "W", "S"]]) → C4If(B5 ≟ 1, "E", If[B5 ≟ 2, "N", If[B5 ≟ 3, "W", "S"]]) → C5If(B6 ≟ 1, "E", If[B6 ≟ 2, "N", If[B6 ≟ 3, "W", "S"]]) → C6If(B7 ≟ 1, "E", If[B7 ≟ 2, "N", If[B7 ≟ 3, "W", "S"]]) → C7If(B8 ≟ 1, "E", If[B8 ≟ 2, "N", If[B8 ≟ 3, "W", "S"]]) → C8If(B9 ≟ 1, "E", If[B9 ≟ 2, "N", If[B9 ≟ 3, "W", "S"]]) → C9If(B10 ≟ 1, "E", If[B10 ≟ 2, "N", If[B10 ≟ 3, "W", "S"]]) → C10If(B11 ≟ 1, "E", If[B11 ≟ 2, "N", If[B11 ≟ 3, "W", "S"]]) → C11If(B12 ≟ 1, "E", If[B12 ≟ 2, "N", If[B12 ≟ 3, "W", "S"]]) → C12DotPlot(data) → list1PolyLine(A1, A2, A11, A12, A13, A3, A4, A5, A6, A7, A8, A9, A10) → cPolyLine((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.