Datenvertragswerk
exact hafnian pairing ledger
For one symmetric zero-diagonal matrix on n 0..4 vertices, given as all n*(n-1)/2 upper-triangle entries 0..2 in lexicographic pair order, computes the exact hafnian: the sum over all unordered perfect pairings of the product of the selected matrix entries. Returns every canonical pairing, aligned term_products, hafnian=sum(products) and nonzero_terms; zero-product terms stay in the ledger. For 4 vertices h=w01*w23+w02*w13+w03*w12.
POST https://datenvertrag.halowerk.com/v1/exact-hafnian-pairing-ledgerInputs
| Field | Type | Required | Description |
|---|---|---|---|
| n | See schema | Yes | |
| weights | See schema | Yes | |
| claim | See schema | Yes |
Show full input schema
{
"type": "object",
"properties": {
"n": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 4
},
{
"type": "null"
}
]
},
"weights": {
"anyOf": [
{
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 2
},
"minItems": 0,
"maxItems": 6
},
{
"type": "null"
}
]
},
"claim": {
"anyOf": [
{
"type": "object",
"properties": {
"pairings": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 3
},
"minItems": 2,
"maxItems": 2
},
"minItems": 0,
"maxItems": 2
},
"minItems": 0,
"maxItems": 3
},
"term_products": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 16
},
"minItems": 0,
"maxItems": 3
},
"hafnian": {
"type": "integer",
"minimum": 0,
"maximum": 32
},
"nonzero_terms": {
"type": "integer",
"minimum": 0,
"maximum": 3
}
},
"required": [
"pairings",
"term_products",
"hafnian",
"nonzero_terms"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"n",
"weights",
"claim"
],
"additionalProperties": false
}Published input example
{
"n": 0,
"weights": [],
"claim": {
"pairings": [
[]
],
"term_products": [
1
],
"hafnian": 1,
"nonzero_terms": 1
}
}Result & documentation
Machine-readable documentation of this hub
Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.
More endpoints in this hub
- Datenvertragswerk0.003 USDC
acyclic automata probabilistic refinement witness
POSThttps://datenvertrag.halowerk.com/v1/acyclic-automata-probabilistic-refinement-witnessFor two finite action-labelled nondeterministic probabilistic automata return the WHOLE greatest DIRECTED STRONG SIMULATION relation, canonical single-transition matching couplings and exhaustive local negative Hall obstructions. Each of 1.
- Datenvertragswerk0.003 USDC
adjacency cospectral graph family
POSThttps://datenvertrag.halowerk.com/v1/adjacency-cospectral-graph-familyGiven n in 1..5 and a monic degree-n integer polynomial det(xI-A), returns every labelled simple undirected graph on vertices 0..n-1 with exactly that adjacency characteristic polynomial. Coefficients are in descending degree order, n+1 ent
- Datenvertragswerk0.003 USDC
adjacent swap permutation tour
POSThttps://datenvertrag.halowerk.com/v1/adjacent-swap-permutation-tourFor 0 to 5 labels starting at zero, construct the whole Steinhaus-Johnson-Trotter permutation tour from identity. Each transition swaps the largest mobile value with its adjacent smaller neighbor, then reverses directions of greater values.