What is the problem
You need to place ticks evenly on a line (including the start and end points) but do not have a ruler.
The difficulty of manually dividing a line is proportional to the size of the gap you have to “guess.” Dividing a line into 2 or 3 parts by eye is easy; dividing it into 7 or 11 is hard.
Using prime factorization ensures the largest “guess” you ever make is equal to the Largest Prime factor () of the number you are working with.
Before you begin
- Draw the line on which you’d place your ticks, 2 of the ticks will be placed at the very start and end.
The Strategy
To place ticks, you’ll subdivide the line using the prime factors of .
Why not ?
Since creating divisions is equivalent to placing ticks
- Find the prime factors of (also include their exponent) and highlight the largest factor.
- Divide the line recursively from the largest factor to the smallest. (a repeated factor simply translates into repeating its divison)
- you’re done =) (u now have ticks)
In case u haven't noticed
To place ticks you aren’t forced to work with the prime factors of .
It’s totally valid to instead work with the prime factors of or or (in general).
But don’t forget to remove the last ticks, since working with the prime factors of produces ticks, not .
Why switch?
Because sometimes has a lower LP than .
A smaller LP means the largest guess u ever have to make is smaller than what a larger LP would force u to do.
Example
Placing 7 Ticks ()
- The prime factors of 6 are 2, 3 (largest).
- (Factor 3): divide the total line into 3 equal regions.
- (Factor 2): Divide each of those regions into 2 equal parts.
- you’re done =) (u now have 7 ticks)