By "raising sequences" (or "rising sequences") I take it you mean
sequences in which the values are strictly monotonically increasing?
Then there must also exist "declining sequences" (in which the values
are strictly monotonically decreasing") and "equal sequences" (in which
the values do not change).  The number of "declining sequences" should
be equal (in expectation, at least) to the number of "rising sequences":
are they?  The number of "equal sequences" to be expected depends on the
possible range of values and the precision to which they are reported,
but is not zero, and if the values are (for example) 1-digit nonnegative
integers it is not negligible.  Are there as many, or as few, of these
as expected?

And there's a possible check on your algorithm for counting sequences,
which you may already have invoked but haven't cited:
 Let n(k) = <the number of sequences of length k>,
    counting all sequences:  rising, declining, equal.
 Then for any vector
 Sum[k*n(k)] = <length of vector> - 1

(I take Radford's comment that "what you describe is impossible" to be
correct in the context of considering "rising sequences" only, but
wonder whether the apparently missing sequences of length 2 are showing
up somewhere else.  If they are, I have no idea what that might mean
with respect to your random-vector generator, nor how to remedy it, but
some direction to pursue might then suggest itself to others.)

On Fri, 21 May 2004, Konrad Den Ende wrote:

> We've created a vector with random numbers and took a look at the
> number of raising sequences in it. Normally, one would expect to get
> about 1/2 of all the sequences occured to be of length 1, about 1/4 of
> length 2, about 1/8 of length 3 and so on.

> Everything works as expected except for the sequences of length 2. No
> matter how much we grunt at the machine, it always gets to few of
> those. All the others are about the right size, though. Anybody who'd
> like to contribute and shed some light at this phenomenon?

 ------------------------------------------------------------
 Donald F. Burrill                              [EMAIL PROTECTED]
 56 Sebbins Pond Drive, Bedford, NH 03110      (603) 626-0816
.
.
=================================================================
Instructions for joining and leaving this list, remarks about the
problem of INAPPROPRIATE MESSAGES, and archives are available at:
.                  http://jse.stat.ncsu.edu/                    .
=================================================================

Reply via email to