views:

83

answers:

2

I am working on compressing graphs. The graph is represented as an adjacency list i.e each node in graph maintains a list of adjacent nodes. The lists contain Node_IDs(4 byte integers) and they are ordered by popularity of each Node_ID(score). So, I end with up unsorted list of Node_ID numbers and I have to compress them while maintaining their present order, to store efficiently.

+2  A: 

Something simple would be to do a basic Huffman Encoding on the Node_IDs or even sequences of Node_IDs and convert the most common one to take up a few bits and so on.

Zugwalt
A: 

If you can get anytime the scores by knowing the ID-s then you can store them in any order.

ruslik
No. The scores of ID's depend on the list, they are in. So, knowing just the ID can't get you the score.
rvijax