Separation and dimension in a graph