Parsing string of symbols from a finite alphabet into substrings is strictly related to time series complexity. One of the first quantitative measure complexity of symbolic sequences has been provided by Lempel and Ziv [1] . They presented an algorithm for parsing string of symbols from a finite alphabet into substrings using copy and insert operations as the following steps. D.-G Ke and Q.-Y. Tong [2] proposed some substantial modification of Lempel-Ziv algorithm by adding replication operation. Recently Kása [3] considered similar parsing of the symbolic sequeces into distinct set of substrings called d-substrings. Total number of the d-substrings is supposed to be a measure of sequence complexity.
In the following, subsequence resulting from parsing procedure will be call pattern. The pattern is a subsequence with the following properties: it includes an iterative sequence as its prefix, it remembers the history of the sequence and can repeat any series of successive operations in the memory, the last symbol of a lattice must be inserted into lattice unless the end of series is reached. In Appendix one can find listing of corresponding 3-step procedure in the Scilab [4] code. After parsing procedure is completed we are in possesion of a set of distinct patterns which correspond to original sequence, the patterns can be consecutively enumerated. The enumerated set of patterns is called the pattern spectrum ps of symbolic sequence.
Pattern spectrum can be used to identify some properties of symbolic sequence like complexity, entropy and similarity. Here I am going to consider its relation to entropy and similarity measure between two sequences.
Having spectrum of distinct subsequences in hand it is straightforward to calculate the number of subsequences of given length and afterwards the subsequences length distribution. For example typical sequence of nucleotides shows approximately normal (or may be Weibull like) distribution function with long and very thin tail on the long subsequences side. However spectrum of short amino acids subsequences can be quite different. Let be probability to find pattern of length l in pattern spectrum, then the Shannon definition of entropy can be used
2. Similarity between two symbolic sequences Sequence similarity is an important issue in symbolic sequence alignments. The aim of sequence comparison is to discover similarity relationships between various biological sequences. DNA or proteins can be similar with respect to their sequence of nucleic bases or amino acids . It is belived that high sequence similarity usually implies strong functional or structural similarity. A similarity measure provides a quantitative answer to question whether two sequences show a certain degree of similarity. The distance between two sequences is often used as a numerical measure of how dissimilar the sequences are. The similarity measure is dual to the dissimilarity of the sequences. Lower value of distance means greater similarity. It can also be very usufull to know where the two sequences are similar, and where they differ. An alignment showes similar region (subsequences) between two sequences.
There are numerous measures of similarity between symbolic sequences based on different distance measures between sequence of bases in the gene, or between some structural sequence invariants. The first group of algorithms essentially consists of plotting a point in 4 (or 2)-dimensional space corresponding to a base by moving one unit in a direction associated with the base. The cumulative plot of such points produces a graph that corresponds to the sequence of bases in the gene fragment under consideration. The measure of dissimilarity between two sequences is the Euclidean distance between the end points of the graph. This method has some disadvantages, first of all, the sequences may have different length, second, there is generally no fixed correspondence between their character positions and third, the computational complexity. An alternative to code sequence comparison is Randić [5] approach in which sequences are compared based on a set of structural sequence invariants. The idea is to represent a DNA sequence by an n-dimensional vectors or n-tuple of sequence invariants, typically resulting from a graphical representation of the DNA, and use a distance function for vectors to measure the distance between them. For comparison of very long sequences, e.g. whole genomes, an approach based on the frequency of k-mers that appear in a set of sequences are used [6] . A k-mer is a series of k consecutive letters in a sequence. The approach consists of counting occurrences of k-mers in a sequence, for k typically ranging from 2 to 8, and apply different statistical methods to k-mer distribution. However when the primary sequence is condensed into invariants or k-mers there is a loss of information on some aspects of the sequence.
In the presen paper new similarity measure is sugested. With the use of patern spectrum, similarity of two sequences and can be defined simply as
There %& , is a set of sequences common for the two sequences (intersection of ps 1 and ps 2 ), '%(&) %& , means length of the intersection set and * '%(&)
is length (dimension) of pattern vector ps. Pattern spectra ps 1 and ps 2 can be different dimension, sim value is restricted to the range between null and one. Similarity is symmetric function , so for set of sequences similarity matrix is symmetrical + , , + . Similarity calculation using Eq.2 is no time consuming in contrast to sequence parsing, in particular for sequences as long as 10 6 or more bases.
To illustrate how the measure introduced works, two short non coding sequences downloaded from [7] are considered. The first sequence is 'n21, AB017710, U50HG, Homo sapiens (human)' of n = 33 bases long and the second one is 'n64, AB061824, U58a, Homo sapiens (human)' of n = 64 bases long. After parsing is done the patterns spectrum of of first sequence ps 1 
1. Some 1-exon of β -globin gene sequences
At the beginning a set of exon-1 of the β-globin gene for the 10 species is examined. Sequences data are taken from Liu [8] and Basic [9] . Sequences are rather short, about one hundred bases. Similarity numbers between pairs of sequences were calculated from Eq. 2 . Row and column names correspond to species number according to Fig 1. It is seen that, as expected, the (human,gorilla) entry is the largest number, being 0.90, while the smallest one is (lemur,opossum). Similarity = 0 in the case of (lemur,opossum) pair means that there is no common pattern between the two sequences. I have compared my results to those obtained with the method based on 2-dimensional graphical representation of nucleotide sequences and calculation of the distance between geometrical structures. Liu [8] used one of them to characterize dissimilarities for the eight exon-1 β-globin genes. Entropy numbers of all sequences except #3, are significantly higher than that of β -globin gene sequences, in particular sequences #8 to #10.
Similarity data can be compared to those obtained by Wen and Li [11] with the use of alignmentfree method. Wen and Li by transforming base sequences into binary sequences found distance matrices of 24 complete coronavirus genomes. The distance matrices were used to characterize dissimilarities coronavirus genes. Like before, I have transformed his results into similarities and divided entries by factor 1.003 to have the same number for 
The last set of base sequences analyzed in the present paper are 5 shortest S. cerevisiae chromosomes. The longest one is above 3*10 5 bases long. Both, entropy data and similarity data suggest that genomes can be classified into three groups: a) 2micron with sim = 0.16 to 0.19 to group b) and sim = 0.24 to group c), b) chrI, chrIII and chrVI with sim = 0.54 between them and sim = 0.28 to 0.29 to group c), and c) chrM.
It can been useful to note that the ratio of patterns sequence shares with sequence , it is given by C
It follows that if for example s 1 = 2micro and s 2 = chrI then almost 98% of 2micro patterns is present among chrI patterns. It may be also interesting to analyse distribution of pattern lengths. In Fig 7 on the x-axis pattern length from 3 to 18 is shown, on the y-axis pattern length probability is represented. Typical plot for long nucleotide sequences is that like chrIII. 
The purpose of the present paper was to examine new measure of entropy of symbolic sequences and similarity between them. Crucial to the approach used is specific sequence parsing algorithm into set of distinct subsquences -patterns. Exploiting length of the set of patterns allows to define complexity, exploiting pattern lengths and its distribution allows to define Shanon entropy of symbolic sequence. Set of common patterns of two symbolic sequences has ben used to define new measure of similarity between them. A possible extension to this work is to investigate complexity of symbolic biological sequences. 