As a summer project, I have decided to practice basic algorithms and learn Haskell at the same time, by implementing large chunks of CLRS in Haskell.
Things are going pretty swimmingly, so far, but since I started graph algorithms, I've noticed a lack: test input and output! For example, I've implemented Floyd-Warshall's algorithm, and it seems to operate shiny, but I can't really figure out how to easily verify if it is actually correct! Same thing with Kruskal's, etc.
It is easy enough to make test cases in Python, but for anything large enough to be interesting (and perhaps contain a border case my code doesn't deal with), I can't really verify the answer. Finding all shortest paths, or an MST, of even a 40-vertex graph can be rather gut-wrenching by hand. :)
So, to restate the question title: is there an online repository for sample algorithm input, especially graphs? The larger the samples the better, and if it has input for other algorithms (FFT, Geometric Algorithms, etc.) that'd be swell too.
Note: formatting shouldn't be an issue, unless if the input's encrypted or something :).
Thanks! -Agor
Edit (perhaps, P.S.?)... A few notes raised by the current answers:
- I'm really looking for plaintext input and output examples. Automated testers online for contests are always appreciated, but I'd like to see what the correct output is, and they obviously don't do that.
- Graph algorithms are indeed the focus of this question, as they are the hardest (I think) to verify (please no snark about NP-Complete problems. :P). But I hope the title and explanation hasn't dissuaded anyone for posting example repositories for, say, dynamic programminng problems, or any other relatively complex examples!
(Second edit: updated tags, realized most were pretty inept, and this question doesn't really require haskell for an answer.)