3
$\begingroup$

In short: we generalize graphs to the temporal case, but fail to fully preserve the usual relation between density, number of vertices, and number of edges; how to make better?


Context.

We propose a generalization of basic graph concepts to the temporal case. Density is among the most important ones, as it is used in the definition of many higer-level concepts. I remind below the definition in graphs and our generalization, and explain the problem we have.

Notation: $X \times Y$ classically denotes the set of ordered pairs of two elements $x$ of $X$ and $y$ of $Y$, $(x,y)$. I denote by $X \otimes Y$ the set of unordered pairs of two distinct elements $x$ of $X$ and $y$ of $Y$, that I denote by $xy$ or $yx$. See this other thread.

Graphs.

A graph $G=(V,E)$ is defined by its set of vertices $V$ and its set of edges $E\subseteq V\otimes V$. It has $n=|V|$ vertices and $m=|E|$ edges.

Its density is the probability when one takes a random element $uv$ in $V\otimes V$ that there is an edge between $u$ and $v$ in $E$: $$\delta = \frac{2m}{n (n-1)}$$

It is the fraction of possible edges that do exist.

Stream graphs.

A stream graph $S=(T,V,W,E)$ is defined by its time span $T$, its set of vertices $V$, its set of temporal vertices $W \subseteq T\times V$, and its set of (temporal) edges $E \subseteq T\times V\otimes V$ such that $(t,uv) \in E$ implies $(t,u)\in W$ and $(t,v) \in W$. For any $u$ and $v$ in $V$, $T_v = \{t, (t,v) \in W\}$ and $T_{uv} = \{t, (t,uv) \in E\}$.

We say that $S$ has $n$ vertices, where $n = \sum_v \frac{|T_v|}{|T|} = \frac{|W|}{|T|}$, and $m$ edges, where $m = \sum_{uv} \frac{|T_{uv}|}{|T|} = \frac{|E|}{|T|}$.

Its density is the probability when one takes a random element $(t,uv)$ of $T \times V \otimes V$ such that $(t,u)$ and $(t,v)$ are in $W$, that $(t,uv)$ is in $E$: $$ \delta = \frac{\sum_{uv\in V\otimes V}|T_{uv}|}{\sum_{uv\in V\otimes V}|T_{u} \cap T_{v}|} $$

In other words, the density is the probability when one takes a random time and two random vertices such that an edge may exist between them at this time, that the temporal edge indeed exists.

It is the fraction of possible temporal edges that do exist.

Why do stream graphs generalize graphs?

Let us consider a stream graph in which $T_v = T$ and $T_{uv} \in \{\emptyset,T\}$ for all vertices $u$ and $v$. In other words, vertices are always present, and pairs of vertices are either always or never linked together. Then, the stream is equivalent to the graph $G(S) = (V,\{uv, T_{uv}=T\})$; we call it a graph-equivalent stream.

Then, the stream properties (in particular $n$, $m$, and $\delta$) of $S$ are equal to the corresponding graph properties of $G(S)$. This is true for a wide variety of graph concepts generalized to stream graphs. Therefore, graphs may be seen as special stream graphs, and graph properties as special cases of stream graph properties.

Link streams.

A link stream is a special type of stream graph, in which $T_v = T$ for all $v$: all vertices are present all the time.

In link streams, like in graphs, we have $\delta = \frac{2m}{n (n-1)}$: $$ \delta = \frac{\sum_{uv\in V\otimes V}|T_{uv}|}{\sum_{uv\in V\otimes V}|T|} = \frac{2\cdot\sum_{uv\in V\otimes V}|T_{uv}|}{n\cdot(n-1)\cdot|T|} = \frac{2\cdot m}{n\cdot(n-1)} $$

The problem.

In link streams and in graphs, we have the same direct relation $\delta = \frac{2\cdot m}{n\cdot(n-1)}$.

In stream graphs, this relation does not hold.

In particular, there are stream graphs with same $n$ and $m$ but different $\delta$. Assume for instance $T=[0,2]$, $V=\{a,b,c\}$, and $E=[0,1]\times\{ab\}$, and so $m=0.5$. If $W=[0,1]\times\{a,b,c\}$ then $n=0.5$ and $\delta=\frac{1}{3}$. If $W=[0,1]\times\{a,b\} \cup [1,2]\times\{c\}$, then $n=0.5$ and $\delta=1$.


Question.

Is there any set of definitions that would make much sense, like the ones above, but would preserve the $\delta = \frac{2m}{n (n-1)}$ relation in stream graphs? Or is there a fundamental reason why this would be impossible?


Remarks.

  • The trivial solution defining stream graph density as $\delta = \frac{|E|}{|T\times V \otimes V|}$ is unsatisfactory: it misses the fact that density captures the fraction of possible edges that do exist.

  • The set $T$ above may be discrete (typically, an interval of $\mathbb{N}$) or continuous (typically, an interval of $\mathbb{R}$); this does not make a crucial difference here.

  • I implicit consider undirected simple (stream) graphs above, but everything applies to directed (stream) graphs with or without loops, bipartite (stream) graphs, and others.

  • Sorry for this very long post, resulting from an attempt to make it clear and self-contained.

$\endgroup$

1 Answer 1

3
+50
$\begingroup$

I don't have enough reputation to comment, so I'll answer instead (but this should really be a comment, imho).

It seems to me that in your situation, the way to go is by extending the definition of density for graphs. If you consider that nodes have a presence probability in $[0,1]$ (well, technically any bound would work as long as it's finite and known beforehand), that you can denote as $T_u$, and a weight on edges denoted as $T_{uv}$ and then the two formulas "become" equivalent. Of course, this is not satisfactory to you, because of the example you give in the last section of your question.

This seems to be the key, though, and it feels like the answer is contained there. Your definition of density in stream graphs takes into account the amount of time for which nodes are present simultaneously, which is not taken into account in your definition of $n$ (and which cannot be trivially modeled through weights in the original graph).

$\endgroup$
2
  • $\begingroup$ This is interesting! If I understand correctly, you somehow say that vertices would always be present, but at a rate between $0$ and $1$. Then, one may ask that an edge between two vertices at a given time is present with a rate bounded by the ones of these vertices. In a sense, in this way, we always have link streams (vertices are never really absent), which is helping. As you say, this still does not lead to a consistent relation to $n$, it seems, as it does not include the simultaneous presence constraint. Nice idea, though. $\endgroup$ Commented Jan 29, 2021 at 20:25
  • $\begingroup$ Yes, exactly ! :) I was thinking that you could somehow redefine $n$ as something linked to these simultaneous presence times, however, it seems complicated. You would have to count only the times at which $u$ interacts at least with $1, 2,...,k$ other nodes, is that right ? Your "number of nodes" (or rather, the number of possible outcomes in your probability would become something like $\int_t |V_t| \cdot |V_{t-1}|$. I'll see if I can have that expression as $k\cdot (k-1)$ for some $k$, I'll keep you updated. $\endgroup$
    – Tiphaine
    Commented Jan 29, 2021 at 20:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .