## Computing Order Statistics in the Farey Sequence

Citations: | 1 - 0 self |

### BibTeX

@MISC{Pǎtra¸scu_computingorder,

author = {Corina E. Pǎtra¸scu},

title = {Computing Order Statistics in the Farey Sequence},

year = {}

}

### OpenURL

### Abstract

Abstract. We study the problem of computing the k-th term of the Farey sequence of order n, for given n and k. Several methods for generating the entire Farey sequence are known. However, these algorithms require at least quadratic time, since the Farey sequence has Θ(n 2) elements. For the problem of finding the k-th element, we obtain an algorithm that runs in time O(n lg n) and uses space O ( √ n). The same bounds hold for the problem of determining the rank in the Farey sequence of a given fraction. A more complicated solution can reduce the space to O(n 1/3 (lg lg n) 2/3), and, for the problem of determining the rank of a fraction, reduce the time to O(n). We also argue that an algorithm with running time O(poly(lg n)) is unlikely to exist, since that would give a polynomial-time algorithm for integer factorization. 1

### Citations

676 |
The Art of Computer Programming: Volume 2, Seminumerical Algorithms
- Knuth
- 1969
(Show Context)
Citation Context ...uces to calculating µ(t) for all t ≤ n5/6 . In turn, calculating µ(t) is trivial if we have the prime factorization of t. There exist several factorization algorithms which can factor t in to(1) time =-=[6]-=-, so we obtain a running time of n5/6+o(1) for calculating all coefficients. The dominant factor in space usage is the space used by a call to the subroutine for calculating M(r), which is O(n1/3 (lg ... |

508 |
Concrete Mathematics: A Foundation for Computer Science
- Graham, Knuth, et al.
- 1990
(Show Context)
Citation Context ...ecial fractions. For example, the Farey sequence for n = 5 is: 1 1 1 2 1 3 2 3 4 5 , 4 , 3 , 5 , 2 , 5 , 3 , 4 , 5 . The number of elements of the Farey sequence is asymptotically 3 π2 n2 + O(n lg n) =-=[5]-=-. The Farey sequence is a well-known concept in number theory, whose exploration has lead to a number of interesting results. However, from an algorithmic point of view, very little is known. In parti... |

319 |
Introduction to Algorithms, 2 nd edition
- Cormen, Leiserson, et al.
- 2001
(Show Context)
Citation Context ...n addition to that of generating the entire Farey sequence. For given n and k, our problem is to generate just the k-th element of the Farey sequence of order n (often called the k-th order statistic =-=[2]-=-). Our motivation is not based on any practical application of this problem (we are aware of none), but rather on the algorithmic challenges it presents. It seems impossible to obtain good, or even ju... |

25 |
Algorithmic Number Theory, Volume I: Efficient Algorithms
- Bach, Shallit
- 1996
(Show Context)
Citation Context ...ts the existence of an algorithm with running time sublinear in n. For somewhat related problems, such as computing the number of primes less than a certain value, sublinear time algorithms are known =-=[1]-=-. It seems reasonable to hope that the running time of the algorithm from section 5 can be improved to O(n 1−ε ), for some constant ε > 0. We describe two subproblems which would be sufficient to obta... |

8 |
On a curious property of vulgar fractions
- Farey
(Show Context)
Citation Context ... the sequence of order n, and insert the mediant fraction a+c b+d between them, if the denominator is n + 1 [5]. This surprising construction is based on the initial observation made by Farey in 1816 =-=[4]-=-. The resulting algorithm is the worst so far: the running time is O(n3 ), and the space is O(n2 ). – Combining several properties satisfied by Farey sequence, one can get a trivial iterative algorith... |

1 |
Computing the Summation
- Deléglise, Rivat
- 1996
(Show Context)
Citation Context ...say O(n · poly(lg n)), running time. In particular, reducing the memory to poly(lg n) would be interesting. In section 5, we present a more complex algorithm, based on a result of Deléglise and Rivat =-=[3]-=-, which uses space O(n 1/3 (lg lg n) 2/3 ). The algorithm can determine the rank of a fraction in O(n) time; for our original problem (finding a fraction of a given rank) the O(n lg n) time bound is n... |

1 |
Provocarea algoritmilor (in Romanian
- Mitrana
(Show Context)
Citation Context ...d in generating the fractions, not storing them; otherwise, quadratic space is clearly the best possible.) – The space in the above algorithm can be reduced to O(n), without changing the running time =-=[7]-=-. This uses a priority queue to merge n sequences, where the i-th such sequence is 1 2 i−1 i , i , . . . , i .– To obtain the sequence of order n + 1 from the sequence of order n, consider all consec... |