Skip to content

Main content

Word Prefix Symbol Deficit Tool

Compare a supplied prefix’s exact symbol counts with target multiplicities, preserving overfill and unknown tokens.

Loading tool…

Description

Return symbol deficits of a supplied word prefix.

Combinatorial counts depend on whether objects are labeled, order matters, repetitions are permitted and a prefix is already fixed. Local counts, exact integer factors and feasibility bounds answer specific questions and need not enumerate complete objects.

Return symbol deficits of a supplied word prefix.

When to use this tool

Use Word Prefix Symbol Deficit when checking the stated word, set, multiset or composition convention.

How to use the tool and how it works

  1. Enter alphabet, targetCounts, prefix. Keep parallel arrays aligned. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read deficits, unknownTokens. Use the output convention below.

Return symbol deficits of a supplied word prefix. Require aligned unique alphabet/targetCounts with nonnegative targets; each deficit = target count minus literal prefix occurrences, unknownTokens preserves out-of-alphabet tokens.1

Input fieldMeaning and unitsAccepted input
alphabetAlphabetRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
targetCountsTarget CountsRequired. Array of safe integer; maximum items 256.
prefixPrefixRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
Output fieldInterpretationReturned shape
deficitsDeficitsRequired. Array of safe integer; maximum items 256.
unknownTokensUnknown TokensRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
json
{
  "input": {
    "alphabet": [
      "A",
      "B"
    ],
    "targetCounts": [
      3,
      2
    ],
    "prefix": [
      "A",
      "A",
      "B"
    ]
  },
  "output": {
    "deficits": [
      1,
      1
    ],
    "unknownTokens": []
  }
}

Limitations and assumptions

  • Negative deficits are retained; no feasible completion, sequence enumeration or probability is calculated.
  • 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.

Alternative or Complementary methods

Use complete objects and an appropriate exact counting, ranking or enumeration method when the local contribution is insufficient.

References

  1. Calculation and input contract: combinatorics/word-prefix-symbol-deficit — tool.io

Similar or alternative tools