Skip to main content

Approximating Rational Numbers by Fractions

  • Conference paper
Fun with Algorithms (FUN 2007)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 4475))

Included in the following conference series:

Abstract

In this paper we show a polynomial-time algorithm to find the best rational approximation of a given rational number within a given interval. As a special case, we show how to find the best rational number that after evaluating and rounding exactly matches the input number. In both results, “best” means “having the smallest possible denominator”.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Beiler, A.H.: Farey Tails. Ch. 16 in Recreations in the Theory of Numbers: The Queen of Mathematics Entertains. Dover, New York (1966)

    MATH  Google Scholar 

  2. Brocot, A.: Calcul des rouages par approximation, nouvelle methode. Revue Chronométrique 6, 186–194 (1860)

    Google Scholar 

  3. Farey, J.: On a Curious Property of Vulgar Fractions. London, Edinburgh and Dublin Phil. Mag. 47, 385 (1816)

    Google Scholar 

  4. Forišek, M.: IPSC task Exact? Approximate! [accessed January 2007], http://ipsc.ksp.sk/contests/ipsc2005/real/problems/e.php

  5. Graham, R.L., Knuth, D.E., Patashnik, O.: Concrete Mathematics: A Foundation for Computer Science, 2nd edn. Addison-Wesley Professional, London (1994)

    MATH  Google Scholar 

  6. Hardy, G.H., Wright, E.M.: Farey Series and a Theorem of Minkowski. In: An Introduction to the Theory of Numbers, 5th edn. ch. 3, pp. 23–37. Clarendon Press, Oxford England (1979)

    Google Scholar 

  7. Knuth, D.E.: How Fast Can We Multiply? In: Sec. 4.3.3 in The Art of Computer Programming II, Addison-Wesley Professional, London (1997)

    Google Scholar 

  8. The MathWorks, Inc.: MATLAB Function Reference: rat, rats accessed (January 2007) http://www.mathworks.com/access/helpdesk/help/techdoc/ref/rat.html

  9. Stern, M.A.: Ueber eine zahlentheoretische Funktion. Journal für die reine und angewandte Mathematik 55, 193–220 (1858)

    Article  MathSciNet  Google Scholar 

  10. Wolfram Research, Inc.: Mathematica 5.2 Documentation: Numerical Precision accessed (January 2007), http://documents.wolfram.com/mathematica/book/section-3.1.4

  11. Wolfram Research, Inc.: Mathematica 5.2 Documentation: Rationalize (January 2007), accessed http://documents.wolfram.com/mathematica/functions/Rationalize

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2007 Springer Berlin Heidelberg

About this paper

Cite this paper

Forišek, M. (2007). Approximating Rational Numbers by Fractions. In: Crescenzi, P., Prencipe, G., Pucci, G. (eds) Fun with Algorithms. FUN 2007. Lecture Notes in Computer Science, vol 4475. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-72914-3_15

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-72914-3_15

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-72913-6

  • Online ISBN: 978-3-540-72914-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics