[clug] Substring repetition detection

Kim Holburn kim.holburn at anu.edu.au
Wed Jun 25 16:23:02 EST 2003


At 4:02 PM +1000 03/6/25, Michael Still wrote:
>[ Before anyone asks, this isn't my school home work ]
>
>Imagine I have a string:
>
>abcdefghdefghdefghijk
>
>I would like an algorithm to turn this into
>
>a
>b
>c
>defgh * 3
>i
>j
>k
>
>In other words, I'm interested in an algorithm which can detect repetitive
>substrings. The repetitions are always consecutive (otherwise I don't
>care). The repetitions can however be of varying length.
>
>Anyways, I can't think of a good answer. Any hints?

gzip - only problem getting the results uncompressed!!

>
>Thanks,
>Mikal
>
>--
>
>Michael Still (mikal at stillhq.com) | Stage 1: Steal underpants
>http://www.stillhq.com            | Stage 2: ????
>UTC + 10                          | Stage 3: Profit


-- 
--
Kim Holburn 
Network Consultant - Telecommunications Engineering
Research School of Information Sciences and Engineering
Australian National University - Ph: +61 2 61258620 M: +61 0417820641
Email: kim.holburn at anu.edu.au  - PGP Public Key on request

Life is complex - It has real and imaginary parts.
     Andrea Leistra (rec.arts.sf.written.Robert-jordan)



More information about the linux mailing list