Over a million developers have joined DZone.

Triangular Numbers and Simplices

· Big Data Zone

Hortonworks DataFlow is an integrated platform that makes data ingestion fast, easy, and secure. Download the white paper now.  Brought to you in partnership with Hortonworks

A couple weeks ago I posted a visual proof that

1 + 2 + 3 + \cdots + n = {n+1 \choose 2}

This says that the nth triangular number equals C(n+1, 2), the number of ways to choose two things from a set of n + 1 things.

I recently ran across a similar proof here. A simplex is a generalization of a triangle, and you can prove the equation above by counting the number of edges in simplices.

A 0-simplex is just a point. To make a 1-simplex, add another point and connect the two points with an edge. A 1-simplex is a line segment.

To make a 2-simplex, add a point not on the line segment and add two new edges, one to each vertex of the line segment. A 2-simplex is a triangle.

To make a 3-simplex, add point above the triangle and add three new edges, one to each vertex of the triangle. A 3-simplex is a tetrahedron.

Now proceed by analogy in higher dimensions. To make an an n-simplex, start with an n-1 simplex and add one new vertex and n new edges. This construction shows that the number of edges in an n simplex is 1 + 2 + 3 + … + n.

Another way to count edges is to note that an n-simplex has n+1 vertices and an edge between every pair of vertices. So an n simplex has C(n+1, 2) edges. So C(n+1, 2) must equal 1 + 2 + 3 + … + n.

Learn how you can modernize your data warehouse with Apache Hadoop. View an on-demand webinar now. Brought to you in partnership with Hortonworks.

Topics:

Published at DZone with permission of John Cook, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}