# Defining a graph as G=(V,E) — how to interpret the notation?

I am looking at the following problem:

Define $V=\{0,1,2,3,4,5\}$. Define a graph $G=(V,E)$ by letting the edges be: $$E =\{(a,b):a-b^2 \le 1 \lor b-a^2 \le 1\}$$

I understand that 'V' stands for vertext and 'E' stands for edge -- but how do you actually take this information and construct a graph? It looks like the question gives you six individual vertexes to start out with.

Take $|V|=6$ points and give them the names $0,\ldots,5$, then link the vertex $i$ to the vertex $j$ with an edge if, and only if $(i,j)$ (or $(j,i)$) is in $E$, i.e. if $i-j^2\le1$ or $j-i^2\le1$.
• I see. So in this case the vertex 0 would have a line connected to every other vertex, since 0-n^2 is $\le$ 1? – Bob Shannon Dec 10 '13 at 22:33