[Tex/LaTex] what is a quick generic way to draw graphs (in the graph theory sense)


I am looking for a very simple way to write a command for drawing (undirected or direct) graphs in Latex. I am aware of tikz, but it is an overkill for what I want, especially since I want the .tex file to have easy to understand logical form.

All I want is to specify a set of nodes (or just the number of nodes), a possible label for some of the nodes, and the set of edges. $G=(V,E)$ in the usual sense with labelings for $V$.

I don't mind too much what the graph looks like as long as it is logically correct.

EDIT: For example, I would specify a graph using:


and that would draw a graph with 5 nodes, labeled a-e with edges between vertex 1 and 5 and 4 and 3.

Best Answer

Not sure why TikZ is considered overkill. The following looks quite straight forward, although it requires LuaLaTeX:

\tikz[>=Stealth]\graph [simple necklace layout, nodes={circle, draw}, node sep=1cm]{
  a, b, c, d, e;
  a -> e;
  d -> c;

enter image description here