Description
Count equal adjacent symbols in a supplied word.
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.
Count equal adjacent symbols in a supplied word.
When to use this tool
Use Multiset Word Adjacent Equality Count when checking the stated word, set, multiset or composition convention.
How to use the tool and how it works
- Enter word. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read equalNeighbors. Use the output convention below.
Count equal adjacent symbols in a supplied word. Compare each position after the first with its predecessor and return equalNeighbors.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| word | Word | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| equalNeighbors | Equal Neighbors | Required. Safe integer. |
{
"input": {
"word": [
"a",
"a",
"b",
"b",
"b"
]
},
"output": {
"equalNeighbors": 3
}
} Limitations and assumptions
- The last and first positions are not compared; this is a linear word statistic rather than a circular adjacency count.
- 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
Similar or alternative tools
- Multiset Swap Orbit Size
Return the orbit size of exchanging two supplied positions.
- Lattice Word Symbol Budget
Check a lattice word's remaining symbol budget.