1

I am reading the paper about DC3 to construct suffix array. I am wondering why DC3 cannot be applied as DC2, so that the calculation will be faster?

yun wang
  • 11
  • 2

1 Answers1

1

For every two integers $a,b$, there is an integer $c\in\{0,1,2}$ such that $a+c$ and $b+c$ are both not divisible by $3$.

However, for the integers $a=0,b=1$, for every integer $c$, either $a+c$ is divisible by $2$, or $b+c$ is divisible by $2$.

This difference between divisibility by $2$ and by $3$ is what makes it necessary to work with $3$ and not with $2$ in the algorithm. Actually, every integer $k$ greater or equal to $3$ works (so it's best to work with $3$).

Shadow The GPT Wizard
  • 66,030
  • 26
  • 140
  • 208
shleg
  • 11
  • 1