Zum Inhalt
HALOWERK

Datenvertragswerk

reduced adjacent swap word inventory

For a complete permutation of0..n-1,n0..5, construct ALL shortest words of adjacent POSITION swaps which sort it to identity. Each word lists zero-based left positions, applied left-to-right to the supplied source permutation. Return numeric-lexsorted whole word inventory, exact minimum swap length, exact word count and the complete permutation-state trace of the first word. Empty/identity permutations have one empty word. Compare both supplied count and minimum-length claim by field name;.

POST https://datenvertrag.halowerk.com/v1/reduced-adjacent-swap-word-inventory

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
permutationSiehe SchemaJa
claimSiehe SchemaJa
Vollständiges Eingabeschema anzeigen
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "permutation",
    "claim"
  ],
  "properties": {
    "permutation": {
      "anyOf": [
        {
          "type": "array",
          "maxItems": 5,
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 4
          },
          "uniqueItems": true
        },
        {
          "type": "null"
        }
      ]
    },
    "claim": {
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "minimum_swaps",
            "word_count"
          ],
          "properties": {
            "minimum_swaps": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10
            },
            "word_count": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            }
          }
        },
        {
          "type": "null"
        }
      ]
    }
  }
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "permutation": [
    2,
    1,
    0
  ],
  "claim": {
    "minimum_swaps": 3,
    "word_count": 2
  }
}

Ergebnis & Dokumentation

Maschinenlesbare Dokumentation dieses Hubs

Quelle dieser Seite: der veröffentlichte HALOWERK-Katalog. Stand: 2026-11-07, 02:42 UTC.

Weitere Endpunkte dieses Hubs

Alle Endpunkte dieses Hubs →