Zum Inhalt
HALOWERK

Datenvertragswerk

minimum sorting network family

For a supplied wire count n0..4, synthesize EVERY minimum-COMPARATOR fixed sorting network. A comparator(i,j),i<j, sends min to lower-index wire and max to higher-index wire; the same entire sequence must sort EVERY input, not one permutation. Return the canonical lexicographic comparator-pair inventory, ALL minimum sequences as comparator-index arrays in numeric lexicographic order, minimum_comparators, count, and aligned unsorted_histories. Each history includes prefix0 through full.

POST https://datenvertrag.halowerk.com/v1/minimum-sorting-network-family

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
nSiehe SchemaJa
claimSiehe SchemaJa
Vollständiges Eingabeschema anzeigen
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "n",
    "claim"
  ],
  "properties": {
    "n": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 4
        },
        {
          "type": "null"
        }
      ]
    },
    "claim": {
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "comparators",
            "networks",
            "unsorted_histories",
            "minimum_comparators",
            "count"
          ],
          "properties": {
            "comparators": {
              "type": "array",
              "items": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 3
                },
                "minItems": 2,
                "maxItems": 2
              },
              "minItems": 0,
              "maxItems": 6
            },
            "networks": {
              "type": "array",
              "items": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 5
                },
                "minItems": 0,
                "maxItems": 5
              },
              "minItems": 0,
              "maxItems": 128
            },
            "unsorted_histories": {
              "type": "array",
              "items": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 16
                },
                "minItems": 1,
                "maxItems": 6
              },
              "minItems": 0,
              "maxItems": 128
            },
            "minimum_comparators": {
              "type": "integer",
              "minimum": 0,
              "maximum": 5
            },
            "count": {
              "type": "integer",
              "minimum": 0,
              "maximum": 128
            }
          }
        },
        {
          "type": "null"
        }
      ]
    }
  }
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "n": 2,
  "claim": {
    "comparators": [
      [
        0,
        1
      ]
    ],
    "networks": [
      [
        0
      ]
    ],
    "unsorted_histories": [
      [
        1,
        0
      ]
    ],
    "minimum_comparators": 1,
    "count": 1
  }
}

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 →