---
tag: TKBPPBP9C6
kind: concept
name: Weight (strings)
sources:
  - wikipedia: en:6417882@r921563850
    locator: Weight (strings)
    note: adopted
    mention: wikipedia://en/6417882
    sections: [Summary]
same_as:
  wikidata: Q7979859
  wikipedia: Weight (strings)
inventory: [Y14G9VJ91D]
---

## Summary

The $a$-**weight** of a string, for a letter $a$, is the number of times that letter occurs in the string. More precisely, let $A$ be a finite set (called the *alphabet*), $a\in A$ a *letter* of $A$, and $c\in A^*$ a *string* (where $A^*$ is the free monoid generated by the elements of $A$, equivalently the set of strings, including the empty string, whose letters are from $A$). Then the $a$-*weight* of $c$, denoted by $\mathrm{wt}_a(c)$, is the number of times the generator $a$ occurs in the unique expression for $c$ as a product (concatenation) of letters in $A$.
