Skip to main content
edited tags
Link
Alexey Ustinov
  • 12.3k
  • 7
  • 87
  • 119
edited title
Link
soupy
  • 423
  • 2
  • 7

Number Average number of iterations for the Euclidean algorithm to terminate

Source Link
soupy
  • 423
  • 2
  • 7

Number of iterations for the Euclidean algorithm to terminate

Let $N$ be a positive integer and $0 \leq s < N$. We try to divide $s$ into $N$ using the Euclidean algorithm:

$N = q_1 s + r_1 $

$r = q_2 r_1 + r_2 $

$\vdots$

$r_{K-1} = q_{K-1} r_K$

If we choose $-r_{i-1}/2 \leq r_i < r_{i-1}/2$, I think this determines the $q_i$'s uniquely, but I don't think this matters for my question.

For a fixed $N$ and $0 \leq s < N$, define $K_s$ to be the number of iterations before the Euclidean algorithm terminates, (i.e. $K$ in the instance written above).

Are there existing tools to characterize $$ \frac{1}{N} \sum_{0 \leq s < N} K_s, $$ for a given $N$?