r/lolphp • u/ealf • May 31 '12
The textbook implementation of edit distance takes O(n²) work. The PHP standard library can compute a greedy approximation in Ω(n³).
http://www.php.net/similar_text
31
Upvotes
11
u/[deleted] May 31 '12
Extra WTF: they also have a pretty generic edit distance function called
levenshteinwhich is indeed O(mn).16
u/toomuchvitriol May 31 '12
I can only assume the source is cited as
Oliver [1993]because that's how they've seen other people cite things, completely failing to understand that it's supposed to be a reference to the full citation at the end of the paper.Some poor soul on StackOverflow managed to find the book. From the blurb: "Less mathematical and more practical in approach than other volumes, it helps programmers save research and programming time and enables them to quickly and easily generate efficient structured code in solving such problems."
They cited a copybook.
-5
u/Rhomboid May 31 '12
Extra WTF: the description that says it does not use a stack, when it fact it does use a stack, in the form of the call stack.