The Edit Distance Problem
rjlipton.wordpress.com
rjlipton.wordpress.com
Scammers tend to post identical or slightly altered messages to a large number of users. As you might expect, this has the effect of quickly polluting the valid ecosystem. The solution I employed was to delay sending messages between users long enough to capture spammer patterns and compare the messages to one another.
I use the Levenshtein distance algorithm (which has O(n^2) performance). If I get a similarity over a certain threshold. I quarantine the message for further analysis. To work around the performance, I bound the problem by capping the number of messages used for analysis.
It has been incredibly effective.
http://rjlipton.wordpress.com/2009/03/28/erds-and-the-quantu...
sexy stuff
"I have worked in the area of theory of computation since 1973. I find the whole area exciting and want to share some of that excitement with you."
Many times, interesting ideas which can be explained to a non-expert are scattered in countless papers and books, and it's hard for someone new in the field to put all the pieces together by himself. Thus, a blog seems a great idea:
* it's much faster and more informal than peer-reviewed publications.
* it allows one to communicate ideas to a broader audience.
* it allows one to have almost immediate feedback from the readers.
* it's open to everyone who happens to be interested!
I am hoping with a bit more effort I can understand the dynamic programming side of it better.
http://well-adjusted.de/mspace.py
For real usage, you would probably want to reimplement them with performance in mind (and in a different language), though. My implementation is dog slow. But on the plus side, it is very readable and heavily documented.
I know of other labs using edit distance to compare people's timelines (to estimate cost of shifting from one lifestyle to another). And the most widely use application of edit distances is in the comparison of any DNA/RNA/protein sequence for similarity, both for identification purposes and for the study of their evolution.