News for hackers. Stuff that matters.
Re:Divisibility by 7 is a Walk on a Graph - how does it work? by robinhouston on Monday April 30, 2012 @02:27PM (#3910594)
If you want regular expressions for divisibility, here’s the little toy I made last time this came up on HN: http://s3.boskent.com/divisibility-regex/divisibility-regex....

You can do any number in any base up to 36 (subject to limitations of patience and available RAM, naturally).

The resulting regular expressions are not terribly friendly. You have to remember that converting a DFA to a regex can lead to exponential blow-up in size.

There are no comments on this comment yet.