The simplest type of graph is a null graph. It consists of a non-empty finite set of elements called vertices. The applet below shows some examples of null graphs.
|
We shall use this exercise to introduce you to
the program
Petersen
.
If you decide to copy and run
this program at home you will need the executable program
Petersen.exe
and the file
vbrun100.dll
.
Click on the Petersen icon to start the program. After the welcome message and copyright notice you will get a screen with two rectangles. The large one is for pictures of graphs and the lower one will have instructions and messages. To input a null graph, click on Graph and then Null Graph. You will get an input box with the question "How many vertices (< 66)". The "<66" is there to indicate that the maximum number of vertices that this program will accept is 65. Press 4 and then press the Enter key (or click OK.) You will get four vertices on the screen like in Fig. 1. The N(4) at the top means Null graph on four vertices, sometimes written as N4.
|
|
| Fig. 1, The Null Graph N4 |
Null graphs are not very interesting so let us
introduce some
edges.
These will be line segments from one vertex
to another.
Two vertices
v1
and
v2
are
adjacent
if there is an edge between
them. Use the procedure outlined above and get
N4
on
your screen as in Fig. 1. To add an edge from vertex 3 to vertex 2 you
click on vertex 3 with the right mouse button and drag to vertex 2. Your
graph should now look like Fig. 2.
|
|
| Fig. 2, A Non-null Graph |