Thomae's function

From testwiki
Jump to navigation Jump to search

Template:Short description

Point plot on the interval (0,1). The topmost point in the middle shows f(1/2) = 1/2

Thomae's function is a real-valued function of a real variable that can be defined as:[1]Template:Rp f(x)={1qif x=pq(x is rational), with p and q coprime0if x is irrational.

It is named after Carl Johannes Thomae, but has many other names: the popcorn function, the raindrop function, the countable cloud function, the modified Dirichlet function, the ruler function (not to be confused with the integer ruler function),[2] the Riemann function, or the Stars over Babylon (John Horton Conway's name).[3] Thomae mentioned it as an example for an integrable function with infinitely many discontinuities in an early textbook on Riemann's notion of integration.[4]

Since every rational number has a unique representation with coprime (also termed relatively prime) p and q, the function is well-defined. Note that q=+1 is the only number in that is coprime to p=0.

It is a modification of the Dirichlet function, which is 1 at rational numbers and 0 elsewhere.

Properties

Template:Unordered list

Empirical probability distributions related to Thomae's function appear in DNA sequencing.[5] The human genome is diploid, having two strands per chromosome. When sequenced, small pieces ("reads") are generated: for each spot on the genome, an integer number of reads overlap with it. Their ratio is a rational number, and typically distributed similarly to Thomae's function.

If pairs of positive integers m,n are sampled from a distribution f(n,m) and used to generate ratios q=n/(n+m), this gives rise to a distribution g(q) on the rational numbers. If the integers are independent the distribution can be viewed as a convolution over the rational numbers, g(a/(a+b))=t=1f(ta)f(tb). Closed form solutions exist for power-law distributions with a cut-off. If f(k)=kαeβk/Liα(eβ) (where Liα is the polylogarithm function) then g(a/(a+b))=(ab)αLi2α(e(a+b)β)/Liα2(eβ). In the case of uniform distributions on the set {1,2,,L} g(a/(a+b))=(1/L2)L/max(a,b), which is very similar to Thomae's function.[5]

The ruler function

Template:Main For integers, the exponent of the highest power of 2 dividing n gives 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, ... Template:OEIS. If 1 is added, or if the 0s are removed, 1, 2, 1, 3, 1, 2, 1, 4, 1, 2, 1, 3, 1, 2, 1, ... Template:OEIS. The values resemble tick-marks on a 1/16th graduated ruler, hence the name. These values correspond to the restriction of the Thomae function to the dyadic rationals: those rational numbers whose denominators are powers of 2.

A natural follow-up question one might ask is if there is a function which is continuous on the rational numbers and discontinuous on the irrational numbers. This turns out to be impossible. The set of discontinuities of any function must be an [[Fσ set|Template:Math set]]. If such a function existed, then the irrationals would be an Template:Math set. The irrationals would then be the countable union of closed sets i=0Ci, but since the irrationals do not contain an interval, neither can any of the Ci. Therefore, each of the Ci would be nowhere dense, and the irrationals would be a meager set. It would follow that the real numbers, being the union of the irrationals and the rationals (which, as a countable set, is evidently meager), would also be a meager set. This would contradict the Baire category theorem: because the reals form a complete metric space, they form a Baire space, which cannot be meager in itself.

A variant of Thomae's function can be used to show that any Template:Math subset of the real numbers can be the set of discontinuities of a function. If A=n=1Fn is a countable union of closed sets Fn, define fA(x)={1nif x is rational and n is minimal so that xFn1nif x is irrational and n is minimal so that xFn0if xA

Then a similar argument as for Thomae's function shows that fA has A as its set of discontinuities.

See also

References

Template:Reflist Template:Refbegin

Template:Refend