Skip to content
HALOWERK

Datenvertragswerk

classical pattern avoiding permutation family

For length n0..5 and one original permutation pattern of length1..4 on0..m-1, generate EVERY permutation of0..n-1 with no increasing index subsequence whose selected values have that pattern relative order. Gaps are allowed; this is classical, not consecutive pattern avoidance. Return all full permutations in numeric lexicographic order, count, and inversion_histogram indexed0..n*(n-1)/2 including zero bins. Empty source length has one empty permutation; a one-letter pattern forbids every.

POST https://datenvertrag.halowerk.com/v1/classical-pattern-avoiding-permutation-family

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
nSee schemaYes
patternSee schemaYes
claimSee schemaYes
Show full input schema
{
  "type": "object",
  "properties": {
    "n": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 5
        },
        {
          "type": "null"
        }
      ]
    },
    "pattern": {
      "anyOf": [
        {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 3
          },
          "minItems": 1,
          "maxItems": 4
        },
        {
          "type": "null"
        }
      ]
    },
    "claim": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "permutations": {
              "type": "array",
              "items": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 4
                },
                "minItems": 0,
                "maxItems": 5
              },
              "minItems": 0,
              "maxItems": 120
            },
            "count": {
              "type": "integer",
              "minimum": 0,
              "maximum": 120
            },
            "inversion_histogram": {
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": 0,
                "maximum": 120
              },
              "minItems": 1,
              "maxItems": 11
            }
          },
          "required": [
            "permutations",
            "count",
            "inversion_histogram"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "n",
    "pattern",
    "claim"
  ],
  "additionalProperties": false
}

Open original schema

Published input example

{
  "n": 0,
  "pattern": [
    0
  ],
  "claim": {
    "permutations": [
      []
    ],
    "count": 1,
    "inversion_histogram": [
      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

All endpoints in this hub โ†’