Description
Return alphabet^-newLength minus alphabet^-oldLength for integer lengths 0-1000 and alphabet 2-256.
A prefix-free code prevents any distinct codeword from beginning with another complete codeword. Kraft terms describe length budgets, while actual prefix relationships depend on the codewords themselves.
Return alphabet^-newLength minus alphabet^-oldLength for integer lengths 0-1000 and alphabet 2-256.
When to use this tool
Use Kraft Single Length Change Delta when you need one prefix relationship or code-length contribution.
How to use the tool and how it works
- Enter oldLength, newLength, alphabet. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read delta. Use the output convention below.
Return alphabet^-newLength minus alphabet^-oldLength for integer lengths 0-1000 and alphabet 2-256.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| oldLength | Old Length | Required. Safe integer; minimum 0; maximum 1000. |
| newLength | New Length | Required. Safe integer; minimum 0; maximum 1000. |
| alphabet | Alphabet | Required. Safe integer; minimum 2; maximum 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| delta | Delta | Required. Finite number. |
{
"input": {
"oldLength": 2,
"newLength": 3,
"alphabet": 2
},
"output": {
"delta": -0.125
}
} Limitations and assumptions
- This changes one Kraft-sum term, not a full prefix-code feasibility decision; very small contributions can underflow to zero.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Validate the complete codebook and alphabet before making a decoding or feasibility claim.
References
Similar or alternative tools
- Information: Kraft Single Codeword Term
Return exp(-length × ln(radix)) for integer length 0-1000 and radix at least two.
- Information: Ideal Codeword Length Integer Gap
Compute -ln(probability)/ln(radix) for idealLength, ceil it for integerLength, and return their gap.