Skip to main content

Project: Cyclic Probe Audit

Build a small report around the supplied CLI: starting at slot zero, repeatedly add a stride modulo the number of slots. The user needs to know whether a target is reachable and when the cycle repeats.

Required cases: one coprime stride, one stride sharing a nontrivial gcd with the cycle size, one unreachable target, and one signed stride. For each, predict the cycle length m/gcd(a,m) and the complete canonical solution list before running your code. State that actual nonnegative times repeat these representatives with period m, or more compactly use the first solution plus multiples of m/gcd(a,m).

Provide a small independently simulated walk, your theorem-based result, and a written argument that agreement is expected. Explain why a method that returns just one valid time is incomplete under the lab API. Include a failed-cancellation example and an honest arithmetic-operation versus bit-cost discussion.

Deliver code, reproducible commands, expected results, proof, one repaired defect and a changed-stride case. A terminal report is sufficient; no GUI is required. This work is included in the module's 6–8 lab/project hours and reused at the semester checkpoint rather than assigned again.

Forward connection: a probe stride with the wrong gcd may visit only part of a table. Visiting every slot still does not prove that the hash function distributes keys uniformly. Carry that distinction into Semester 02 data structures.