Thomae's function: Difference between revisions

Content deleted Content added
m wikilink
No edit summary
Tags: Mobile edit Mobile web edit Advanced mobile edit
Line 3:
 
'''Thomae's function''' is a [[real number|real]]-valued [[function (mathematics)|function]] of a real variable that can be defined as:<ref>{{Harvnb|Beanland|Roberts|Stevenson|2009|p=531}}</ref>
:<math display="block">f(x) =
 
:<math>f(x) =
\begin{cases}
\frac{1}{q} &\text{if }x = \tfrac{p}{q}\quad (x \text{ is rational), with } p \in \mathbb Z \text{ and } q \in \mathbb N \text{ coprime}\\
0 &\text{if }x \text{ is irrational.}
\end{cases}</math>
</math>
 
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''',<ref>"…the...the so-called ''ruler function'', a simple but provocative example that appeared in a work of Johannes Karl Thomae ... The graph suggests the vertical markings on a ruler—hence the name." {{Harv|Dunham|2008|p=149|loc=chapter 10}}</ref> the '''Riemann function''', or the '''Stars over Babylon''' ([[John Horton Conway]]'s name).<ref>{{cite web |url=http://mathforum.org/kb/message.jspa?messageID=1375516
|title=Topic: Provenance of a function
|author=John Conway
Line 18 ⟶ 16:
|archivedate=13 June 2018}}</ref> Thomae mentioned it as an example for an integrable function with infinitely many discontinuities in an early textbook on Riemann's notion of integration.<ref>{{Harvnb|Thomae|1875|p=14|loc=§20}}</ref>
 
Since every [[rational number]] has a unique representation with [[coprime integers|coprime]] (also termed relatively prime) <math>p \in \mathbb Z</math> and <math>q \in \mathbb N</math>, the function is [[well-defined]]. Note that <math>q = +1</math> is the only number in <math>\mathbb N</math> that is coprime to <math>p = 0.</math>
 
It is a modification of the [[Dirichlet function]], which is 1 at rational numbers and 0 elsewhere.
 
==Properties==
*Thomae's function <math>f</math> is [[Bounded function|'''bounded''']] and maps all real numbers to the [[unit interval]]:<math>\;f: \mathbb R\; \rightarrowto \;[0,\; 1].</math>
*<math>f</math> is [[periodic function|'''periodic''']] with period <math>1:\; f(x + n) = f(x)</math> for all [[integer]]s {{mvar|n}} and all real {{mvar|x}}.
{{Collapse top|title=Proof of periodicity|width=80%}}
For all <math>x \in \mathbb R \smallsetminussetminus \mathbb Q,</math> we also have <math>x+n \in \mathbb R \smallsetminussetminus \mathbb Q</math> and hence <math>f(x+n) = f(x)= 0,</math>
 
For all <math>x \in \mathbb Q,\;</math> there exist <math>p \in \mathbb Z</math> and <math>q \in \mathbb N</math> such that <math>\;x = p/q,\;</math> and <math>\gcd(p,\;q) = 1.</math>
Line 45 ⟶ 43:
These <math>x_n</math> are all irrational, and so <math>f(x_n) = 0</math> for all <math>n \in \mathbb N.</math>
 
This implies <math>|x_0 - x_n| = \frac{\alpha}{n},\quad </math> and <math>\quad |f(x_0) - f(x_n)| = \frac{1}{q}.</math>
 
Let <math>\;\varepsilon = 1/q\;</math>, and given <math>\delta > 0</math> let <math>n = 1 + \left\lceil\frac{\alpha}{\delta }\right\rceil.</math> For the corresponding <math>\;x_n</math> we have
:<math display="block">|f(x_0) - f(x_n)|= 1/q \ge \varepsilon\quad</math> and
<math display="block">|x_0 - x_n| = \frac{\alpha}{n} = \frac{\alpha}{1 + \left\lceil\frac{\alpha}{\delta}\right\rceil} < \frac{\alpha}{\left\lceil\frac{\alpha}{\delta}\right\rceil} \le \delta,</math>
 
<math>|x_0 - x_n| = \frac{\alpha}{n} = \frac{\alpha}{1 + \left\lceil\frac{\alpha}{\delta}\right\rceil} < \frac{\alpha}{\left\lceil\frac{\alpha}{\delta}\right\rceil} \le \delta,</math>
 
which is exactly the definition of discontinuity of <math>f</math> at <math>x_0</math>.
Line 106 ⟶ 103:
Empirical probability distributions related to Thomae's function appear in [[DNA sequencing]].<ref name="Trifonov">{{cite journal |last1=Trifonov |first1=Vladimir |last2=Pasqualucci |first2=Laura |last3=Dalla-Favera |first3=Riccardo |last4=Rabadan |first4=Raul |year=2011 |title=Fractal-like Distributions over the Rational Numbers in High-throughput Biological and Clinical Data |journal=Scientific Reports |volume=1 |number=191 |page=191 |doi=10.1038/srep00191 |pmid=22355706 |pmc=3240948|arxiv=1010.4328 |bibcode=2011NatSR...1E.191T }}</ref> 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 <math>m,n</math> are sampled from a distribution <math>f(n,m)</math> and used to generate ratios <math>q=n/(n+m)</math>, this gives rise to a distribution <math>g(q)</math> on the rational numbers. If the integers are independent the distribution can be viewed as a [[convolution]] over the rational numbers, <math display="inline">g(a/(a+b)) = \sum_{t=1}^\infty f(ta)f(tb)</math>. Closed form solutions exist for [[power-law]] distributions with a cut-off. If <math>f(k) =k^{-\alpha} e^{-\beta k}/\mathrm{Li}_\alpha(e^{-\beta})</math> (where <math>\mathrm{Li}_\alpha</math> is the [[polylogarithm]] function) then <math>g(a/(a+b)) = (ab)^{-\alpha} \mathrm{Li}_{2\alpha}(e^{-(a+b)\beta})/\mathrm{Li}^2_{\alpha}(e^{-\beta})</math>. In the case of uniform distributions on the set <math>\{1,2,\ldots , L\}</math> <math>g(a/(a+b)) = (1/L^2) \lfloor L/\max(a,b) \rfloor</math>, which is very similar to Thomae's function.<ref name="Trifonov" />
 
==The ruler function==
Line 114 ⟶ 111:
==Related functions==
 
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|{{math|''F''<sub>σ</sub>}} set]]. If such a function existed, then the irrationals would be an {{math|''F''<sub>σ</sub>}} set. The irrationals would then be the [[countable set|countable]] [[union (set theory)|union]] of [[closed set]]s <math display="inline">\textstyle\bigcup_{i = 0}^\infty C_i</math>, but since the irrationals do not contain an interval, neither can any of the <math>C_i</math>. Therefore, each of the <math>C_i</math> 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 {{math|''F''<sub>σ</sub>}} subset of the real numbers can be the set of discontinuities of a function. If <math> A =\textstyle \bigcup_{n=1}^{\infty}F_n</math> is a countable union of closed sets <math> F_n</math>, define
 
A variant of Thomae's function can be used to show that any {{math|''F''<sub>σ</sub>}} subset of the real numbers can be the set of discontinuities of a function. If <math display="inline"> A =\textstyle \bigcup_{n=1}^{\infty} F_n</math> is a countable union of closed sets <math> F_n</math>, define
:<math display="block">f_A(x) = \begin{cases}
\frac{1}{n} & \text{if } x \text{ is rational and } n \text{ is minimal so that } x \in F_n\\
-\frac{1}{n} & \text{if } x \text{ is irrational and } n \text{ is minimal so that } x \in F_n\\