EIS indexing proposal
David W. Wilson
wilson at cabletron.com
Tue Jul 27 18:22:18 CEST 1999
OK, since I get a rave review, here's my full-blown proposal for
generalized indexing of Sloane sequences:
Redefine the %O line to support a simple index sequence description
language:
<oline> := "%O" <anum> <int> ";" <mdidx> // %O line
<mdidx> := <idx> ( "X" <idx> )* // Multi-dimensional index
<idx> := <idx> ( "," <idx> )* // Concatenated index
<idx> := <int> to <xint> by <int> // Integer-spaced interval index
<idx> := <int> to <xint> // Unit-spaced interval index
<idx> := <int> // Integer index
<idx> := <anum> // Sloane sequence index
<xint> := <int> | "inf" | "-inf" | "?" // Extended integer
<int> := integer constant // Integer
<anum> := Sloane A-number // Sloane sequence A-number
Thus we have:
%O A000040 1; 1 to inf // 1, 2, 3, 4, ...
%O A000367 6; 0 to inf by 2 // 0, 2, 4, 6, ...
%O A001918 2; A000040 // 2, 3, 5, 7, 11, ...
%O A002181 2; A002202 // 1, 2, 4, 6, 8, ...
%O A007318 5; A003056 X A002262 // (0,0), (1,0), (1,1), ...
In the new %O line, the first number is the same as the second number
of the current %O line, that is, the raw index of the first nontrivial
element (or 0 if no such element exists). The expression after the
semicolon describes the index sequence. The free-form indexing allows
us to deal with multi-dimensional integer functions, nonstandard
indexing, unknown elements, etc.
The simplest index sequences (finite sets or ranges, natural numbers,
even numbers, etc) can be described in a straightforward fasion (e.g,
"1 to inf" as opposed to "A000027"). Describing the index sequence on
the %O line allows programs to easily obtain the index sequence (harder
if index information is buried in a comment on a %C line).
In most cases, the existing %O format can be automatically converted to
the new %O format without changing the meaning at all. For instance,
with an infinite sequence it suffices to change "%O A002859 x,y" to
"%O A002859 y; x to inf", and the fix for finite full sequences is
equally trivial. Only non-full finite sequences need be considered
case-by-case.
After conversion, we have a means to specify indexing for tabular and
nonstandard sequences. This doesn't have to be done at one shot for
50,000 sequences, but can be improved over time like other information
in the database.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.seqfan.eu/pipermail/seqfan/attachments/19990727/aa1bc838/attachment-0001.htm>
More information about the SeqFan
mailing list