I'd agree with this; the matrix approach I'd go with is an incidence one, which would be O(E), here 2*100k (col1=startpoint,col2=endpoint). The adjacency approach would be 500k*500k = 2.5e11 = 250 billion entities = minimum 30GB even if you used bitfields. Naturally, I think PDL would be a good platform for this.