Table formatting proposal

John Conway conway at math.Princeton.EDU
Wed Jul 28 17:35:32 CEST 1999


I put a much simpler proposal to Neil quite some time ago,
and still think it's better - namely that one just separate 
"rows" of a table by semicolons.  So Pascal's triangle
would be

   1;1,1;1,2,1;1,3,3,1;1,4,6,4,1;...

  I still think this is a good idea, because it's easy to read,
and because it allows for "weird" formats that not infrequently
happen - for instance the nonzero numbers of types of polyhedra 
with given numbers of vertices and faces are

   ;;;;;1;;1;1,1;2;2,2;...,

with the rows corresponding to edges.

   John Conway


On Tue, 27 Jul 1999, Eric W. Weisstein wrote:

> Here's the original message to which David Wilson responded.  Sorry for
> any confusion the reply-before-actual-message caused...
> 
> -E
> 
> On Mon, 26 Jul 1999, N. J. A. Sloane wrote:
> 
> > i think david wilson's proposal is brilliant, and would indeed
> > many of the indexing problems.
> 
> Although Neil's opinion is the one that really matters on such issues :),
> I also think David has a great idea here.
> 
> > if only he had suggested this 10 years ago
> > 
> > rather than changing all 50,000 %O lines, a more feasible way to
> > follow his suggestion would be to mention this in Comment (%C) lines:  
> > Indexed by A012345 (say).
> 
> IMHO, I think the comment line should stay comments-only (and not include
> actual content information like index sequences).
> 
> However, here's a fairly detailed, but I think very general and precise,
> proposal for dealing with the general problem of tabular sequences.  How
> about adding a new optional tag (say %f for "formatting") which could
> specify, for a tabl/tabf sequence, the sequence numbers indexing the
> sequence at hand, the offsets, a reference sequence giving the number of
> elements in each row, and the preferred alignment of rows = C, L, or R?  
> I think this would fairly precisely specify the format of a tabular
> sequence (somebody correct me if there are ambiguities which have escaped
> me).
> 
> Take, for example, Pascal's triangle read by rows
> 
> ID Number: A007318 (Formerly M0082)
> Sequence:  1,1,1,1,2,1,1,3,3,1,1,4,6,4,1,1,5,10,10,5,1,1,6,15,20,15,6,
>            1,1,7,21,35,35,21,7,1,1,8,28,56,70,56,28,8,1,1,9,36,84,126,
>            126,84,36,9,1,1,10,45,120,210,252,210,120,45,10,1,1,11,55,
>            165,330,462,462,330,165,55,11,1
> Name:      Pascal triangle read by rows.
> 
>        1                      (0,0)
>      1   1                (1,0)   (1,1)
>    1   2   1            (2,0)  (2,1)  (2,2)
>  1   3   3   1       (3,0)  (3,1) (3,2)  (3,3)
> 
> This would have an %i entry something like
> %i A003056,A002262 (0,0) A000027 C 
> 
> where the indexing sequences are
> 
> ID Number: A003056
> Sequence:  0,1,1,2,2,2,3,3,3,3,4,4,4,4,4,5,5,5,5,5,5,6,6,6,6,6,6,6,7,7,
>            7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,10,10,10,
>            10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,
>            12,12,12
> Name:      n appears n+1 times.
> 
> ID Number: A002262
> Sequence:  0,0,1,0,1,2,0,1,2,3,0,1,2,3,4,0,1,2,3,4,5,0,1,2,3,4,5,6,0,1,
>            2,3,4,5,6,7,0,1,2,3,4,5,6,7,8,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,
>            5,6,7,8,9,10,0,1,2,3,4,5,6,7,8,9,10,11,0,1,2,3,4,5,6,7,8,9,
>            10,11,12,0,1,2,3,4,5
> Name:      Integers 0 to n followed by integers 0 to n+1 etc.
> 
> The offsets from start of the indexing sequences are (0,0).
> 
> The number of lines on successive rows for formatting are
> 
> ID Number: A000027 (Formerly M0472 and N0173)
> Sequence:  1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,
>            24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,
>            44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,
>            64,65,66,67,68,69,70,71,72,73,74,75,76,77
> Name:      The natural numbers.
> 
> And the rows themselves are to be centered (C).
> 
> Although I haven't thought it all the way through, the %f line could be
> generated semi-automatically in the Maple and Mathematica scripts for
> automatic sequence formatting.  Some of the looking up and specification
> of the reference sequences could be automated.  For example, instead of
> feeding the parser flat lists, nested lists could be used.  (I currently
> generate nested lists for tabl entries anyway but flatten them out, thus
> losing the row length information.)  This would give you a list of row
> lengths right away.  Furthermore, giving lists like { {{{0,0},1}},
> {{{1,0},1},{{1,1},1}}, ... } to a special command could automatically pull
> out the indexing sequences and create a set of sequence lookup lines to be
> e-mailed to sequences, with the resulting sequence numbers then being
> inserted in the script FormatSequence[] (or whatever the Maple equivalent
> is) command to specify the %i line.
> 
> In practice, you could also make assumptions that the index sequences were
> "simple" and so have some database of %A numbers corresponding to common
> indexing sequences and row lengths built in to the parsing scripts.
> 
> If you didn't like the %i line, you could just ignore it.
> 
> Does this sound like too much trouble or perhaps potentially useful?  I
> personally think it would add value to the precise specification of
> tabular sequences, although I'll back off if someone points out any
> reasons why it won't work...
> 
> Cheers,
> -Eric
> 
> --------------------------------------------------------------------
> * Eric W. Weisstein                                                *
> * Encyclopedist             phone:  217-398-0700 x599              *
> * Wolfram Research, Inc.    FAX:    217-398-0747                   *
> * 100 Trade Center Drive    e-mail: eww at wolfram.com                *
> * Champaign, IL 61820-7237  WWW: www.treasure-troves.com/eric.html *
> --------------------------------------------------------------------
> 
> 





More information about the SeqFan mailing list