How much precision is needed to compare two sums of square roots of integers?

  • Authors:
  • Jianbo Qian;Cao An Wang

  • Affiliations:
  • Department of Computer Science, University of Waterloo, Ontario, Canada;Department of Computer Science, Memorial University of Newfoundland, Newfoundland, Canada

  • Venue:
  • Information Processing Letters
  • Year:
  • 2006

Quantified Score

Hi-index 0.89

Visualization

Abstract

In this paper, we investigate the problem of the minimum nonzero difference between two sums of square roots of integers. Let r(n, k) be the minimum positive value of |Σi=1k √ai-Σi=1k√bi| where ai and bi are integers not larger than integer n. We prove by an explicit construction that r(n,k) = O(n-2k+3/2) for fixed k and any n. Our result implies that in order to compare two sums of k square roots of integers with at most d digits per integer, one might need precision of as many as (2k - 3/2)d digits. We also prove that this bound is optimal for a wide range of integers, i.e., r(n, k) = Θ(n-2k+3/2) for fixed k and for those integers in the form of ai = (2k-1 2i)2(n' + 2i) and bi = (2k-1 2i+1)2 (n' + 2i + 1), where n' is any integer satisfied the form and i is any integer in [0, k-1]. We finally show that for k = 2 and any n, this bound is also optimal, i.e., r(n, 2) = Θ(n-7/2).