Macaulay2 » Documentation
Packages » Posets :: moebiusFunction
next | previous | forward | backward | up | index | toc

# moebiusFunction -- computes the Moebius function at every pair of elements of a poset

- Usage:
    `mu = moebiusFunction P`
- Inputs:
  - P, an instance of the type Poset,
- Outputs:
  - mu, a hash table, the Moebius function of $P$

## Description

The Moebius function of $P$ is a function defined at pairs of vertices of $P$ with the properties: $mu(a,a) = 1$ for all $a$ in $P$, and $mu(a,b) = -sum(mu(a,c))$ over all $a \leq c < b$.

The Moebius function of the $n$ chain is $1$ at $(a,a)$ for all $a$, $-1$ at $(a, a+1)$ for $1 \leq a < n$, and $0$ every where else.

    i1 : moebiusFunction chain 3

    o1 = HashTable{(1, 1) => 1 }
                   (1, 2) => -1
                   (1, 3) => 0
                   (2, 1) => 0
                   (2, 2) => 1
                   (2, 3) => -1
                   (3, 1) => 0
                   (3, 2) => 0
                   (3, 3) => 1

    o1 : HashTable

## Ways to use moebiusFunction:

- `moebiusFunction(Poset)`

## For the programmer

The object moebiusFunction is a method function.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Posets.m2:5181:0.