# The interval I(u,v) between a pair of vertices u,v in graph

Hello Everyone,

I am really new to the sagemath and I need your help with finding the interval between **all pair of vertices** in a graph.

Def: In graph G, the Interval between a pair of vertices u and v is: I(u,v)={w|d(u,v)=d(u,w)+d(w,v)}

In other words, the interval between a pair of vertices u and v is : all vertices that lies on all shortest paths between them.

I want to find the interval between all pairs of vertices in graph. I do not know if such function already exists in sagemath or I do need to implement my own.

Thanks,

Hakeem