User:Inthar/Style guide: Difference between revisions
m →Words |
m →Words |
||
Line 16: | Line 16: | ||
=== Words === | === Words === | ||
* Zero-indexing is used for word indices. | * Zero-indexing is used for word indices. | ||
* A ''(linear) word'' is a function <math>w : [n]_0 \to \mathcal{A}</math> where <math>\mathcal{A}</math> is a set of letters and <math>n \in \mathbb{Z}_{\ge 0}.</math> ''n'' is called the ''length'' of ''w''. The letter of ''w'' at index ''i'' is denoted ''w''[''i'']. If 0 ≤ ''i'' < ''j'' ≤ |''w''| − 1, the slice notation ''w''[''i'':''j''] denotes the (''j'' − ''i'')-letter word ''w''[''i'']''w''[''i''+1]...''w''[''j''−1]. | * A ''(linear) word'' is a function <math>w : [n]_0 \to \mathcal{A}</math> where <math>\mathcal{A}</math> is a set of letters and <math>n \in \mathbb{Z}_{\ge 0}.</math> ''n'', possibly infinite, is called the ''length'' of ''w''. The letter of ''w'' at index ''i'' is denoted ''w''[''i'']. If 0 ≤ ''i'' < ''j'' ≤ |''w''| − 1, the slice notation ''w''[''i'':''j''] denotes the (''j'' − ''i'')-letter word ''w''[''i'']''w''[''i''+1]...''w''[''j''−1]. | ||
* A ''based circular word'' is a function <math> s: \mathbb{Z}/n \to \mathcal{A},</math> where by abuse of notation, ''s''[''i''] is used for ''s''[''i'' mod ''n'']. The ''period'' of a based circular word ''s'' is the minimal <math>p, 1 \le p \le |s|,</math> such that for all ''i'', <math>s[i+p]=s[i].</math> If the period of ''s'' is equal to the length of ''s'', then ''s'' is called ''primitive''. | * A ''based circular word'' is a function <math> s: \mathbb{Z}/n \to \mathcal{A},</math> where by abuse of notation, ''s''[''i''] is used for ''s''[''i'' mod ''n'']. The ''period'' of a based circular word ''s'' is the minimal <math>p, 1 \le p \le |s|,</math> such that for all ''i'', <math>s[i+p]=s[i].</math> If the period of ''s'' is equal to the length of ''s'', then ''s'' is called ''primitive''. | ||
* A ''(free) circular word'' is an equivalence class of based circular words equivalent under rotation, i.e. a set of the form <math>\{x\mapsto s[x], x\mapsto s[x+1], ..., x\mapsto s[x+|s|-1] \}</math> for ''s'' a based circular word. A based circular word may be called a ''mode'' of the corresponding free circular word or a rotation of the based circular word. | * A ''(free) circular word'' is an equivalence class of based circular words equivalent under rotation, i.e. a set of the form <math>\{x\mapsto s[x], x\mapsto s[x+1], ..., x\mapsto s[x+|s|-1] \}</math> for ''s'' a based circular word. A based circular word may be called a ''mode'' of the corresponding free circular word or a rotation of the based circular word. |