Regarding the people->objects/objects->people performance issue. Why not have a linked list of people for each object as well? So to see who has a specific object, just iterate over that object's list of people. This could be updated at the same time as an individual person's object list is updated. On the sparse matrix idea, you can use a sparse graph. To see who knows whom, you would use the connected components algorithm: en.wikipedia.org/wiki/Connected_component_(graph_theory)
↧