A perfect ruler of length formula_1 is a ruler with integer markings formula_2, for which there exists an integer formula_3 such that any positive integer formula_4 is uniquely expressed as the difference formula_5 for some formula_6. This is referred to as an formula_3-perfect ruler. An optimal perfect ruler is one of the smallest length for fixed values of formula_3 and formula_9. Example. A 4-perfect ruler of length formula_10 is given by formula_11. To verify this, we need to show that every positive integer formula_12 is uniquely expressed as the difference of two markings: formula_13 formula_14 formula_15 formula_16