What are the standard names for the node a directed edge comes out of and goes into

graph theoryNetworknetwork-flowterminology

Say I have a directed edge from node $u$ to node $v$. By what names can I refer to $u$ and $v$ that describe their “role” in the edge. Ideally, I’d like the name to be short (because it’s for writing code), but also adhering to some standard.

Candidates I’ve thought of but rejected:

  • from node and to node. Clearest, but too long if I need to use them in other variable/function names.
  • source and sink. Shorter, but only a standard for network-flow folk. Might be too obscure for some.
  • from and to. Nice, but clashes with reserved words in Python.
  • v₀ and v₁ (for vertex[0] and vertex[1]). Very short, but obscure to all.

Note that this question is not what I’m after as it asks for ways to express this using mathematical notation instead of words.

Best Answer

The names tail and head are pretty standard. Better to avoid source and sink because those names are often used to refer to specific nodes in a network, for example, in the maximum flow problem.