Zum Inhalt
HALOWERK

Datenvertragswerk

calkin wilf rational index audit

Reconstruct the exact Calkin-Wilf positive rational tree bijection. Root1/1; left child a/(a+b), right(a+b)/b. Own heap-index convention root1,left2n,right2n+1. Reduce supplied positive numerator/denominator1..128 by gcd; return exact decimal-string index, complete root-to-target ancestors and L/R path. Independently decode supplied index1..65535 and return its same complete artifact, plus equality of the two reduced rational nodes. Deepfractionindices stay exact decimal strings; no.

POST https://datenvertrag.halowerk.com/v1/calkin-wilf-rational-index-audit

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
fractionSiehe SchemaJa
indexSiehe SchemaJa
claimed_valueSiehe SchemaJa
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "properties": {
    "fraction": {
      "anyOf": [
        {
          "type": "array",
          "maxItems": 2,
          "items": {
            "type": "integer",
            "minimum": 1,
            "maximum": 128
          },
          "minItems": 2
        },
        {
          "type": "null"
        }
      ]
    },
    "index": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 1,
          "maximum": 65535
        },
        {
          "type": "null"
        }
      ]
    },
    "claimed_value": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "fraction_index": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "reduced": {
                      "type": "array",
                      "maxItems": 2,
                      "items": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 65536
                      },
                      "minItems": 2
                    },
                    "path": {
                      "type": "string",
                      "pattern": "^[LR]*$",
                      "maxLength": 127
                    },
                    "index_decimal": {
                      "type": "string",
                      "pattern": "^[1-9][0-9]*$",
                      "maxLength": 39
                    },
                    "ancestors": {
                      "type": "array",
                      "maxItems": 128,
                      "items": {
                        "type": "array",
                        "maxItems": 2,
                        "items": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 65536
                        },
                        "minItems": 2
                      },
                      "minItems": 1
                    }
                  },
                  "required": [
                    "reduced",
                    "path",
                    "index_decimal",
                    "ancestors"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "index_fraction": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "reduced": {
                      "type": "array",
                      "maxItems": 2,
                      "items": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 65536
                      },
                      "minItems": 2
                    },
                    "path": {
                      "type": "string",
                      "pattern": "^[LR]*$",
                      "maxLength": 127
                    },
                    "index_decimal": {
                      "type": "string",
                      "pattern": "^[1-9][0-9]*$",
                      "maxLength": 39
                    },
                    "ancestors": {
                      "type": "array",
                      "maxItems": 128,
                      "items": {
                        "type": "array",
                        "maxItems": 2,
                        "items": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 65536
                        },
                        "minItems": 2
                      },
                      "minItems": 1
                    }
                  },
                  "required": [
                    "reduced",
                    "path",
                    "index_decimal",
                    "ancestors"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "same_node": {
              "type": [
                "boolean",
                "null"
              ]
            }
          },
          "required": [
            "fraction_index",
            "index_fraction",
            "same_node"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "fraction",
    "index",
    "claimed_value"
  ],
  "additionalProperties": false
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "fraction": [
    2,
    3
  ],
  "index": 6,
  "claimed_value": {
    "fraction_index": {
      "reduced": [
        2,
        3
      ],
      "path": "RL",
      "index_decimal": "6",
      "ancestors": [
        [
          1,
          1
        ],
        [
          2,
          1
        ],
        [
          2,
          3
        ]
      ]
    },
    "index_fraction": {
      "reduced": [
        2,
        3
      ],
      "path": "RL",
      "index_decimal": "6",
      "ancestors": [
        [
          1,
          1
        ],
        [
          2,
          1
        ],
        [
          2,
          3
        ]
      ]
    },
    "same_node": true
  }
}

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 →