10.07.2015 Views

A linear-time algorithm to compute geodesics in ... - Project Euclid

A linear-time algorithm to compute geodesics in ... - Project Euclid

A linear-time algorithm to compute geodesics in ... - Project Euclid

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

116 M. ELDERHere we show List A for the <strong>in</strong>put word at 2 atat −1 at −1 at −1 ata ···,andthecorrespond<strong>in</strong>g List B, as an example.List A↓column 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ···word S a t t a t a t −1 a t −1 a t −1 a t at-exp 1 2 3 2 1 0 1<strong>to</strong> 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15from 0 1 2 3 4 5 6 7 8 9 10 11 12 13List Bt-exp ··· −6 −5 −4 −3 −2 −1 0 1 2 3 4 5 6 ···strike 1 11 2 3 5strike 2 9 7strike 3 13When an entry occurs <strong>in</strong> the last row of List B at some position labeledtexp, mean<strong>in</strong>g the same exponent has occurred 3 <strong>time</strong>s , then we have a prefixof the form either NPNP or PNPN, so we apply Corollary 2 as follows.Suppose the entries <strong>in</strong> this column are p a ,p b ,p 3 ,withp 3 the most recentlyadded. These correspond <strong>to</strong> the positions <strong>in</strong> List A where the value texp haveappeared.To beg<strong>in</strong> with, the word written <strong>in</strong> row 2 of List A appears <strong>in</strong> the correc<strong>to</strong>rder (from left <strong>to</strong> right), the po<strong>in</strong>ters have only been used <strong>to</strong> possibly skipblank addresses. So at the start of this step we know that p a comes before p b .However, as the <strong>algorithm</strong> progresses, we will not know which of p a and p bcomes first <strong>in</strong> the word. That is, as we <strong>in</strong>troduce po<strong>in</strong>ters <strong>to</strong> List A <strong>to</strong> movesubwords around, a letter <strong>in</strong> column p could sit before a letter <strong>in</strong> column qwith q

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!