Alphabet
An alphabet is an ordered set of unique elements of a sequence. The order of elements in the alphabet is defined by the order of their appearance in the original sequence.
Mathematical Definition
The alphabet \(A\) is defined as an ordered set: \(\(A = \{a_1, a_2, ..., a_m\}\)\)
Where: - \(m\) is called a power of the alphabet - \(a_i \neq a_j\) for all \(i \neq j\) where \(i,j \in [1..n]\) - \(a_i \in X\) for all \(i \in \{1,2,...,m\}\) - \(X\) is an unordered set - \(=\) is the equivalence relation defined on \(X\)
Examples
Binary Sequence
For sequence \(S = <0,1,1,0,1,0,0,1,1,0>\) The alphabet is \(A = \{0,1\}\)
Musical Chorus
For sequence \(S = <D,Dmaj7,D6,D,D\#dim,Em,A7,Em,A7,Em,A7,Em,A9,A7>\) The alphabet is \(A = \{D,Dmaj7,D6,D,D\#dim,Em,A7,A9\}\)
DNA Sequence
For sequence \(S = <A,T,G,C,T,A,G,C,A,T,G,C,T,A,G,C,A,T,G,C,T,A,G,C>\) The alphabet is \(A = \{A,T,G,C\}\)
Character Sequence
For sequence \(S = <t,h,e,\ ,q,u,i,c,k,\ ,b,r,o,w,n,\ ,f,o,x,\ ,j,u,m,p,s,\ ,o,v,e,r,\ ,t,h,e,\ ,l,a,z,y,\ ,d,o,g>\) The alphabet is \(A = \{t,h,e,\ ,q,u,i,c,k,b,r,o,w,n,f,x,j,m,p,s,v,l,a,z,y,d,g}\)
Word Sequence
For sequence \(S = <the,\ ,quick,\ ,brown,\ ,fox,\ ,jumps,\ ,over,\ ,the,\ ,lazy,\ ,dog>\) The alphabet is \(A = \{the,\ ,quick, brown, fox, , jumps, over, lazy, dog\}\)