In conventional Graph Theory the role of Nodes and Edges is skewed: nodes are perfectly ok being aloof, but poor edges are always drawn between existing nodes (that is, the two maps from EDGES to NODES are total). 


Now, I am curious to know if there is somewhere in the Mare Magnum of mathematics an extension of Graph Theory, let us call it provisionally the Theory Partial Graphs (it may have already a well-established name, in which case I apologize), which contemplates dangling edges (ie edges which either stand alone, or are attached only to one node). 


To be more specific, I would like to see some refs on TYPED partial graphs: dangling edges hare equipped with types, and there is an algebra of sorts which tells which dangling nodes can "merge" with other kindred typed dangling nodes to make up a genuine edge of the graph 


(think of nodes which protrude some edges like an octopus, with the possibility of two arms joining and forming a perfectly traditional edge).


Anything along the lines above? 


PS Although I do not have any specific preconceptions around the way this theory may appear (for instance, as some kind of algebra, or as a chapter of topology), ideally it would be codes within a categorical framework



Graphs with dangling edges
Yes, there are such things.


Consider the monoid $M$ of endomaps $\{0,1\} \to \{0,1\}$. It has four elements: the constant maps 0 and 1, the identity map $i$ and the "swap" map $s$. Let $\mathcal{G}$ be the category of *right* $M$-actions. These are sets equipped with a map $m : A \times M \to A$ such that $m(x, i) = x$ and $m(x, f \circ g) = m(m(x, f), g)$. A morphism is a map which commutes with the actions. I will write $x \cdot f$ instead of $m(x, f)$. (All this is very common, except that we have a monoid instead of a group.)


Let us think of the elements of an $M$-set $A$ as *half-edges*. Each half-edge $e \in A$ has an associated *opposite* half-edge $e \cdot s$. Call a half-edge $e$ a *vertex* when $e \cdot 0 = e$ (exercise: $e \cdot 0 = e \iff e \cdot 1 = e$). Each half-edge $e$ has an *origin* which is $e \cdot 0$, while $e \cdot 1$ is the origin of its opposite half-edge $e \cdot s$. It is possible to have a half-edge which is its own opposite, $e \cdot s = e$ (these are your *dangling* edges). The graphs are *reflexive* because every vertex $v$ has a distinguished half-edge attached to it, namely $v$ itself.


Explicitly, we have the following equivalent presentation of $\mathcal{G}$:


1. *objects* are sets $(V, H)$ of vertices and half edges such that:


	* each half-edge $e \in H$ has an *origin* $o(e) \in V$
	* each half-edge $e$ has an *opposite* half-edge $s(e) \in E$
	* each vertex $v \in V$ has a distinguished half-edge $\ell(v) \in H$ such that $o(\ell(v)) = v$ and $s(\ell(v)) = \ell(v)$
2. A morphism $(V,H) \to (V',H')$ is a pair of maps $f : V \to V'$ and $g : H \to H'$ such that $g(\ell(v)) = \ell(f(v))$, $f(o(e)) = o(g(e))$, and $s(g(e)) = g(s(e))$. Morphisms are composed component-wise.


This an more can be read about in:



> 
> William F. Lawvere, [Qualitative distinctions between some toposes of generalized graph](http://conceptualmathematics.files.wordpress.com/2013/01/toposesofgeneralizedgraphs.pdf), Contemporary mathematics, Vol. 92, 1989, pp. 261-299.
> 
> 
> 


