User:Inthar/Style guide: Difference between revisions
m →Words |
m →Words |
||
Line 17: | Line 17: | ||
* 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'' 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'']. A ''period'' of a 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'']. A ''period'' of a 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 a class of based circular words equivalent under rotation: <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. | * A ''(free) circular word'' is a class of based circular words equivalent under rotation: <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. | ||
* The length of a linear, based circular, or free circular word ''s'' is denoted {{len|''s''}} or len(''s''). | * The length of a linear, based circular, or free circular word ''s'' is denoted {{len|''s''}} or len(''s''). | ||
* For circular words ''s'', if ''i'' < ''j'' the slice notation ''s''[''i'':''j''] denotes the (''j'' − ''i'')-letter word ''s''[''i'']''s''[''i''+1]...''s''[''j''−1], where all indices are taken mod {{len|''s''}}. | * For circular words ''s'', if ''i'' < ''j'' the slice notation ''s''[''i'':''j''] denotes the (''j'' − ''i'')-letter word ''s''[''i'']''s''[''i''+1]...''s''[''j''−1], where all indices are taken mod {{len|''s''}}. |