# Formulate a labeled directed graph

Given a labeled directed graph $$〈N,E,l〉$$ with $$N$$ a set of vertices, $$E \subseteq N\times N$$ a set $$L$$ to edges. Let source and target be functions on $$E$$ such that source$$(s,t)=s$$ and target $$(s,t)=t$$ .

Formally formulate the following properties:

I. Every label in $$L$$ is a label of some edge.

II. There are no nodes that are source of edges with more than two distinct labels.

III. There are no nodes that are target of more than two edges with identical labels.

IV. There is at least one path of length three where all the edges have identical labels.

Question.

I assume that $$L$$ is the set of labels and $$l:E\to L$$ be the labelling map.

I. Every label in $$L$$ is a label of some edge.

$$\forall x\in L \exists e\in E\, l(e)=x$$.

II. There are no nodes that are source of edges with more than two distinct labels.

$$\neg \exists v\in V\,\exists e\in E\, \exists e’\in E \,\exists e’’\in E\, (\operatorname{source}(e)=v\,\&\, \operatorname{source}(e’)=v \,\&\, \operatorname{source}(e’)=v\,\&\,\neg( l(e)=l(e’)) \,\&\,\neg( l(e)=l(e’’)) \,\&\, \neg (l(e’)=l(e’’)))$$

III. There are no nodes that are target of more than two edges with identical labels.

$$\neg \exists v\in V\,\exists e\in E\, \exists e’\in E \,\exists e’’\in E\, (\neg(e=e’)\,\&\, \neg(e=e’’)\,\&\, \neg(e’=e’’)\,\&\, \operatorname{target}(e)=v\,\&\, \operatorname{target}(e’)=v \,\&\, \operatorname{target}(e’)=v\,\&\, l(e)=l(e’) \,\&\, l(e)=l(e’’))$$

IV. There is at least one path of length three where all the edges have identical labels.

$$\exists v\in V \exists v’\in V \exists v’’\in V \exists v’’’\in V \exists x\in L (\neg(v=v’)\,\&\, \neg(v=v’’)\,\&\, \neg(v=v’’’)\,\&\, \neg(v’=v’’)\,\&\, \neg(v’=v’’’)\,\&\, \neg(v’’=v’’’)\,\&\, l(v,v’)=x\,\&\, l(v’,v’’)=x\,\&\, l(v’’,v’’’)=x)$$