## DyingLoveGrape.## Applying Topology to Data, Part 3: Orientation, Chains, Cycles, and Boundaries!## Introduction.In the previous two posts (part one, part two) we looked at ways to construct simplicial complexes from points of data. In this post, we'll begin talking about what to do once we have a simplicial complex to figure out what kind of topological structure it has. The first step in doing this kind of thing is to construct an [A warning: for a few of these concepts and "proofs", I will be hand-waving a bit; the reader is encouraged to learn all the painfully precise details from a textbook on the subject, but it is not necessary for the level of abstraction we will be working at.] ## Orientations.We talked a bit about simplices in the first part, so you should have some general idea of how to make an $n$-simplex, at least for $n = 1, 2, 3$. Orientation is a tricky beast. For surfaces, an orientable surface is one which has two distinct "sides" and a non-orientable surface has only one distinct "side." The best way I've found to visualize this idea is the following: Take a rectangular piece of paper. Take the two smaller ends and tape them together. You get something which has two sides: an "inside" and an "outside". This surface is orientable since there are two distinct sides. On the other hand, take another strip of paper and twist one of the short ends $180^{\circ}$, then tape the short ends together. This makes a Möbius strip. I've tried my best to draw it here, but to see the magic firsthand you'll need to build one yourself. One fun thing to do is to give it to a younger student and ask them to color one of the sides blue and the other side red: as soon as they start coloring the side blue, they'll realize that, when they finish, the entire strip will be colored! The reason for this is that the Möbius strip has only one "side" since it is We need to be clever when it comes to checking the orientation of simplicial complexes, especially since many of them will have many higher-dimensional simplexes for which it makes no sense to ask for "two sides"; what would such a thing mean for a $4$-simplex? To be able to say if a complex is orientable, we'll first have to describe the Recall that simplices can be thought of as a set: we did this when we talked about abstract simplicial complexes. For example, a $0$-simplex may be thought of as the set $\{1\}$ and a $1$-simplex may be thought of as the set $\{1,2\}$. The following simplicial complex has two $0$-simplices, $\{0\}$ and $\{1\}$, and has a single $1$-simplex, $\{0,1\}$.
Before, we didn't differentiate between the simplex $\{0,1\}$ and the simplex $\{1,0\}$, since, to us, they were the same simplex: the $1$-simplex between the two $0$-simplices. Now, we're going to create an And here's the simplicial complex corresponding to $\{[0],[1],[1,0]\}$: See the difference? Let's do one that's slightly more complicated. Let's draw the simplicial complex corresponding to the abstract simplicial complex \[\{[0],[1],[2],[3],[0,1],[1,2],[2,3],[0,2]\}.\]
Note that all these edges "connect" to the vertices, I'm just drawing an arrow at the end to show which "direction" they are going. If the above simplicial complex were a train map, we'd note that we can get to $1$ from $0$ but we can't get to $0$ from $1$. In fact, we can't get to $0$ from anything! That's a bit sad. This kind of interpretation is what gives us the notion of a Why stop at $1$-simplices though? Let's try it with a $2$-simplex. In this case, the interpretation is not so obvious: what does it mean for a triangle to be "directed"? Luckily, the math is the same as it was before: we simply have to order the vertices and that will give us an orientation. For example, $[0,1,2]$ is one orientation, and $[0,2,1]$ is another. Before we draw this, though, we need to remember that a $2$-simplex must be bounded by three $1$-simplices and must have three $0$-simplices where the vertices of the triangle ought to be: these simplices must Notice that the $1$-simplices make a complete cycle: if this was a train map, if you were at any point you could get to any other point. This is unlike our previous picture where we couldn't get to $0$ from any other simplex. When we have a cycle like this we sometimes draw a little circular arrow to denote "which way" the cycle goes, like this: What would it look like if we started with the ordered $2$-simplex $[0,2,1]$ instead of $[0,1,2]$? Try to draw it yourself! We'd have the associated $1$- and $0$-simplices would be: $[0,2],[2,1],[1,0]$ and $[0],[1],[2]$. The picture looks like: Neat. Notice the little circle arrow is going the other direction in this one. At this point, we are in a position to define,
Note that by $[a_{1}, a_{2},\dots, a_{n}]$ above we simply mean some rearrangement of $1,2,3,\dots, n$; for example, $[2,3,4,1]$ for $\{1,2,3,4\}$. The hard part of this definition is the corresponding sub-simplices: how do we find corresponding sub-simplices in general? For this, we need to introduce some notation. Interlude! ## Removing Elements form an Ordered Set.We'll be given ordered set which looks something like $[a_{1},\dots, a_{n}]$. We define a little "hat" notation here to mean "the entire set
## Back to Orientations.At this point, we ask ourselves: given an $n$-simplex, what are the sub-simplices? Let's make this concrete. Given a $3$-simplex $[0,1,2]$, what are its subsimplices? which is $[0,1,2]$. Which edges don't behave like they should (as they do in the picture)? $[1,2]$ is fine, $[0,1]$ is fine, but $[0,2]$ is backwards (in the picture, it goes from 2 to 0, which is $[2,0]$). Hm. As it turns out, there's an easy way to fix this. In order to do this, we define something called the Let's try [Note for those concerned: if we were to rigorously do these boundary morphisms, we should define $\delta_{i}^{k}$, say, to be the boundary morphism which acts on all $k$-tuples, to differentiate it from $\delta_{i}^{k-1}$, which would act on $(k-1)$-tuples, and so forth. Because each of these will be defined in the same way (as we've done above), and because it's a pain to keep track of the indices, we will assume that each $\delta_{i}$ is the one which is defined to take as input whatever sized tuple we're working with.] Because the previous example will take forever to work out fully (though the reader is encouraged to do so!), let's do The remaining things aren't bad to figure out. That'll give us every $1$-simplex. You should also note that $\delta_{1}([0,1])$, for example, is just the vertex $[0]$, and $\delta_{2}([0,1]) = -[1]$. Since $0$-simplices only have one orientation, note that $-[1] = [1]$. At this point, you can probably compute boundaries like a pro. Let's take things to the next level. It's nice to be able to do each of the boundaries individually, but it would be awfully nice to have some nice way of displaying all of this data at once in some nice, compact way. Hm... ## Sums and Boundary Morphisms.A good way to sum up the data that we get from the boundary morphisms is to literally sum them up — that is, we're going to define the following morphism for ordered sets of $n$ elements: \[\delta = \sum_{i=1}^{n} \delta_{i}\] This might look wild and crazy at first, but it's not so bad. For example, let's take $[0,1,2,3]$. We obtain, \[\begin{align*} \delta([0,1,2,3]) &= \delta_{1}([0,1,2,3]) + \delta_{2}([0,1,2,3]) \\ &+ \delta_{3}([0,1,2,3]) + \delta_{4}([0,1,2,3])\\ &= [1,2,3] - [0,2,3] + [0,1,3] - [0,1,2]\\ \end{align*}\] Note that in the picture above, I've only drawn the first two faces for clarity. Note the way that they're arranged in this figure. This chain gives us the orientation of each of the faces, and it gives us it in a "chain form"; that is, as a sum of simplices with coefficients. We've not really talked about how one would build such a morphism from scratch, but the $\delta$ mapping is actually a First, let's see what happens here when we compute $\delta(\delta([0,1,2,3]))$. We obtain:
\[\begin{align*}
&\delta(\delta([0,1,2,3])) \\
&= \delta([1,2,3] - [0,2,3] + [0,1,3] - [0,1,2])\\
&= \delta([1,2,3]) - \delta([0,2,3]) + \delta([0,1,3]) - \delta([0,1,2])\\
&= ([2,3]-[1,3]+[1,2]) - ([2,3]-[0,3]+[0,2])\\
&+([1,3]-[0,3]+[0,1]) - ([1,2]-[0,2]+[0,1])\\
&=0.\end{align*}\]
Woah, weird. We ended up with 0. Maybe that was a fluke, let's try again with another ordered set. This time, let's try $[0,2,1]$.
\[\begin{align*}
&\delta(\delta([0,2,1])) \\
&=\delta([2,1]-[0,1]+[0,2])\\
&=\delta([2,1]) - \delta([0,1]) + \delta([0,2])\\
&=([1]-[2]) - ([1]-[0]) + ([2]-[0])\\
&= 0.
\end{align*}\]
This doesn't seem like a coincidence. Indeed, it's not. We won't cite the proof here, but it's almost exactly what you'd expect: everything winds up canceling out. We'll state this in a box because it will become
This might seem inconvenient since we cannot find smaller simplices in a chain once we've already made our chain, but this proposition will turn out to be wonderful. We'll see why later. ## Chain Chain Chains.The idea of summing up ordered sets comes up all the time. In our previous section, we had a particular way that we summed them up: they'd alternate a $+$ and a $-$ sign. In general, though, we can construct chains which have arbitrary coefficients. For example, we can have
\[3[0,1] + 4[1,2] - 6[0,2]\]
which is a sum that doesn't look like it's from our $\delta$ operation. We'll call things like this
If we didn't want to use integer coefficients and wanted to use real coefficients, we could have \[\pi[0,1] - e^{2\pi}[1,2] - 4.6757[0,1]\] For now, let's stick to integer coefficients, since they'll be fairly nice to work with.
This definition is just telling us that we can make an $n$-chain by adding together $n$-simplicies with coefficients, as we did above. It is a convenient way to represent combinations of chains, though it is not always "visually obvious" what is meant by a particular chain, unlike how $+$ and $-$ gave us an orientation for the simplex above. It will turn out that it's not necessary to visualize any particular chain, but it will be necessary to find out which chains that have particularly nice forms. We'll talk about this more in a bit. ## How Simplicies Fit Together.In order to talk about orientation of an entire complex, as opposed to just a single simplex, we need to talk about how simplices fit together and what makes the orientations of two neighboring simplicies compatible. Maybe it's not so obvious from above, but every $n$-simplex (except $0$-simplices) have two distinct orientations; we've seen this when we look at $1$-simplicies: they can either go from $0$ to $1$ or $1$ to $0$, for exaple. These orientations are distinct. If we take two different simplicies, each of which is oriented in some way, we'd like to see if they fit together nicely or not. The idea behind what we'll want is given by the following: if we took a $2$-simplex and split it in half into two $2$-simplicies, we'd like it to keep its orientation: Here is the standard $2$-simplex, oriented in some direction. Now let's add a $0$-simplex at the bottom and a $1$-simplex to "cut it in half." We're going to do our best to keep its orientation the way it is. Here's what we get (the thick blue line is the new $1$-simplex): How should we orient the blue $1$-simplex? If we look at the left half of the simplex, it looks like it should be pointing upwards; if we look at the right half of the simplex, it looks like it should be pointing downwards. Indeed, both of these are right: if we split up this figure into two $2$-simplicies, then we would get: So what happened: it was almost like the blue $1$-simplex "wasn't there"; we could have taken it away and the original simplex would still have been oriented. This is how simplicies fit together: we can glue them to each other via some boundary so long as they're oriented In general, two oriented simplicies with a proper sub-simplex in common (that is, both are "glued together" there) are said to be
This is kind of a strange definition, but its meaning is the same as what we did above: we can fit simplices together nicely if their common parts have opposite orientations. Don't spend too much time fretting over this idea if it doesn't sit too well with you: we include it here for the sake of completeness, but we will (in a future post) be able to figure out orientations computationally. [Note: If two ordered simplicies have a common $0$-simplex, then this is considered coherent as $0$-simplicies only have one orientation. ] An entire simplicial complex is said to be [Note: Since we know about chains, this orientable condition can also be read in the following way. Two simplices with a common sub-simplex have coherent orientations if, when we sum up the common ordered sets corresponding to the sub-simplicies of the two simplices considered, we get $0$. For example, above in the case of the two triangles, we have the middle $1$-simplex in the left figure is $[3,0]$ and in the right figure is $[0,3]$. We note that $[3,0] = -[0,3]$, so when we sum these up we obtain $[0,3] - [0,3] = 0$, as required.] ## Boundaries and Cycles.We will now define arguably the most important concepts we will need for a while: boundaries and cycles.
Suppose we have an $n$-chain, which we'll call $A$. We're going to call $A$ a
The cycle can be represented by the $2$-chain $A =[0,1]+[1,2]+[2,3]+[3,0]$. Notice that \[\begin{align*} \delta(A) & = \delta([0,1]) + \delta([1,2]) + \delta([2,3]) + \delta([3,0])\\ & = [1] - [0] + [2] - [1] + [3] - [2] + [0] - [3]\\ &=0. \end{align*}\] But, on the other hand, if we "flipped" the direction of $[1,2]$ to make it $[2,1]$, we no longer have a cycle, graph-theoretically: you can't start at any point, follow the arrows, and then get back where you started. We'll call this $2$-chain $B = [0,1] + [2,1] + [2,3] + [3,0]$. We notice that, now, \[\begin{align*} \delta(A) & = \delta([0,1]) + \delta([2,1]) + \delta([2,3]) + \delta([3,0])\\ & = [1] - [0] + [1] - [2] + [3] - [2] + [0] - [3]\\ &= 2[1] - 2[2] = 2([1] - [2])\neq 0. \end{align*}\] Hence the motivation for our idea of $\delta(A) = 0$ implying $A$ is a cycle. We'll make a definition box for this later, but for now we'll just keep this in the back of our heads. Now, let's suppose that $A$ is any $n$-chain; not necessarily a cycle. We will call $B = \delta(A)$ a
- If $\delta(A) = 0$, then we call $A$ an
**$n$-cycle**. - If there exists some $(n+1)$-chain, $B$, with $\delta(B) = A$ then we call $A$ an
**$n$-boundary**.
Given a simplicial complex, $X$, we can talk about all of the $n$-chains of $X$. We'll collect them all together and call the resulting set $C_{n}(X)$, which is called the - Addition is defined in the obvious way, by adding the two sums together. Note the resulting sum is still a finite sum consisting of terms which are $n$-simplices of $X$ and integer coefficients; hence, $C_{n}(X)$ is closed under the normal summing operation.
- The element $0$ is defined (by multiplying a single $n$-simplex with 0, say) and $0 + A = A$; hence, there is an identity element.
- Given $A$, define $-A = \sum_{i=1}^{m}(-a_{i})A_{i}$. It's clear that $A + (-A) = (-A) + A = 0$.
- Moreover, $A + B = B + A$. This is not necessary for a general group, but this makes our group
*abelian*(that is, every two elements commute in our group).
The first three parts give us that $C_{n}(X)$ is a group: it is closed under a binary operation, contains inverses for that operation, and contains an identity element for that operation. The last part gives us that $C_{n}(X)$ is abelian. If you don't know much about group theory, don't worry so much about this abelian part — it is essentially to make everything quotient out nicely later. Similarly, we can talk about all of the $n$-cycles of our simplicial complex $X$. This will be denoted by $Z_{n}(X)$ (I'm not sure why the $Z$; maybe because $C$ was already taken?) and is called the - Addition is defined in the same way as above, by adding the two sums corresponding to the $n$-cycles together. Note that $\delta(A + B) = \delta(A) + \delta(B) = 0$, so $A+B$ is also an $n$-cycle; hence, $Z_{n}(X)$ is closed under the normal summing operation.
- The element $0$ is defined and $0 + A = A$. Moreover, $\delta(0) = 0$, so $0$ is, itself, a cycle. Hence, there is an identity element.
- Given $A$, define $-A = \sum_{i=1}^{m}(-a_{i})A_{i}$. Note that $\delta(-A) = -\delta(A) = 0$, so $-A$ is a cycle. Again, it's clear that $A + (-A) = (-A) + A = 0$.
- Similar to above, $A + B = B + A$. This is not necessary for a general group, but this makes our group
*abelian*(that is, every two elements commute in our group).
This shows that $Z_{n}(X)$ is an abelian group. As you might expect, we also can talk about all of the $n$-boundaries of our simplicial complex $X$. We'll denote this by $B_{n}(X)$ and call it the To sum all of this up, let's put it in a box:
- The associated $n$-chain (abelian) group is denoted by $C_{n}(X)$.
- The associated $n$-cycle (abelian) group is denoted by $Z_{n}(X)$.
- The associated $n$-boundary (abelian) group is denoted by $B_{n}(X)$.
We're going to talk about this a bunch more in the next post when we discuss homology, but for now let's end on an example which calculates this stuff. ## Example!Here, we'll compute the values of $C_{n}(X)$ for each $n\geq 0$ for some structure; in the next post, we'll also look at $Z_{n}(X)$ and $B_{n}(X)$, but we don't have the tools yet to make these groups easy to compute. Let's begin with the (oriented) simplicial complex corresponding to the abstract simplicial complex \[X = \{[0],[1],[2],[3],[0,1],[1,2],[2,0],[0,3],[0,1,2]\}\] which, geometrically, looks like We note that the $0$-simplices are $0,1,2,3$, so the group $C_{0}$ consists of all chains \[a[0] + b[1] + c[2] + d[3]\] for $a,b,c,d\in {\mathbb Z}$; recall, we're working over the integers in this post, and that's why we're using ${\mathbb Z}$ here. Notice that for any chain here, we only need to say what $a,b,c,d$ are to completely determine what chain we're talking about; let's write this as $(a,b,c,d)$. For example, $(1,2,3,4)$ would correspond to \[1[0] + 2[1] + 3[2] + 4[3]\] and $(-1,0,1,0)$ would correspond to \[-1[0] + 0[1] + 1[2] + 0[4] = -[0] + [2].\] Hence, for any element in our chain group $C_{0}(X)$, we only need to specify $(a,b,c,d)$. Similar to the notation for $(x,y)\in {\mathbb R}^{2}$ talking about two real numbers on the real plane (in an ordered pair), we will say that $(a,b,c,d)\in {\mathbb Z}^{4}$. The ${\mathbb Z}^{4}$ tells us that we need to specify an ordered set which contains $4$ elements, each from ${\mathbb Z}$. Since any element of this type specifies a $0$-chain (like the two examples above), we say that \[C_{0}(X) \cong {\mathbb Z}^{4}.\] We will introduce some algebra in the next post which will talk a bit more about what this equation means, but for now it means, essentially, that there are four $0$-simplicies, and each of them can have any integer coefficient that we want. Similarly, we have the $1$-simplicies $[0,1],[1,2],[2,0],[0,3]$, so an element in $C_{1}(X)$ will look like \[a[0,1] + b[1,2] + c[2,0] + d[0,3]\] for $a,b,c,d\in {\mathbb Z}$. For the same reasons as above, we say that \[C_{1}(X) \cong {\mathbb Z}^{4}.\] The only $2$-simplex we have is $[0,1,2]$, so the elements of $C_{2}(X)$ will all look like
\[a[0,1,2].\]
We only need to specify What about $C_{3}(X)$? Or $C_{100}(X)$? Since we don't have any $3$-simplicies, $4$-simplicies, \dots, and so on, we don't need to specify As I mentioned before, it'll be a bit difficult to find all the elements of $B_{n}(X)$ and $Z_{n}(X)$ without going over some algebra (which we will do in the next chapter). ## Next Time...In the next post, we will define and calculate the homology of some figures and learn some tools to make finding $B_{n}(X)$ and $Z_{n}(X)$ a bit easier to compute. We'll learn that the homology of things that look like circles is much different from things which look like blobs (that is, which are contractible). We'll use this in combination with our complex-building concepts from the previous posts to mathematically show that a finite set of points arranged in a circle will mathematically "look" like a circle, in some specific topological sense. [At this point, I may split the direction of the posts into two: what I just mentioned will be in the topology and data series (the series of posts you're reading now) but I'd also like to discuss how to construct algorithms which will construct and analyze these structures. Because I am not a fantastic programmer, this post sequence will be written if I can find a friend to help me work through the programming. Most likely, I will write up the pseudocode first and then include the actual code that I'm using, which will most likely be written in Python. Those interested can redo the code in a "faster" language, like C, if they'd like.] |