As with every graph you want to create you need to ask yourself two questions:
- How do my nodes should look like?
- How do I position my nodes?
- How do I connect them?
Appearence of nodes
In your case, your nodes are just circles that are either fully colored in or, well, not.
In TikZ, this can easily controlled by using the fill option. (This is considered to be an action on a path by the manual but remember that basically all nodes bring their own path.)
Since your nodes look like dots, I define a style dot that
- is a
circle,
- is
drawn and
- has a diameter of
5pt which is controlled by the minimum size value (which is actually a key that sets both minimum width and minimum height).
Because nodes usually contain text PGF/TikZ also make sure a node's border has a padding of inner sep around the text but this makes specifying the size of nodes in general and circles in particular a bit annoying which is why I set it to zero.
To make life a bit easier, I also define two keys * and o which represent a filled and an unfilled dot:
dot/.style={circle, draw, inner sep=+0pt, minimum size=+5pt},
*/.style={dot, fill},
o/.style={dot},
Further settings with the TikZ picture is thick which sets a different line width (default is thin).
Place nodes
For placing a node there are multiple ways, the easiest (but sometimes not the best) way is to just explicitly place them in the xy coordinate system which is setup so that x goes 1cm to the right and y goes 1cm upwards. This can be controlled by the x and y keys.
Connect nodes
Now that you have placed your nodes, all you have to do is connect them.
Instead of using multiple \draw (<node 1>) -- (<node 2>); statements, I'm going to use the edge path operation which is somewhat special but for this example, you just need to know that a specification like
(<node 1>) edge (<node 2>) edge (<node 3>) edge (<node …>) edge (<node n>)
will roughly be converted to
\draw (<node 1>) -- (<node 2>);
\draw (<node 1>) -- (<node 3>);
⋮
\draw (<node 1>) -- (<node n>);
which means you only have to specify (<node 1>) once.
But what about the text?
Since your nodes are just dots we want to add labels besides them to identify them.
TikZ has a pragmatic tool for that: Labels.
(They are nodes as well but can be placed in relation to the node they specified on.)
Usually, it's a key that is used like: label = [<options>] <direction> : <text> (the options and the direction are optional).
But that gets annoying fast. TikZ also has the quotes library which turns "<text>" <options> into a label (or a pin or something else if it's used in the options of an edge or a pic).
All labels inherit the every label quotes style which I setup so that all these labels are set in math-mode. This means I can drop the $ around the actual text.
Code
\documentclass[tikz]{standalone}
\usetikzlibrary{quotes}
\begin{document}
\begin{tikzpicture}[
dot/.style={circle, draw, inner sep=+0pt, minimum size=+5pt},
*/.style={dot, fill},
o/.style={dot},
thick,
every label quotes/.append style={execute at begin node=$, execute at end node=$}
]
\node[o, "a_0" ] (a0) at ( 0, 3) {};
\node[*, "a_1" left ] (a1) at (-2, 1) {};
\node[*, "a_2" right ] (a2) at ( 2, 1) {};
\node[*, "a_3" left ] (a3) at (-2,-1) {};
\node[*, "a_4" right ] (a4) at ( 2,-1) {};
\node[o, "a_5" below right] (a5) at (-1, 0) {};
\node[o, "a_6" below left ] (a6) at ( 1, 0) {};
\node[o, "a_7" below left ] (a7) at ( 0,-3) {};
\node[*, "a_8" right ] (a8) at ( 5, 0) {};
\node[*, "a_9" left ] (a9) at ( 0,-4) {};
\path (a0) edge (a1) edge (a2) edge (a8)
(a1) edge (a3) edge (a5)
(a2) edge (a4) edge (a6)
(a3) edge (a5) edge (a7)
(a4) edge (a6) edge (a7)
(a5) edge (a6)
(a7) edge (a8) edge (a9)
(a8) edge (a9);
\end{tikzpicture}
\end{document}
Output

pgfmanual of tremendous help. See how far you can get using that guidance in creating your diagram. If you can't finish, add the code you have to your question, so we can help you finish it. – alchemist Jun 10 '23 at 13:30\node (a9) at (0,-5) {A9};2) draw all connections, like\draw (a7) -- (a0);3) refine from there, e.g. for putting circles, moving text etc. I.e. get the structure right first. – MS-SPO Jun 10 '23 at 14:31