<p>The graph is already a simplicial complex comprising of 0 and 1 simplices (nodes and edges). The barcode representation is meaningful only when the simplicial complex is constructed step-by-step such that the complex at step k is a subset of the complex at step k+1 i.e. the vertices and edges are inserted into it in some order.</p>

<p>Assuming that the vertices are added at "time"/"paramter value" 0 and all the edges are added at "time"/"parameter value" 1: the betti_0 barcode will simply be a set of lines representing the number of disjoint components of the graph and betti_1 will simply be a set of lines representing each "basic" loop in the graph (see cycle space of a graph).</p>

<p>There are several ways of constructing such ordering functions on a graph e.g. compute any function over the vertices (say the degree of any vertex) and say that vertices with lower degrees are 'born' before the vertices with higher degree. Now say that an edge is added whenever both the vertices come to exist. Now, you can construct a persistent homology view of the given graph under the degree distribution. Many other such functions can be constructed e.g. pagerank, laplacians etc.</p>

CC BY-SA 3.0
2014-05-16T00:58:51.517Z
2014-05-16T00:58:51.517Z
gurjeet
<p>What is said above is correct but I'll add an interesting wrinkle that should be better known.</p>

<p>If you use the graph distance as your persistence parameter and then calculate the persistence of the Rips complex you can actually find higher dimensional homology as well.  For instance the persistence betti numbers for N points equally space on a circle look like:</p>

<p>$$
\begin{array}{*{27}{l}}
N &amp; b1 &amp; b2 &amp; b3 &amp; b4 &amp; b5 &amp; b6 &amp; b7 &amp; b8 &amp; b9 &amp; b10 &amp; b11 &amp; b12 \\
3 &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp; \\
4 &amp; 1 &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp; \\
5 &amp; 1 &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp; \\
6 &amp; 1 &amp; 1 &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp; \\
7 &amp; 1 &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp; \\
8 &amp; 1 &amp; 0 &amp; 1&amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp; \\
9 &amp; 1 &amp; 2 &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp; \\
10 &amp; 1 &amp; 0 &amp; 0 &amp; 1 &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp; \\
11 &amp; 1 &amp; 0 &amp; 1 &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp; \\
12 &amp; 1 &amp; 3 &amp; 0 &amp; 0 &amp; 1 &amp;  &amp;  &amp;  &amp;  &amp;  &amp; \\
13 &amp; 1 &amp; 0 &amp; 1 &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp; \\
14 &amp; 1 &amp; 0 &amp; 1 &amp; 0 &amp; 0 &amp; 1 &amp;  &amp;  &amp;  &amp;  &amp;  \\
15 &amp; 1 &amp; 4 &amp; 0 &amp; 2 &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp; \\
16 &amp; 1 &amp; 0 &amp; 1 &amp; 0 &amp; 0 &amp; 0 &amp;1 &amp;  &amp;  &amp;  &amp; \\
17 &amp; 1 &amp; 0 &amp; 1 &amp; 0 &amp; 1 &amp;  &amp;  &amp;  &amp;  &amp;  &amp;  &amp; \\
18 &amp; 1 &amp; 5 &amp; 1 &amp; 0 &amp; 0 &amp; 0 &amp; 0 &amp; 1 &amp; &amp; &amp; \\
\end{array}
$$</p>

<p>(where persistence betti number just means count the number of bars of any length that appear in each dimension)</p>

<p>The distinction between this situation and the asked question is that I'm not filtering the graph - instead I'm persisting on the abstract metric space that is realized by the graph edge distances.</p>

CC BY-SA 3.0
2014-05-16T06:00:29.707Z
so if I understand correctly the complex at "time" t is the induced graph on all vertices at distance at most $t$ from some canonical vertex ?
Suresh Venkat
CC BY-SA 3.0
2014-05-16T21:03:20.493Z
A time t we connect all vertices at a distance t from each other, but we also build the rest of the rips complex. That is, what you described is the one-complex of the rips complex at level t - if a triple of vertices is connected we automatically add a face etc. 

It's relatively straight forward to work out the N=6 case with a pen and paper picture.
Anthony Bak
CC BY-SA 3.0
2014-05-19T18:18:44.470Z
@SureshVenkat - I realized that I misread your comment.  There is no canonical vertex.  If you want to think just about the one-skeleton (the graph) I'm saying that you for each vertex add in edges to all vertices within distance t (distance in the original graph).

You also add in higher dimensional simplices if all of their faces are already included.
Anthony Bak
CC BY-SA 3.0
2014-05-19T18:20:53.250Z
@DavidRicherby - I think you misread my answer.
Anthony Bak
CC BY-SA 3.0
2014-05-19T20:14:54.873Z
@AnthonyBak You're right -- sorry. I'd still recommend a rephrase, though, since the order of answers changes as they receive votes. That means that what was above when you wrote the answer isn't necessarily above when somebody comes to read it.
David Richerby
CC BY-SA 3.0
2014-05-16T03:52:26.990Z
2014-05-16T03:52:26.990Z
Anthony Bak
<p>Betti-0 will be one interval for each vertex, with one of the involved intervals vanishing any time an edge connects two components. This will be very similar to a trace of a Union-Find running on the graph.</p>

<p>Betti-1 will be one interval for each essential closed loop; corresponding to a running updated basis for the <a href="http://en.wikipedia.org/wiki/Cycle_space">Cycle Space</a>. Since it is a graph, these will appear whenever an edge is added that does not connect two disjoint components, and never disappear again.</p>

CC BY-SA 3.0
2014-05-15T22:38:56.673Z
2014-05-15T22:38:56.673Z
Mikael Vejdemo-Johansson
<p>Using persistent homology, we can analyze the (topological) shape of a cloud of points using the following three-step method:</p>

<ul>
<li>convert the point set into a simplicial complex (and there are a few different ways of doing this) parameterized by a "noise" parameter</li>
<li>Compute the homology groups of this complex (again parameterized by the parameter)</li>
<li>look at the evolution of the groups as the parameter evolves. </li>
</ul>

<p>The "time of life" of the different groups looks like a collection of intervals, which is called the "barcode" of the shape. </p>

<p>Is there an easy explanation of what the barcode looks like if the simplicial complex is merely a 1-skeleton (i.e a graph) ? In other words, suppose we start with a graph (rather than a point set) and then do the remaining two steps as above. </p>

<cg.comp-geom><topology>
Barcode of a graph
Suresh Venkat
# Barcode of a graph

(Asked by: username_0 on 2014-05-15)

Using persistent homology, we can analyze the (topological) shape of a cloud of points using the following three-step method:

* convert the point set into a simplicial complex (and there are a few different ways of doing this) parameterized by a "noise" parameter
* Compute the homology groups of this complex (again parameterized by the parameter)
* look at the evolution of the groups as the parameter evolves.

The "time of life" of the different groups looks like a collection of intervals, which is called the "barcode" of the shape.

Is there an easy explanation of what the barcode looks like if the simplicial complex is merely a 1-skeleton (i.e a graph) ? In other words, suppose we start with a graph (rather than a point set) and then do the remaining two steps as above.

**Tags:** cg.comp-geom, topology


---

## 3 answers

### Answer by username_4 on 2014-05-15. Score: 9 | Accepted answer

Betti-0 will be one interval for each vertex, with one of the involved intervals vanishing any time an edge connects two components. This will be very similar to a trace of a Union-Find running on the graph.

Betti-1 will be one interval for each essential closed loop; corresponding to a running updated basis for the [Cycle Space](http://en.wikipedia.org/wiki/Cycle_space). Since it is a graph, these will appear whenever an edge is added that does not connect two disjoint components, and never disappear again.


---

### Answer by username_1 on 2014-05-16. Score: 3

The graph is already a simplicial complex comprising of 0 and 1 simplices (nodes and edges). The barcode representation is meaningful only when the simplicial complex is constructed step-by-step such that the complex at step k is a subset of the complex at step k+1 i.e. the vertices and edges are inserted into it in some order.

Assuming that the vertices are added at "time"/"paramter value" 0 and all the edges are added at "time"/"parameter value" 1: the betti\_0 barcode will simply be a set of lines representing the number of disjoint components of the graph and betti\_1 will simply be a set of lines representing each "basic" loop in the graph (see cycle space of a graph).

There are several ways of constructing such ordering functions on a graph e.g. compute any function over the vertices (say the degree of any vertex) and say that vertices with lower degrees are 'born' before the vertices with higher degree. Now say that an edge is added whenever both the vertices come to exist. Now, you can construct a persistent homology view of the given graph under the degree distribution. Many other such functions can be constructed e.g. pagerank, laplacians etc.


---

### Answer by username_2 on 2014-05-16. Score: 1

What is said above is correct but I'll add an interesting wrinkle that should be better known.

If you use the graph distance as your persistence parameter and then calculate the persistence of the Rips complex you can actually find higher dimensional homology as well. For instance the persistence betti numbers for N points equally space on a circle look like:

$$
\begin{array}{\*{27}{l}}
N & b1 & b2 & b3 & b4 & b5 & b6 & b7 & b8 & b9 & b10 & b11 & b12 \\
3 & & & & & & & & & & & \\
4 & 1 & & & & & & & & & & \\
5 & 1 & & & & & & & & & & \\
6 & 1 & 1 & & & & & & & & & \\
7 & 1 & & & & & & & & & & \\
8 & 1 & 0 & 1& & & & & & & & & \\
9 & 1 & 2 & & & & & & & & & \\
10 & 1 & 0 & 0 & 1 & & & & & & & \\
11 & 1 & 0 & 1 & & & & & & & & \\
12 & 1 & 3 & 0 & 0 & 1 & & & & & & \\
13 & 1 & 0 & 1 & & & & & & & & \\
14 & 1 & 0 & 1 & 0 & 0 & 1 & & & & & \\
15 & 1 & 4 & 0 & 2 & & & & & & & & \\
16 & 1 & 0 & 1 & 0 & 0 & 0 &1 & & & & \\
17 & 1 & 0 & 1 & 0 & 1 & & & & & & & \\
18 & 1 & 5 & 1 & 0 & 0 & 0 & 0 & 1 & & & \\
\end{array}
$$

(where persistence betti number just means count the number of bars of any length that appear in each dimension)

The distinction between this situation and the asked question is that I'm not filtering the graph - instead I'm persisting on the abstract metric space that is realized by the graph edge distances.

> **Comments:**
> **username_0**: so if I understand correctly the complex at "time" t is the induced graph on all vertices at distance at most $t$ from some canonical vertex ?  
> **username_2**: A time t we connect all vertices at a distance t from each other, but we also build the rest of the rips complex. That is, what you described is the one-complex of the rips complex at level t - if a triple of vertices is connected we automatically add a face etc.   It's relatively straight forward to work out the N=6 case with a pen and paper picture.  
> **username_2**: @SureshVenkat - I realized that I misread your comment.  There is no canonical vertex.  If you want to think just about the one-skeleton (the graph) I'm saying that you for each vertex add in edges to all vertices within distance t (distance in the original graph).  You also add in higher dimensional simplices if all of their faces are already included.  
> **username_2**: @DavidRicherby - I think you misread my answer.  
> **username_3**: @AnthonyBak You're right -- sorry. I'd still recommend a rephrase, though, since the order of answers changes as they receive votes. That means that what was above when you wrote the answer isn't necessarily above when somebody comes to read it.  

---

