tag:blogger.com,1999:blog-5195188167565410449.post3444459781535837747..comments2014-03-09T17:09:45.698ZComments on Haskell for Maths: String rewriting and Knuth-Bendix completionDavidAhttp://www.blogger.com/profile/16359932006803389458noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-5195188167565410449.post-14335722781161565332010-06-18T15:07:12.077+01:002010-06-18T15:07:12.077+01:00Regarding knuthBendix1 [("abc","x&q...Regarding knuthBendix1 [("abc","x"),("b","y")]:<br /><br />So in the post, I took a few shortcuts in order to avoid cluttering the presentation with details. You can think of knuthBendix1 as implementing the "inner" Knuth-Bendix algorithm. For a full implementation, you should pre-process the inputs in two ways:<br />1. Make sure that each rule is the right way round - ie going from greater to lesser in shortlex order<br />2. Make sure that all the rules are reduced with respect to one another<br /><br />In your example, the problem is that the the b -> y rule is the wrong way round - it should be y -> b.<br />If we look at the similar example xyz -> a, y -> b, then this has the problem that the first rule is not reduced with respect to the second - it should be xbz -> a.<br /><br />Instead of knuthBendix1, you are recommended to use knuthBendix, because<br />i. It is faster<br />ii. It solves problem 2 for you<br />iii. In the next release (0.2.2), it will also solve problem 1 for you.DavidAhttp://www.blogger.com/profile/16359932006803389458noreply@blogger.comtag:blogger.com,1999:blog-5195188167565410449.post-44876943407609080982010-06-07T04:03:00.258+01:002010-06-07T04:03:00.258+01:00Isn't it strange for
knuthBendix1 [("abc...Isn't it strange for<br /><br />knuthBendix1 [("abc","x"),("b","y")]<br /><br />to give the same rules<br /><br />[("abc","x"),("b","y")]<br /><br />back?單中杰http://www.blogger.com/profile/14754929367418830739noreply@blogger.comtag:blogger.com,1999:blog-5195188167565410449.post-45705092483052050362010-05-30T01:49:35.098+01:002010-05-30T01:49:35.098+01:00Great post. I had to concentrate but I think I got...Great post. I had to concentrate but I think I got all of it :). And thanks for writing the Haskell for maths library.jberrymanhttp://www.blogger.com/profile/11505410150377453045noreply@blogger.com