# ruler function

The ruler function $f$ on the real line is defined as follows:

 $f(x)=\left\{\begin{array}[]{ll}0,&\hbox{x is irrational;}\\ 1/n,&\hbox{x=m/n, m and n are relatively primes}.\end{array}\right.$ (1)

Given a rational number $\frac{m}{n}$ in lowest terms, $n$ positive, the ruler function outputs the size (length) of a piece resulting from equally subdividing the unit interval into $n$, the number in the denominator, parts. It “ignores” inputs of irrational functions, sending them to 0.

The ruler function is so termed because it resembles a ruler. The following picture might be helpful: if $\frac{m}{n}$ in lowest terms is a reasonably small rational number (which we assume positive). Then it can be “read off” on a ruler whose intervals of one unit size are each equally subdivided into $n$ parts measuring $\frac{1}{n}$ units each by

1. 1.

running one’s finger through until the integer preceding it and then

2. 2.

running through to the subsequent $r$th subunit, “left-over” from the division of $m$ by $n$.

On the other hand, an irrational number can not be read off from any ruler no matter how fine we subdivide a unit interval in any ruler.

## References

Title ruler function RulerFunction 2013-03-22 18:23:55 2013-03-22 18:23:55 yesitis (13730) yesitis (13730) 5 yesitis (13730) Definition msc 26A99