I recently gave a little demonstration entitled "What is Defunctionalization?" for UCSC TWIGS (the acronym, stolen from a similar seminar in the the U. Mass. math department, stands for The "What Is … ?" Graduate Seminar). The inspiration for this talk was just to present what I'd learned after Conor McBride's brilliant presentation at […]
Filed under: Haskell, Mathematics, Reading by Kenn
No Comments »
The call is out for submissions to the next issue of The Monad.Reader! To get an idea of the content (and because Don Stewart told us all to read every past
issue) I cracked open Issue 10, which has a nice tutorial by B Pope on the GHCi debugger.
But having just finished a post using […]
Filed under: Haskell, Mathematics by Kenn
2 Comments »
As an exercise, since my reading group was discussing model checking this week, I implemented the classic model checker for CTL specifications from the 1986 paper
Automatic Verification of Concurrent Systems Using Temporal Logic Specifications by EM Clarke, EM Emerson, AP Sistla.
The "efficient algorithm" presented in the paper is, upon reflection, merely a memoized traversal of […]
Filed under: Haskell, Mathematics, Reading by Kenn
1 Comment »
I recently got a tablet to input handwritten math for slideshow presentations, but instead of using a note-taking program (Jarnal,
Xournal,
Gournal) I decided that I wanted the full power of image manipulation of a program like Gimp or Inkscape. Neither of these, though, has the level of support for multi-page documents that you find in […]
Filed under: Haskell, LaTeX, Linux, Mathematics by Kenn
4 Comments »
I'm reading the very fun Measure, Topology, and Fractal Geometry by GA Edgar, and thought I'd hack up some of the examples in Haskell. So this post implements cursor graphics in OpenGL in (I think) DSEL style, demonstrating the StateT and Writer monad gadgets from the
standard library and a cool "novel representation of lists" […]
Filed under: Haskell, Mathematics by Kenn
6 Comments »
This is a question posed in my randomized algorithms class. If you are routing in a network whose connectivity looks "more or less" like a convex figure, what does the congestion look like? A quick way to make an educated guess is to draw a bunch of random line segments in such a […]
Filed under: Haskell, Mathematics by Kenn
No Comments »
The Knuth-Bendix completion procedure (when it succeeds) transforms a
collection of equations into a confluent, terminating rewrite
system. Sometimes the procedure fails, and sometimes does not
terminate, but The Handbook of Computational Group Theory by D Holt
remarked that even in this case it generates an infinite set of
rewrite rules that are complete, and An Introduction to Knuth-Bendix
Completion […]
Filed under: Haskell, Mathematics by Kenn
No Comments »
Any isometry of the plane has a unique normal form as the composition of a translation, rotation and reflection. This note computes this normal form and tests the implementation using the QuickCheck automated testing tool for Haskell. To generate random test data, I use another characterization of isometries as products of up to three […]
Filed under: Haskell, Mathematics by Kenn
No Comments »
This note shows how to use OpenGL with Gtk in Haskell. The result is a little visualization to check our implementation of the classic iterative convex hull algorithm.
This post is a valid literate Haskell file so save it to something like ConvexHull.lhs and compile with ghc --make ConvexHull. What you see above […]
Filed under: Haskell, Mathematics by Kenn
1 Comment »