graph-theory

How to sample a scale-free graph

Given a large scale-free graph (a social network graph), what's the best way to sample it such that the sample retains an acceptable abstraction of the properties of the original? I have a large graph (Munmun's twitter dataset, if you know it). But I need a connected sample of that graph with a reasonably large diameter (tl;dr... reason...

Visualization of Graph Algorithms to teach about Djikstra's, Prim's, etc?

I'm trying to help undergrads visualize some basic graph algorithms, like Prim's and Djistra's. This audible representation of sorting algorithms got a great reaction. I'm looking around for something similar for graphs, but haven't been able to find anything yet. It would also be cool if I could find some app that would let me specify ...

Java recursion: pass by reference

I realize this is a hotly debated, controversial topic for Java programmers, but I believe my problem is somewhat unique. My algorithm REQUIRES pass by reference. I am doing a clockwise/counterclockwise pre-order traversal of a general tree (i.e. n-children) to assign virtual (x,y) coordinates. This simply means I count (and tag) the nod...

Graphs and version control

I have a directed graph data structure, where I am trying to implement individual version control for each vertex. This creates some interesting scenarios, and I would much appreciate any ideas that you guys have. Specifically, I am looking to resolve the default behavior of the system when encountering the stated scenarios. See the fol...

Maximum independent set in a tree. Review algorithm, need proof.

pseudocode: void recursive('k'){ // 'k' and 'i' vertices sumA = 0; sumB = 0; for each non visited 'i' neighbor do{ recursive('i'); sumA = sumA + b['i']; sumB = sumB + max(a['i'], b['i']); } a['k'] = 1 + sumA; b['k'] = sumB; } void main(){ a = b = 0; //initialize tables with 0 (zeros) recursive('X'); ...