Algorithm for calculating theoretical probabilities of patterns generated by sequential inequality testing

Algorithm for calculating theoretical probabilities of patterns generated by sequential inequality testing

ALGORITHM FOR CALCULATING THEORETICAL PROBABILITIES PATTERNS GENERATED BY SEQUENTIAL INEQUALITY TESTING GREGORY T. MARCZYNSKI* Department of Pharma...

1MB Sizes 2 Downloads 38 Views

ALGORITHM FOR CALCULATING THEORETICAL PROBABILITIES PATTERNS GENERATED BY SEQUENTIAL INEQUALITY TESTING

GREGORY

T. MARCZYNSKI*

Department of Pharmacology and Intercampus Bioengineering of Medicine, Chicago, IL 60612 (U.S.A.) (Received

OF

8 February,

Program University of Illinois College

1983)

Temporal patterns of extracellularly monitored single neuronal impulses or ‘spike’ trains can be viewed as stochastic point processes that carry information from one neuron to another. There are indications that the dependencies among sequential spike intervals, if treated as sequential inequality patterns, encompass much more than 7 spike intervals. Hence, to fill the gap between the available knowledge and the experimental need, a limited stochastic model of inequality patterns was reviewed and its inherent symmetries were explored. The symmetric attributes of the model, based on three through seven spike intervals, led to an algorithm which allows one to readily compute the theoretical distribution of inequality patterns of considerable complexity and length suitable for studying neuronal responses and other phenomena.

1. Introduction a. Motivation The complexity of integrative processes in the association nuclei of the mammalian brain, and the need for re-coding and compression of the converging information (both in time and number), exceed the capacity of the code based on the frequency of impulses (Mountcastle, 1967). The implication of this view is that the polysensory neurons most likely utilize temporal patterns of impulses, because the latter have greater capacity to carry information than the frequency code (Stein, 1970). The mechanisms by which the temporal patterns are generated contradict the classical notion that neurons are passive integrators of input. Following the action potential, the depolarizing wave from the axon hillock invades the soma and dendrites; its coincidence and summation with impulses at specific dendritic loci may become critical factors that modulate the timing of the action potentials at the axon hillock (Calvin, 1980). Moreover, the proper timing of

*Current address: Department Urbana, Illinois 61801, U.S.A.

of Biochemistry,

University

of Illinois

463

ht. J. Bio-Medical Computing (14) (1983) 46-86 0020-7101/83/$03.00 @ 1983 Elsevier Printed and Published in Ireland

Scientific

Publishers

Ireland

Ltd.

at Urbana-Champaign,

G.T. Marczynski

464

the retrograde influences may serve as a gating mechanism of input. The role of temporal patterns in information processing is further emphasized by the observations that the synaptic contacts received by neurons from two different pathways are not randomly distributed, but are segregated and precisely confined to specific regions of the dendritic tree (Hoffert et al., 1982): and thus may generate different patterns of action potentials. The conventional analysis techniques for neuronal spike trains, such as the autocorrelogram and the joint interval histogram, have severe limitations (cfi MacGregor and Lewis, 1977; Sherry and Klemm, 1980). The former is not sensitive to patterns if they occur at arbitrary times in the spike train, and the if applied to patterns joint interval histogram technique is very cumbersome composed of more than two spike intervals. Moreover, both techniques are not valid if the spike trains are not stationary. Since the non-stationary behavior is one of the outstanding and physiological attributes of the central nervous system neurons (Perkel ef al., 1967), the usefulness of the aforementioned techniques is questionable and justifies the search for alternative methods. b. Definition

of problem

It was proposed that relative relations between sequential time intervals of single neuronal action potentials may carry information and therefore may be an important measure of a neuronal activity (Marczynski and Sherry, 1971; Sherry and Marczynski, 1972; Marczynski et al., 1980). Hence, the following method of analyzing a long sequence of time intervals was designed as shown in Fig. 1. Neuronal action potentials are viewed as point events on a time line (often called a spike train), and the adjacent time intervals are paired and subjected to inequality testing, a process which advances one interval at a time. According to the adopted convention, if the second time interval of the pair is longer than the first, a (+) sign is generated, but if the interval is shorter than the first one, a (-) sign is generated. In such a way a long sequence of signs (+) and (-) is formed which is complementary to a long sequence of time intervals.

Sequential time intervals

Fig. 1. Sequential

inequality

testing

of intervals.

Model of inequality patterns

465

When the measurements of intervals have proper resolution, the occurrence of equal intervals and sign (0) can be virtually eliminated (Brudno and Marczynski, 1977; Marczynski er al., 1982). A short sequence of signs (f) and (--) II being the number of both (+) and (-) signs in the was termed an “n-gram”; inequality pattern. The exact order of signs is considered important. A sequence of (n + 1) time intervals may generate any one of 2” different n-grams. Table 1 provides an example of empirical and theoretical distribution of all possible 3-gram permutations. It is apparent that: (a) according to the model of random and/or independent occurrences of intervals (see below), the theoretical probabilities of 3-grams are not equal; (b) during slow wave sleep, the empirical occurrences of 3-gram patterns closely follow the theoretical model, as indicated by the x2 tests; and (c) during a state of quiet wakefulness, the same neuron emits patterns whose distribution significantly deviates from the et al., 1982). The contrast between the wakefulness and model (Marczynski sleep is even much greater when one compares the departures from the model of hexagrams i.e. patterns consisting of six inequality signs (Fig. 2). It is apparent from Fig. 1 that the specific theoretical distribution of 3-grams and that of any longer pattern, is generated by the overlapping inequality TABLE

1

ACTUALLY OBSERVED AND THEORETICALLY EXPECTED DISTRIBUTIONS OF 3 GRAM PATTERNS FOR TWO DIFFERENT BEHAVIORAL STATES OF THE ANIMAL Pulvinar nucleus; neuron 1138/9; data from Marczynski ef al. (1982). 3-grams

Theoretical probability

Slow wave sleep

Occurrence

1+++

2++3+-+

4t-s-++ 6-+7-pi 8---

0.04167 0.12500 0.20833 0.12500 0.12500 0.20833 0.12500 0.04167

TOTAL CONFIDENCE

LEVEL

Quiet wakefulness

X2

Observed

Theoretical

74 221 366 235 223 385 239 86

76.2 228.6 381.0 228.6 228.6 381.0 228.6 76.2

1829

Occurrence

X2

Observed

Theoretical

0.1 0.2 0.6 0.2 0.1 0.0 0.5 1.2

102 244 342 228 242 324 234 98

76.0 228.0 380.0 228.0 228.0 380.0 228.0 76.0

8.9 1.1 3.8 0.0 0.8 5.7 0.1 6.4

1829

2.9

1824

1824

20.2

df. = 7

P = 0.8

P ^- 0.005

G. T. Marczynski

466

PULVINAR NUCLEUS: NEURON 1138/9/u2

I

I

SLOW WAVE SLEEP

lo_! NUMBER OF EVENTS: 974(+); 10X(-); O(O)* 08=99 , NUMBER OF PATTERNS :1627 ; MEAN RATE : ;/SEC ( x2=59; PzO.5 5-1 I

8

I I

o

8

0

to

0

80

0 0 L 08 0 8 8 0 8 0 0 ooo*8o**o8on**ooo8o8ooo8oo**oo**o8o8*o*o*oo*o8o*8o*o*****o*o***o

_A

PATTERN No

0800808

??

8

8 I

8

8

a 8

88

*---*---~*~~-~L-~~-L_~__~___ ~~~___*__~_~____L_~_-*____I____--~--_1 60 30 40 50 10 20 QUIET WAKEFULNESS

NUMBER OF EVENTS: 1021(t); 997(-); 7(O); OB=lOO : NUMBER OF PATTERNS: 1567 ; MEAN RATE :8/SEC l5 i x2=139; PLO.001 I I I

8 f 8

8

8

8 8

8

8

8

8 8

t

t

8

8

8

8

8 88

0

8 8

88 88

8 8

0

8

88

*

I

8

t 8

t 8

I

8

f

f

8

8

8

8

8

I I

8 88

8 88

8 088 8088

8

0

f 8

08 08

8

88 08 88 co 8 8 t*** 0 8 088 000 o***o88***o**oo**oooooo***oooo8*8*8o*~*ooooo*oo~****oa*ou*o*****

I)_!

PATTERN No

1

~___‘____~~___‘____~____*____~~___~____~

000

*____*____*-__-*___-I--____

50 t-t-t-t-t-t-t-t-t-t-t-t-t-t-t-t-t-t-t-t-t-t-t-t-t-t-t-t-t-t-t-ttt--tt--tt--tt--tt--tt--tt--tt--tt-~tt--tt--tt--tt--t~--tt--tt-tttt----tttt----tttt----tttt----tttt----tttt----tttt----tttt---ttt~ttt--------tttttttt--------tttttttt--------tttttttt-------tttttttttttttttt----------------tttttttttttttttt---------------ttttt*tttttttttttttttt+tttttttt-__-_._-_________________________ PATTERNS

0

o*

60

Fig. 2. Departures of the hexagram pattern distribution from the theoretical model in neuronal spike train recorded from the feline puivinar nucleus of thalamus during quiet wakefulness and slow wave sleep (the same record was previously used for the analysis of trigram pattern distribution in Table 1). The chi-square values (ordinate) are plotted for each of the 64 possible patterns (abscissa) shown at the bottom plot. Patterns are arranged vertically and are numbered from left to right. Many patterns occurred much more often than expected by the theoretical model (starred columns) while others occurred much less often than expected (open circle columns). The overall departure from the model was highly significant during quiet wakefulness, while it was not significant during sleep. OB = out-of-bound intervals, i.e. longer than 800 ms. Based on data from Marczynski et al. (1982).

Model of inequaliry parterns

467

testing which advances one interval at a time, and therefore each interval (except the first and the last) participates twice in this process. This results in complex dependencies among the inequality patterns. Hence, the following problem was posed: Given a random sequence of (n + 1) time intervals, 7;, where i = 1, 2. . . . . (n + l), what is the probability that they will generate any particular n-gram? For relatively short n-grams (3-grams through 5-grams), this problem was first solved by Saxena et al. (1972) in response to the experimental need for a theoretical model of a system which generates n-grams randomly (Marczynski and Sherry, 1971). Later, the model was extended to 6-grams (Fig. 3) using a very tedious permutation method (Brudno and Marczynski, 1977). At the same time, it became apparent that the knowledge of theoretical distribution of much longer n-grams is necessary to characterize the stochastic point processes derived from neuronal activity. However, to find, for instance, the theoretical distribution of 1 l-grams, 12! = 4.8 X 108 permutations would be required, or over 15 years of work at a rate of one permutation per second. Hence, the aim of this study is to satisfy the need for knowledge of distribution

TABLE

2

n-GRAM

0 1 2 3

t

PROBABILITY

2-grams

Ni

(2 + l)!

++ +_

1 2

6

ii

2 1

NUMERATORS n

4-grams

0 1 2 3

++++ +++++-+

7 8

+---+++

9

-++-+-+ -+---++ --+---+ -_--

t+-1 +-++ 5 +-+6 +--+

I’0

1 2 3 4 5

Nit

(4+ l)!

I

120

4 9 6 9 16 11 4 4 11 16 9 6 9 4 1

m

5-grams

0 +++++ 1 ++++2 +++-+ 3 +++-4++-++ 5 ++-+6 ++--+ 7 ++--8 +-+++ 9 +-++10 +-+-+ 11 +-+--’ 12 +--++ 13 +--+14 f----f 15 +----

N:

(5 + l)!

1 5 14 10 19 35 26 10 14 40 61 35 26 40 19 5

720

4623

G.T. Marczynski

0.053968

_-_w__________

_-_.

m w Y

lr(

1

0.035913,, m 0.033532 _____________T_tt_+__{__ 4 t a 0.030754 c(

0 p: CL

0.026190 0.022024

-I

4 0

i-

w

0.019643 0.017857 0.015476 0.014087 0.012698

CL 0

K%M

w I

K$X8

I-

0.003968

8%:P;x Cl:000198 PATTERN

--tt--tt--tc--tt--tt--tttt----t+tt----4tt tt--------t+tttttt--.. . ++++t+++t+t++t++------------ ----tttttttttttttttt________________ tttttttttttt4ttt4tttttttttt4t4tt-------------------------~-----I""

PATTERNS

Fig. 3. Theoretical probabilities for the occurrences of hexagram patterns, i.e. consisting of six inequality signs. The probabilities (ordinate) are plotted for each of 64 possible sign permutations or patterns (abscissa). The patterns are arranged vertically and are numbered from left to right. To facilitate the appreciation of the symmetry of distribution, every fifth line pointing to a pattern was drawn with a double width. By collapsing the probabilities for sequential pairs. or sequential four hexagrams, one obtains the probabilities for 32 S-grams and 16 Cgrams, respectively.

Model of inequalitypatterns

469

of long inequality patterns. This will be done by exploring and exploiting the inherent symmetries in pattern distribution, and developing a new method for computing the n-gram numerator coefficients based on the permutation approach. This method lends itself very well to computer programming. In principle, the new method can readily provide probability tables of any size. Thus far, the outlined computer program has been used to calculate and print-out complete 5-gram through 1l-gram probability tables in the form illustrated in Table 2. For the sake of clarity and completeness, the next section will be devoted to summarizing the theorems and the n-gram probability laws which, thus far, received only cursory treatment in neurophysiologic papers (Marczynski ef al., 1980, 1982). 2. Two theorems

concerning

the inequality

patterns

It was first believed that the derivation of theoretical distribution of n-gram patterns would depend on many parameters of the spike train such as the mean rate and the shape of the non-sequential time interval histogram. However, it was discovered that only two simple assumptions are needed to find n-gram probabilities, and that these probabilities are always constant and therefore independent of all parameters that characterize the spike train and interval histogram. Assuming that the time intervals 7;, i = 1,2,. . , (n + l), are independent random variables, and that they have some arbitrary probability density function f(z), which approximates the shape of a non-sequential time interval histogram, Saxena et al. (1972) derived the following two theorems. (The proof for the theorems will be given in section 5 of this study). Theorem I: The probability of a pure (+) sign n-gram (denoted +“) is independent of f(T,), i.e. this probability is histogram-independent, and it is equal to I/(n + l)!: P(+“)= l/(n + l)!. For example, P(+‘) = P(+++) = l/4! = l/24. Theorer?z 2: The probability of an n-gram which contains any particular (-) sign can always be expressed in terms of simpler probabilities which do not involve that particular (-) sign. If A and B stand for arbitrary sequences of (+) and (-) signs which ‘surround’ a (-) sign, and so form the n-gram. A(-)B. then relation is always true: the following probability P(A(-)B) = P(A)P(B) - P(A(+)B). For example, P(+ + - +) = P(+ +)P(+) - P(+ + + +) = (l/3!) (l/2!)l/5! = 91120. These two theorems combined show that all n-grams have probabilities which are independent of f(z), i .e. histogram-independent, and they also provide a means for calculating all n-gram probabilities as instanced in the

G.T. Marczynski

470

following

example: P(+-+)P(+)-P(+-+++)

zq+-+-+)=

= P(+)P(+)P(+) =

l/8-

l/48-

- P(+ + +)P(+)-

l/48+

P(+)P(+

+ +) + P(-t’)

l/720

= 611720 In the previous example, theorem No. 2 is applied twice, once for each (-) signs, and the result is an expression which involves only pure (+) sign n-grams whose probabilities are defined in theorem No. 1. Table 2 summarizes all of the n-gram probabilities up to 5 grams. Such a table was first computed using the above two theorems. The n-grams are listed from top to bottom in a binary numeric order (the decimal equivalents are denoted by m). In the adopted convention, a (+) sign and a (-) sign stands for zero and one, respectively, and in this way each n-gram is given a unique place in the list. The n-gram probabilities can be expressed as ratios between a numerator coefficient, N; and (n + l)!, P(n-gram) = N;/(n + I)!, therefore only the probability numerators are listed in Table 2.

3. Sensitivity to history of events The inherent dependence among sequential intervals and the inequality patterns they generate, determined by the overlapping, i.e. non-saltatory pairing of intervals (Fig. l), is the source of strength and value of the theoretical model because all transition probabilities of shorter to longer inequality patterns or n-grams are precisely determined by the history of events, as shown in Fig. 4. Thus, such a model is uniquely suitable for studying stochastic point processes related to function of biological systems presumably endowed with plasticity of responses and ‘memory’. As shown in Fig. 4, the transition probability of a S-gram (+ -++-) to a 6-gram pattern (+ - + + - -) is greater than the transition of a 5gram (- - + + -) to a 6-gram (- - + + - -), despite the fact that the history of both S-grams, going four steps back, is identical and differs only in the first event. Consequently, the probability, P, of the two 6-grams are different (they can be obtained by multiplying the transition probabilities along the specific paths leading to them). The value of 2” is the number of possible n-gram categories in a set, where n is equal to the number of inequality signs or n-gram length. The value of (n + l)! is the number of ways the intervals can be arranged to yield a set of 2” pattern categories.

Model of inequality patterns

4. Symmetries

in distribution

of inequality

471

patterns

In Table 2 only the first half of 5-grams are listed because the second half of the list can be found by considering its symmetry with the first half. These symmetries became fully evident when n-grams were listed in binary numeric order (Brudno and Marczynski, 1977) as shown in Table 1 and Table 2. The symmetries, as most prominent are the mirror, inverse, and mirror-inverse shown below. Mirror line

M Mirrored

Inverse

n-gram 0 ++-+ line _ _ + _

Inverse

n-gram

MI Mirrored-Inverse

Original

KLEIN

I

FOUR

n-gram

+-f-t -+__

n-gram

GROUP

0

M

I

MI

0

0

M

I

MI

M

M

0

MI

I

I

I

MI

0

M

MI

MI

I

M

0

As an example, the above four inverse patterns have the same probability of 9/120, as shown in Table 2. The symmetry operations 0, M, I, and MI, which leave the n-gram probabilities unchanged, form the well-known Klein Four Group whose multiplication table is shown above. The method for calculating the n-gram probabilities, as formulated in the theorems Nos. 1 and 2, does not take the advantage of the symmetries nor does it explain them, and yet the fact that the n-gram probabilities are constant and independent of statistical attributes derived from the non-sequential time

G. T. Marczynski

472

14/54,(+-+++)

S(+_*_)y+-++-+I 111,'280 =.3964

s(--+++)

1,1/182

(+-++--I P=o.o22024*

(--++-+)

(--++-)< 7,,,82

z.3901 2" (n+l)!

2 2

4 6

8 24

16 120

32 7io

(--++--)

P=0.014087*

64 5040

Fig. 4. The influence of earlier states on transition probabilities of shorter to longer inequality patterns. For the sake of clarity, only four S-grams and four 6-grams are shown. The value of 2” is the number of possible categories or patterns, where n is equal to the number of signs or patiern length. The value of (n + l)! is the number of ways the intervals can be arranged to yield a set of 2” pattern categories of a given length. For further explanations, see the text.

interval histogram, such as the mean and standard deviation, implies a fundamental symmetry which cancels out the statistical parameters. An alternative method for deriving n-gram probabilities was proposed (Brudno and Marczynski, 1977) an approach which is based on symmetries and permutation of a given set of different integers representing a random sequence of time intervals. For instance, the probabilities of 2-grams can be found by permuting integers 1, 2, 3 in 3! = 6 different ways, and then by noting how many times a particular 2-gram is generated when the integers are subjected to inequality testing, as shown below.

1+2+3

2_1+3

1+3_2

2+3-l

3_1+2

3-2-l

The 2-gram (+ -) occurs twice and its probability is 2/6, and it is equal to the probability of (- +). However, the probability of (+ +) = (- -) = l/6. The numerator coefficients NZ, m = 0, 1,2,3, that were previously used in Table 2 are equal to the number of times a 2-gram is generated. The probability of an n-gram is the ratio between the numerator coefficient and (n + l)!, as shown in Table 2.

Model of inequality patterns

473

5. Derivation of n-gram probability laws Here, the proof will be provided for the two previously spelled out theorems of Saxena et al. (1972) and for the permutation method of Brudno and Marczynski (1977) using the same assumptions. The probability that a particular n-gram is generated is the same as the probability that a set of sequential inequality conditions are satisfied when applied to sequential time intervals. For example, P(+) = P(T, < T2); P(-) = P(T, > T,); P(+ -) = P(T, < T2 > TX); P(+ - +) = P(T, < T2 > T3 < TJ. and so on. In general, the probability of any particular n-gram can be found by first defining a (n + I)-dimensional probability density function, denoted by T(,+,)), where the time intervals T, i = 1,2,. . . , (n + l), are the D(T,, T,, . . . , and second, by integrating over the independent variables of the function; (n + 1)-dimensional region, R, of intervals T,, T2, . . . , T(,,+l)which generate the particular n-gram. Therefore, P(n-gram)

D(TI, T2, . . . , T~,+I~)dT~,+I~~ . . dT, dT,

= R

The assumptions made by Saxena et al. reduce the general solution of the problem to their previously defined theorems. They assumed that the time intervals are independent events, and that each pool of intervals has the same arbitrary probability density function f(T), i = 1,2, . . . , (n + l), and that this function can be approximated by a non-sequential histogram of a large population of time intervals. By definition, f(z) is normalized over the range of IT;, and

Also, by definition, occurring between /” f(T)dT

f(X) = dP(IT;)/dT. Thus, the probability Tj = a and Ti = b can be expressed as

= P(b) - P(a)

of a time interval

(2)

The assumption of independence between the intervals reduces the (n + l)dimensional probability density function to the product of the density functions of its individual components. D(T,,

7’2,

. . . , T(n+d

=

f(TW”-2)

* * -fU’cn+d

(3)

474

G. T. Marczynski

The proof for the theorem No. 1 may now be given by choosing the appropriate limits of integration which define the region of points in (n + l)dimensional space containing the n-grams composed solely of signs (+), i.e. (+“I P(+“) = P(T, < T2 < T3 < . . + < Tc,+lj) f(T1lf(T~)f(T4

* . . P(Tcn+~))dTcn+,) . * . dT,dT,dT,

(4)

The limits of each integral specify the range of each of the (n + 1) time intervals. Tl may range from 0 to ~0, but T2 must range from Tl to 03, and so on, otherwise the inequality conditions would not be satisfied. By using the definition, f(z) = dP(T,)/Z, the above integral expression reduces upon evaluation to P(+“) = l/(n + l)! which is the theorem No. 1. Since in the present study the importance of symmetry is stressed, the proof for the ‘inverse’ theorem will also be given. P(-“)

= P(T, >Tl>

T3 > . * . > T(,+,))

f(T~)f(Tzlf(T~) . . *f(Tp,+~j)dTc,+~j. . . dT3dTzdT1 (5) after substituting

dP(T,)/dT

for f(T)

and candling

=j-omj-oT’j-oT~...JoT~ dP(T,)dP(T,)dP(T,) after rearranging

do,

* . * dP(T,,+,,)

the differentials,

after first integration, = lorndP(Tl)loT’ dP(T2) I,” dP(T,).

after second

* . I,“’ P(T,)dP(T,)

integration,

= JomdP(T,) I,” dP(Tz)j-oT2dP(T,). * . I,‘“’ [1/2Pz(T~,-l,)]dP(T(n-1))

Model of inequality patterns

475

after 12 integrations,

(6) =

&

Q.E.D.

(7)

After (n + 1) integrations, the (-“) probability expression reduces to a purely constant term even though no restrictions have been placed on f(7;) beyond those which are placed on all probability density functions. Theorem No. 2 can be proven by manipulating integral expressions (Saxena et al., 1972) but here a more intuitive proof will be given. Theorem No. 2 is true if the following probability expression is true: P(A(+)iB)

+

P(A(-)jB) = P(A)P(B)

(Here A and B stand for arbitrary (+) and subscript i refers to the sign in the i-th position the following probability expression is true: P(A(+)iB) +

P(A(-)J3) = P(A(+ or -)B),

and it is only required

and this means the intervening Time

T, V

Inequality

Testing

n-gram

-

(9)

(10)

that A and B must be independent sign is disregarded. The relations

intervals

(-) sign sequences, and the from the right.) By definition,

to show that,

P(A)P(B),

P(A(+or-)B)=

(8)

events when the identity of can be described as follows:

...T,T+I...T,+, vv

v

-

A(+ or -)B

A and B have no common time intervals, and T+i is only restricted by the i-th inequality condition, but (+ or -) means that TT;:+imay be either smaller or larger than T,, and so z+i is free to range from 0 to ~0. All subsequent time intervals after T,+i are constrained by 7;+, but not by Tl.Since it is assumed that the time intervals are independent events, A and B are also independent events; the theorem No. 2 of Saxena et al. follows from this property. The theorem No. 2, as already mentioned, can be used to transform an

476

G. T. Marczynski

n-gram composed of both (+) and (-) signs into an n-gram composed solely of (+) or (-) signs. For example, P(- - + -) = P(- -)P(-) - P(-“), and when this fact is combined with that of I’(+“) = P(-“) = l/(n + l)!, the redundant probabilities among mirror n-grams, inverse, as well as mirror-inverse n-grams (shown in section 3) are easily understood. 6. The intervals as vectors To understand why the permutation method gives the same results as the theorems of Saxena et al.. one must view a sequence of (n + 1) time intervals as a vector in (n + 1)-dimensional space. Each time interval vector can be associated with what might be called an ‘integer vector’ by simply replacing each time interval with the smallest possible integer representing the relative length of the time interval in the sequence, i.e. the larger the time interval, the larger the integer replacing it. For example, the time interval vector (10,32,47,25) may be associated with the integer vector (1,3,4,2). Both the time interval vector and its integer vector satisfy the same set of inequality conditions, i.e. they generate the same n-gram. The important point is that each (n + l)dimensional time interval vector can be associated with an integer vector which may be viewed as a permutation of the integers 1,2, . . . , (n + l), provided that the smallest time interval is replaced by 1, and no two time intervals are equal. The probability that any two time intervals are equal within a time interval vector is zero because the condition of 7; = Tj would limit the vectors to a subspace, and the probability integral over any subspace is always zero. Thus every time interval vector relevant to n-gram probabilities can be associated with a unique permutation of integers and they both generate the same n-gram. The whole set of relevant time interval vectors, denoted by Sn+,, can be divided into (n + l)! different regions of (n + 1)-dimensional space. Each region can be defined as a set of all time interval vectors that correspond to one and only one of the possible permutations of integers 1,2, . . . , (n + 1). Let Ri, i=1,2,..., (n + l)!, denote such regions, the subscript i representing the number given to a permutation in a ranked list of all possible permutations, as shown in Table 3. There are many different ways of ranking permutations but here it is only required to know that permutations can be numbered, and that RI corresponds the to the uniformly ascending permutation 1+2+3+ * . . +(n + 1) which generates n-gram composed solely of signs (+), and that R(,+r,! corresponds to the uniformly descending permutation (n + l)-(n)_(n - l)_ . * . -2-l which generates the n-gram composed solely of signs (-). All other permutations generate mixed sign n-grams. From the above considerations and theorem No. 1 of Saxena et al., it follows

477

Model of inequality patterns

TABLE

3

ONE-TO-ONE CORRESPOND’ENCE VECTORS AND PERMUTATIONS

i

Ranked permutations

1 2 3 4 5 6

1+2+3 e( 2_1+3~(55,7,88) 1+3_2~( 2+3-l ~(55,88,7) 3_ 1+2 c------* 3_2_ 1 -(88,55,7)

BETWEEN PERMUTATIONS OF INTEGERS

OF TIME

INTERVAL

All permutations of one vector in S3 7,55,88) 7-l 55-2 88-3

7,88,55) (88,7,55)

that

I’(+“) = P(RJ = ll(n + I)! It also becomes

apparent

S n+l = RiURJJ.

. . UR,,+i,!

and

P(-“)

= P(R,,+l,!) = l/(n + l)!

that the regions and

have the following

(11)

properties:

Ri fl Rj = 0, i# i

(12)

Most importantly, each region is composed of vectors which may generate only one particular n-gram because, by definition, each region is composed of time interval vectors which correspond to only one permutation. It follows that the set of all vectors that may generate a particular n-gram, denoted by (n-gram}, is always a union of one or more regions, {n-gram}

=

R,U .. . URk

(13)

For example, {+ -} = R3UR4, according to the ranking shown above in Table 3. The probability that a time interval vector will generate an n-gram is therefore the sum of region probabilities,

P(n-gram)

= i

P(Ri)

j c k

(14)

i=j

It remains

to be shown

P(R,)

=

Once

this is done,

l/(n + )!

that each region

is equally

i = 1,2, . . . , (N + l)! e.g. 14 may be redefined:

probable,

i.e. (15)

478

P(n-gram)

G.T. Marczynski

= 2

l/(n + l)! = iV;/(n

+ l)! ,

WI

where N:, previously called the ‘numerator coefficient’, is now identical to the number of regions that have to be united to form the total set of vectors generating a particular n-gram. By counting the permutations that generate a particular n-gram, one is also counting their corresponding regions, and so one indirectly obtains the numerator coefficients, N;. This procedure is equivalent to the previously discussed permutation method of Brudno and Marczynski (1977). One still needs to show that P(R,) = l/(n + l)! )

(17)

and this might be done by integrating over Ri i = 1,2,. . . , (n + l)!, and for the special cases, i = 1 and (n + l)!. This has already been done by Saxena et al. (1972) and in section 5. In general, defining the limits of integration for all Ri is very tedious. Instead, it will be shown that each region is equally weighted by the probability density function, D(Ti, Tz, . . . , T,,,). Given any vector in S,,+,, one can always form (n + l)! different vectors by permuting the order of its component time intervals in each of (n + l)! different ways, and an instance of this.is shown in Table 3. It is easy to see that each of these vectors belongs to one and only one region. Associated with every vector there is a probability density, and from the assumption that time intervals are independent events, one has the relation,

D(T,, Tz, . . ., Tn+d= f(T,)f(T,) . . ..f(Tn+l);

(18)

this means that the probability density function has values which are independent of the order of its component time intervals. It follows that each region has the same probability weighting, because for each vector in a given region there is exactly one vector in every other region. It should also be noted that the assumptions made by Saxena et al. are only when its component time used to show that D(Tl, T2,, . . , T,+,) is invariant intervals are permuted, and this is the key to explaining what was previously called histogram-independence. 7. Extension

of permutation

method

This new approach will be called the ‘transform method’ because on transforming small permutation tables into larger ones. The behind the transform method is very simple. One systematically small permutation tables into larger ones, and, at the same time, one the accompanying systematic changes in the n-gram distributions.

it is based basic idea transforms also notes With the

Model of inequalify parterns

479

proper transforms, the n-gram distribution changes can be deduced without generating the permutation tables. The following discussion will be facilitated if one now defines some useful symbols. Let Pk stand for the set of all permutations of the integers 1,2,. . , k. For example, P3 is the following set of 3! = 6 permutations: 1+2+3 2_1+3 1+3_2 3_1+2 3-2-l 2+3-l. Now let us define the transiorms which can change Pk into Pk+,. A specific example will be the best way to explain these transforms. The transforms that change P3 = 6 into P4 = 4! = 24 are shown below in Table 4a. Table 4a is divided into four columns which show the effects of each of four transforms on P3. Note that each transform acts by piacing the integer 4 in only one position among the integers 1,2,3, and that the order of the integers 1,2,3 is not changed in relation to one another. Thus, if one would remove the integer 4 from each coiumn in Table 4a, one would be left with four identical columns, and each of them would contain the complete set of 3! = 6 permutations P3. Each transform, ICI,, 02, V3, and Q4 , places the integer 4 in the position indicated by its suoscript, if one counts from the right to left. Table 4a contains the whole set of 4! = 24 permutations (PA). Thus. P4 represents a union of the transformed permutations: ~4 = Q,(P~)UQ~(P~)UQ~(P~)UQ~(P~)

In general, pk+, =

(19)

one can write the following:

Ql(Pk)UQ#k)U.

. .

uQk+dpk)

(20)

The transforms have simple and predictable effects ting Table 4a, one sees that transtorm VI generates 6 two signs are identical to the 2-grams of set P3, i.e. all 1,2,3 that yield the distribution of 2-grams shown

on n-grams. By inspecnew 3-grams whose first permutations of integers above. Thus, the new

TABLE 4a THE EFFECT OF SEQUENTIAL

QI U’3) 1+2+3+4 2_1+3+4 1+3_2+4 2+3_1+4 3_ 1+2+4 3m221+4

QdP3)

1+2+4_3 2_1+4_3 1+3+4_2 2+3+4_1 3_1+4_2 3-2+4-l

TRANSFORMS

ON 3-GRAM PATTERNS

Q3P3)

Qa(P3)

1+4_2+3 2+4_1+3 114-3-2 2+4_3_1 3+4_112 3+4-2-l

4_1+2+3 4_2_ 1+3 4_1+3_2 4_2,3_ 1 4_3_ 1+2 4_3_2_ 1

G.T. Marczynski

480

3-grams were generated by adding a sign (+) to the right side of each 2-gram. The knowledge that transform Q1 adds only a (+) sign to any n-gram generated by Pk allows one to avoid the trouble of generating all permutations of QI(Pk) and testing them for their distribution. Thus, without specifically knowing all permutations of Q1(P3), one can deduce 6 of a total 24 3-grams into which the 2-grams are incorporated, and find their incidence which is identical to that of the 2-grams shown above. In order to simplify the matter, one might write this transformation, without referring to permutations, as follows: (21: ++ 1

+++

+-2

+-+2

-+2 -- 1

--+

1

-++2 1

Note that the transform Q, preserves the 1,2,2,1 distribution teristic of 2-grams, because there is a one-to-one association permutations of Pj and the 6 permutations of Q,(P,).

which is characbetween the 6

The previous arguments can obviously be applied to the other transforms as well. Again by inspecting Table 4a, one sees that Q2 creates 3-grams by replacing the sign on the right side of each 2-gram in P3 with a (+ -) sign pair. Similarly, Q3 replaces the sign on the left side of the 2-grams with a (+ -) sign pair.

QZ:++ 1

Sf-

+-2

++-2

-+2 -- 1

-+-2

Q3:++l

1

-+-

1

+-+

1

+-2

+--2

-+2 -- 1

+-+2 +--1

Qq adds a (-) sign to the left side of each 2-gram. Qq:++l

-++

+-2

-+-2

-+2 -- 1

--+2 ---

1

1

481

Model of inequality patterns

The transforms Qi and Q4 create four different 3-grams from each of the four 2-grams, while the transforms Q2 and QX create only two different 3-grams from each of the four 2-grams. It can be said that Qi and Q4 map 2-grams into 3-grams in a one-to-one fashion, and that QZ and Q3 map 2-grams into 3-grams in a two-to-one fashion. Pk into Pk+l, the transform Qi will add a In general, when one is transforming (+) sign to the right side of each n-gram, Q k+l will add a (-) sign to the left side of each n-gram, and the remaining transforms Q2, Q3, . . . , Qk will each replace one sign in every n-gram with a (+ -) sign pair. 01 and Qk+i map n-grams into (n + I)-grams in a one-to-one fashion, and Qz, Q3,. . . , Qk map n-grams into (n + 1)-grams in a two-to-one fashion. If one were to number the signs in an n-gram from right to left, 2 through n + 1, (for example, ; i S i), then it can be said that each of the two-to-one transforms Qi(i = 2,3, . . , k) effect only the i-th sign by replacing it with a (+-) sign pair. For example, Q4 transforms (-++-) into (-+-+-). The effects of the transforms Qi, Q?, Qj, and Qq, which transform P3into Pd. and consequently transform 2-grams into 3-grams, can best be presented in a tabular form, such as Table 4b. Each column of Table 4a corresponds to a column of Table 4b which illustrates how 3-grams can be generated by transforms of 2-grams, i.e., by Qi(P3) where i = 1,2,3,4. The 2-gram coefficients are placed in the rows that correspond to the 3-grams each transform generates. For instance, Q2 is a two-to-one transform which changes the set of four 2-grams into either (++-) or (- +-). In columns Q2 the coefficients 1 and 2 of 2-grams (+ +) and (+ -) that are both transformed into 3-grams (+ + -) are placed in the second row. Likewise, the coefficients 2 and 1 of 2-grams (- +) and (--) are placed in the sixth row. One can obtain all 3-gram coefficients from Table 4b by simply summing the 2-gram coefficients in

TABLE

4b

A METHOD FOR GENERATING 3-GRAM COEFFICIENTS USING TRANSFORMS 3-grams 0+++1 1++-3 2+-+5 3+--3 4-tt3 5-+-s e-t3 7---

1

ch

02

Qs Q4

COEFFICIENTS

FROM 2-GRAM

G. T. Marczynski

482 TABLE

5

A METHOD FOR GENERATING 4-GRAM COEFFICIENTS USING TRANSFORMS

COEFFICIENTS

FROM 3-GRAM

N3 N4

o++++ 1+++2++-+ 3++-4+-++ 5+-+6+--+ 7+---

Ql -

1 4 9 6 9 16 11 4

1

5 3

4

3 3

16 9 6 9 4 1

5

3 1 -

QS

I 1 5 3

3

1

3

3 5 3

5 3 1

-

5

3 5

3

Q4

1

1 3

5

8-+++ 9-++-11 lo-+-+ ll-+-12--++ 13--+14---t 15----

T

1

3

Q3

Q2

3 1

1

-

1 3 5 3 3 5 3 1

each of the six rows. This is equivalent to summing all possible integer permutations that generate a particular 3-gram. Tables 5 and 6 are expanded versions of Table 4b, i.e. they are constructed by applying the properties of the permutation transforms. Hence, these tables illustrate how one can progressively deduce higher n-gram coefficients from the lower ones, using the principles expiained for Table 4b. 8. The outline of the computer

prugram

The transform memod readily suggests that one can automate the process of calculating the n-gram coetiicienrs. Essentially, the process illustrated in Table 4b, Table 5 and Table 6 consists of summation of one array of numbers which generates a larger array of numbers. One can write a compurer program which uses the previous results as follows. One begins with a known array of n-gram coefficients which are arranged in binary numeric order, exactly like the tables. This array will be in M(C) are summed called M(C), C = 1,2, . . . , 2”. The n-gram coefficients into another array which will be called N(I), I = 1,2, . . . , ?“+I. The transforms be viewed as operators which sum each Qj, i = 1,2, . . . , k + 1 can obviously

Model of inequality patterns TABLE

483

6

A METHOD FOR GENERATING S-GRAM COEFFICIENTS USING TRANSFORMS

NS

o+++++ 1++++2+++-+ 3+++-4++-++ 5++-+-35 6++--+26 7++---

COEFFICIENTS

01 1 5 14 10 19

FROM 4-GRAM

QS

Q4

Q6 -

1 1

4

4

1 4

9 6

9 9

1 9 4 16 9 11 6 4

6

6 10

8+-+++ 9+-++-40 IO+-+-+61 11+-+--35 12+--++26 13+--+-4.6 14+---+19 15+----

14

16-++++ 17-+++18-++-+4O 19-++--26 20-+-++35 21-+-+-61 22-i--+46 23-+---

5 19

24--+++ 25--++-26 266-+-i35 27--+-28---++ 29---+30----+ 31----_

10

9 9

1 4 9 6 9 16 11 4

16

16

9 16

11 4

11 11

4

4 5

4 11 16 9 6 9 4 1

4 11

4 11

16 9

16 16

9

6

9

4 1 6 9

9 14 -

19 10 14 5 1

6 6 9

4 1

6 9 4 1

1 4 9 6 9 16 11 4 4 11 16 9 6 9 4 1 -

element of array M(C) into a specific element of array N(I). With this new interpretation of the transforms in mind, one can rewrite Table 4b as Table 7. The FORTRAN program shown in the Appendix calculates n-gram coefficients exactly as illustrated in Table 4b, Table 5, Table 6 and Table 7.

G. T. Marczynski

484 TABLE

7

OUTLINE I

OF THE COMPUTER

N(Z)

PROGRAM

Ql

1+++ 2++-

1 3

M(1) = 1

3+-+ 4+--

5 3

M(2) = 2

5-++ 6-+-

3 5

M(3) = 2

7--i 8---

3 1

M(4) = 1

Q4

Q3

Q2

M(1) = 1, M(2) = 2 M(1) = 1, M(3) = 2 M(2) = 2, M(4) = 1 M(1) = 1 M(2) = 2

M(3) = 2, M(4) = 1

M(3) = 2 M(4) = 1

Each time that DO LOOP and outputted.

999 is executed,

another

n-gram

table

is calculated

Acknowledgement I would like to express my sincere thanks to Dr. Earl E. Gose (Bioengineering Program, University of Illinois, Chicago) for critical reading of the manuscript and many useful suggestions. Appendix COMPUTER

PRqGRAM

L 1. :? . 3.

IJOLt

W~‘+lt~l’J I IML-:X)rh’d;l:.!; -.~O,S:=1OOOOO 1Nl’liCXli’ Cr11(40‘r’b)/J.r:!r:!r1r40’r’:!XO/rN(4OYb)r!;(I:!)rI(:l:!) INTEGER F’N, Pfi I I-‘&L I .Jl_ I NI’MG I JN I DF’vI: INl’SH CHhllAC‘ItliXl DII I 1=1r:tL! S(l)=3

4. 5. 6. ‘/. 8. 9,

1

I ( 1. ):=J l~E~ll,I=lN.Lf;ti FINIGtl~liICil-llfl;‘l’

C

110

10. 11. 1 :! t

I? cl

13. 14. 15. 1 c, . 17. 18.

C C c C

O(3)/‘+

DO

9YY

LOOI= t<.+jR(+, NOTE N._r;&yj,,

N

I ‘,-’

IN

I ’

N,-~;I
‘/

‘TRIziL18

I\‘=:~,l=l’NISli YYY

.I!;

‘Tl-Iii

,-rJ,Z’FF’ICi,CN’,

MAlN S

LU Aliti

LOCJF’ ChLCULRTEU

l=I
(K--l

1 -~C;llAtl

I\:=N.ti , ‘j ARE :IN l’li1i M(C) AkllfiY ANLd I’HliY Alit. SUMMEIj BY ‘THE ‘fKANI=UKM IKl LOOPS IN’I’U ‘Tl-Iti N( 1 ) AliKAY WICH CON’I’AINS (N+l ,,-l;linil COEF’.S WHEN ‘I’lili ‘TRANS. AKE: I,:‘l:s;!**(,\;_.~) Ip+‘Ipl.t.1

l:lJk.l-

.!;

Tl-ln’r C”,=r:

19. 70.

IP3=2**(K-l) ~l:‘4:r~l:‘3.tl

21.

1:t:‘~$:z’~**,(

C”“I;‘LE

I’ELI

Model of inequality patterns 73. :!3. :!4.

3

:‘:, . I’6 * :I/.

I:

20. ?Y . 30.

1111 LlI I LlLl L13Clt-’ 1 1 :l N(L):N(I)IM(C)

Lr LI-‘!,rL’ I”E.III-~~~IMS

‘I lit

I- lli!;‘l’

~T(il<

(I\+:1

485

12 ‘I t<,?NSI- OI,‘M

.L 1 1 c

ua

31. 37. 3.3.

I-‘N=(2X*J)/4 NI’MG~= (2**I<)

34.

,+l / (L’*uJ)

(“AL-(L’Y*J)/4 Jl_:=Z*XJ

35. 36 I 37. 38. 3?. 40. 41. 42.

-a’ , _L1 322 DO

43. 44. 45 I

3 33

46.

C

LIC) l.l3lJl~” 3.53 l<2:=,<.-?

4

S( I ):=I

47, 40. 4v I so .

333

1=.11”4

I IF’5

N(L)--N(.LHM(C) C :r 1:+ :I.

S(l)=0 [IO 4

) - I tl

U

Tli’AN!iFUHM

I:=2.(<

51.

DO

53.

!i ( 1 ) :=s ( 1 ) -I- I DII Y(J .J=i . I\:.’ II< !i(,J) .I_.I.

53. 54.

YY

I-‘I:III=LJkMS

1. : I , 1k.l

.5

)

tillIll

YII

:.i ( J ) -: I S(J+i)=!;(Jt’l)~t-1 CltN~rlNlII~

55. 56. 57.

YU

58. 59. 60.

:;

r(i )--~i(t.)

YY

.J,: L,tIF’l IF’li 1 NT I I 9 (j ( Li ( 1 2 ) ) r U ( Li ( .L1 ) ) I G ( S ( .L0 ) ) I (i ( !i ( Y ) ) v I.; ( !j ( IJ ) ) I (j ( !i ( / 1 ) I

61, 57. 43.

Cl0

, ( ,(.-.L) :i.2 ~t~(;(S(6))rG(S(~,:,))r(;(!i(4))rI;(L;(J))rG(S(:!))rl3(!i(’l))rN(.I)r -tJ~G~‘~(1L’~~rU(‘T(ll~~rU(‘I’(lO~~r(~(’I’~Y~~rl~(‘T’(IJ~~rG!I(7~~r .tl;(‘i’(6) 1 ,I;( I(5) 1 rG( r(4) ) .l:;(‘l’(3)) ,L;(‘l’(:!)) lSUM:=O

64. 45. 46.

D(1

67. 68. 6Y.

!5 LL.:III\

6

70. 21 I 72.

YYY

73. 74 I

!IzE:N I IiY 12

6

M(I)-N(L) .L!;UM:=.LSUM IPlilN’l !;-rG (p

.G(

I (1)

1 .N(.J)

I.=‘1 .I(% t.N(

I )

I 1SUM

IiND

References Brudno. S. and Marczynski, T.J., Temporal patterns, their distribution and redundancy in trains of spontaneous neuronal spike intervals of the feline hippocampus studied with a non-parametric technique, Brain Res., 125 (1977) 65-89. Calvin, W.H.. Normal repetitive firing and its pathophysiology, in Epilepsy: A Window to Brain Mechanisms, J.S. Lockard and A.A. Ward, Jr. (Eds.). Raven Press, New York, 1980, pp. 97-121.

486

G. T. Marczynski

Hoffert, M.J., Miletic, V., Ruda, M.A. and Dubner. R., A comparison of substance P and serotonin axonal contacts on identified neurons in cat spinal dorsal horn, Sot. Neurosci.. Abstracts, 8 (1982) SOS. MacGregor, R.J. and Lewis, E.R., Neural Modeling. Plenum Press, New York and London. 1977. pp. 233-270. Marczynski, T.J. and Sherry. C.J., A new analysis of trains of increasing and decreasing neuronal spike intervals treated as self-adjusting sets of ratios. Brain Res., 35 (1971) 53%538. Marczynski, T.J.. Burns, L.L. and Marczynski. G.T.. Neuronal firing parterns in the feline hippocampus during sleep and wakefulness. Brain Res., 185 (1980) 139-160. Marczynski. T.J.. Wei. Jeanne. Y.. Chen, E. and Marczynski. G.T., Visual input, conditioned behavior and sleep as reflected by neuronal firing patterns in the feline pulvinar nucleus of thalamus, Brain Res. Bull. 8 (1982) 565-580. Mountcastle, V.B., The problem of sensing and neuronal coding of sensory events, in The Neurosciences, G.C. Quarton. T. Melnechuk and F.O. Schmitt (Eds.), The Rockefeller University Press, New York, 1967. pp. 393408. Perkel. D.H., Gerstein. G.L. and Moore, G.P., Neuronal spike trans and stochastic point processes. I. The single spike train. Biophys. J., 7 (1967) 391418. Saxena, K.. von Foerster, H. and Wolf. D.. Two theorems regarding interspike inrerual histograms, Report No. 722 from The Biological Computer Laboratory, University of Illinois, Urbana, Illinois, 1971/72, pp. 127-141. Sherry, C.J. and Klemm, W.R., A comparison of two techniques for analyzing neuronal interspike intervals: autocorrelation and relative interval coding, Brain Res. BUD., 5 (1980) 147-152. Stein, R.B. The role of spike trains in transmitting and distorting sensory signals, in The Neurosciences, F.O. Schmitt (Ed.), The Rockefeller University Press, New York, 1970. pp. 597-604.