Math Rocks
Dec. 21st, 2007 07:27 pmI fear I've forgotten a large amount of the Pure Math that I learned in university. But recently I started trying to implement some code to efficiently draw directed graphs for use in software analysis -- I'm motivated by a tool that used to be called Pasta (and now has some lame name) which performs levelization/layerization on Java packages. But here's the question: how do you take a bunch of nodes and edges and draw a useful (and not overly-complicated) picture?
So I thought: there must be some well-known algorithms. I didn't have enough common terminology to find what I was looking for in some quick web searches, so I went to Amazon and Powells (but not Chapters/Indigo) and looked for books on graph drawing. They're all written as math texts, rather than, say, computer manuals. But the first book gave me some terminology to look up. That got me on to something called the Sugiyama algorithm for drawing directed graphs. And that got me into some papers. And a few more books.
So, today, I was trying to figure out how to handle cycles in my directed graph. I quizzed a coupl'a people at work about the problem, and there was some conceptual talk. One fellow suggested that Lakos' book might have an algorithm I could crib, but I haven't had time to look it up.
I was riding the bus home, today, with my copy of Graph Drawing and, sure enough, they provide a clear algorithm for handling cyclic dependencies in a directed graph. Math is cool.
It does seem, though, that finding details about graphing algorithms on the web is harder than finding code snippets. Why is that? I mean, I can track down a large number of solutions to bugs or software problems with 10 minutes worth of web searches; why is finding a meaningful description of the Sugiyama method so (comparatively) hard?
(no subject)
Date: 2007-12-22 11:48 am (UTC)