lubomir
Joined 14 years ago
Joined 14 years ago
Compare to Knuth-Pratt-Morris: http://www.cs.utexas.edu/users/moore/best-ideas/string-searc...
Invertibility: given any a, there is b such that a⋆b = b⋆a = e. For two different a's you get two different b's.
As example let G be a set of all strings and the operation is appending. There is element e == "". For any string a it holds that if you append empty string to any side, you get the original string back. However there is no inverse. You can not append two string to form an empty string. Apparently, strings with appending do not form a group.
Group example: let G be a set of all integers and the operation is addition. Then e is 0, as for all a it holds that a + 0 = 0 + a = a, and for each a you can find -a such that a + (-a) = (-a) + a = 0.
I had serious trouble with the demo, though. In order to figure out the switches at the top I had to dig in the code. Apparently when it displays off, it is actually on. A little color would help here.