K — Dendritic Structural Encoding (KDSE)

UHWare · C11 and Python reference implementations of KDSE-8 and KDSE-16

Public reference implementations · v1.0.3

Introduction

K — Dendritic Structural Encoding (KDSE) is UHWare's compact, delimiterless breadth-first encoding of finite full dendrites that supports both binary and q-ary forms. It defines Ordered canonical forms, terminal-depth profiles, and a deterministic threshold-and-loss operator.

The mathematical specification is language-independent. This release provides portable C11 and Python reference implementations of the KDSE-8 and KDSE-16 container forms.

Read the technical specification for the structural definition, validity rules, container distinction, and operator boundary.

New in v1.0.3: Python reference implementation

Full KDSE-8 and KDSE-16 APIs, command-line tools, exhaustive tests, direct C-reference parity checks, and a bidirectional Mermaid structural adapter. View the release.

Core definition

Tree class
Structural KDSE uses finite full (proper) binary trees: each node has either zero or two children.
Bit semantics
1 denotes a branch that creates two children; 0 denotes a terminal leaf.
Emission order
Bits are emitted breadth-first, with the upper child before the lower child.
Compactness
Only positions generated by preceding branch bits are encoded; the final all-terminal level is implicit and omitted.
Values
Values are independent of the structure and are listed in the same breadth-first order, including final leaves.
Ordered form
Ordered KDSE is a canonical subtype; a valid structural KDSE may use any full binary topology, including an unbalanced one.

Reference Implementations

ISO C11

Checked admission, trusted Ordered execution, terminal-depth profiles, canonicalization, compute libraries, CLIs, examples, and exhaustive tests.

Python 3.10+

C-aligned validation, profiles, Ordered canonicalization, computation, status codes, kdse-py and kdse16-py, plus KDSE ↔ Mermaid conversion.

The v1.0.3 validation suite passes all C tests and all 37 Python tests, including direct parity against the C reference.

Papers

1. Introductory Paper

Structural definition, Ordered form, and operator separation.
Read HTML · Download PDF

2. Instantaneous Jump Magnitude Paper

Threshold-and-loss operator and the identity Jd = T · cd.
Read HTML · Download PDF

Source Code

Complete v1.0.3 source archives:

Live repository: github.com/uhware/kdse

Status: Public reference implementations (v1.0.3). Read-only.

Licensing:

U.S. Patent Pending — Application No. 64/131,240

Commercial licensing: licensing@uhware.com

Security reports: security@uhware.com