'canonize' 函数(下面给出,来自 Ukkonen 的论文)是如何工作的,特别是 while 循环何时完成?我认为 p' - k' 的值将始终小于 p - k 的值。我是对还是错?
procedure canonize(s, (k, p)):
1. if p < k then return (s, k)
2. else
3. find the tk–transition g'(s, (k', p')) = s' from s;
4. while p' − k' <= p − k do
5. k = k + p' − k' + 1;
6. s = s';
7. if k <= p then find the tk–transition g'(s, (k', p')) = s' from s;
8. return (s, k).