Learn R Programming

SimplicialComplex (version 0.1.0)

euler_characteristic: Compute the Euler characteristic \(\chi\) of a simplicial complex

Description

Compute the Euler characteristic \(\chi\) of a simplicial complex

Usage

euler_characteristic(simplices, tol)

Value

An integer representing the Euler characteristic \(\chi\).

Arguments

simplices

A list of simplices (each a numeric vector).

tol

Optional numerical tolerance to pass to rankMatrix().

Details

The Euler characteristic is computed as: $$\chi = \sum_{k=0}^{k_{\max}} (-1)^k \beta_k$$ where \(\beta_k\) is the \(k\)th Betti number, and \(k_{\max}\) is the highest dimension of any simplex in the complex.

Interpretation of values:

  • \(\chi = 2\): Sphere-like surfaces

  • \(\chi = 1\): Disk-like spaces

  • \(\chi = 0\): Torus-like or circle-like spaces

  • \(\chi < 0\): Surfaces with multiple handles or genus

See Also

betti_number

Examples

Run this code
simplices <- list(c(1, 2), c(3, 4), c(2, 1, 3), c(4, 2))
euler_characteristic(simplices, tol=0.1)

Run the code above in your browser using DataLab