Discussion:
numeration and order in a table
(too old to reply)
François Patte
2019-02-16 16:29:15 UTC
Permalink
In an old text about versification, you can find algorithms to write all
the possibilities to alternate long (G) and short (L) syllables in a
verse. Here is the result for a 3 syllable verse:

GGG
LGG
GLG
LLG
GGL
LGL
GLL
LLL

As you can see, this table is ordered in reverse lexicographical order
from bottom to top.

The text gives a mean to find out the number of a line in the table when
you know its content: take the last L and write 2 under it. Then,
proceeding from right to left, double this number if the next syllable
is L, double it and subtract 1 if the syllable is G.

Exemple: LLG write 2 under the last L, as the preceeding syllable is L,
double and you get 4 which is the number of the line.

LGL: 2 under the last L, under the G you get 2x2-1= 3, under the first L
you get 2x3 = 6.

This system works for every number of syllables, for instance for a 5
syllable verse (the table has 2^5 lines) the line LGGLL is the 26th one:

2 under the last L, double under the previous L: 4, double this 4 and
subtract 1 under the preceeding G: 8-1=7, double 7 and subtract 1 under
the preceeding G: 14-1= 13, double this 13 under the first L: 26.

Now the algorithm to construct these tables: take two copies of the
table for n syllables and put them one over the other and for the first
copy (on top) add a column of G on the right, and add a column of L on
the right of the 2nd copy (down) and you get the table for n+1 syllables.

My question:

Is there a relation between the algorithm used to construct the tables
and the way they use to calculate the rank of a line? Or between the
order of the lines (reverse lexicographical order from bottom to top)
and the calculation of this rank?

Thank you.
--
François Patte
Université Paris Descartes
bert
2019-02-16 17:04:28 UTC
Permalink
In an old text about versification . . .
Is there a relation between the algorithm used to construct the tables
and the way they use to calculate the rank of a line?
If you convert the lines to binary with G=0, L=1
and transpose them left to right, all becomes clear:

000
001
010
011
100
etc
--
François Patte
2019-02-16 17:20:03 UTC
Permalink
Post by bert
In an old text about versification . . .
Is there a relation between the algorithm used to construct the tables
and the way they use to calculate the rank of a line?
If you convert the lines to binary with G=0, L=1
This is obvious but it does not answer my question... Your answer deals
only with the table: ok it is the addition table in base 2 but what I
want to reconstruct is the relation between the way the table is
established and the way they calculate the rank of a line.
--
François Patte
Université Paris Descartes
Julio Di Egidio
2019-02-16 18:55:44 UTC
Permalink
Post by François Patte
Post by bert
In an old text about versification . . .
Is there a relation between the algorithm used to construct the tables
and the way they use to calculate the rank of a line?
If you convert the lines to binary with G=0, L=1
This is obvious but it does not answer my question... Your answer deals
only with the table: ok it is the addition table in base 2 but what I
want to reconstruct is the relation between the way the table is
established and the way they calculate the rank of a line.
I'd have given the same answer as bert's: G=>0 and L=>1 and then each line
corresponds to a specific numeral whose value *is* the index of the line.

GGG => 111_{in base 2} = 7_{in base 10}
LGG => 011 = 6
GLG => ... = 5
LLG ... = 4
GGL = 3
LGL = 2
GLL = 1
LLL = 0

The recipe you describe is a complicated way to calculate the value of
a number given its numeral in the usual positional notation (base 2 for
2 distinct symbols, would be base n for n distinct symbols).

HTH,

Julio
Julio Di Egidio
2019-02-16 18:57:43 UTC
Permalink
Post by Julio Di Egidio
I'd have given the same answer as bert's: G=>0 and L=>1 and then each line
corresponds to a specific numeral whose value *is* the index of the line.
GGG => 111_{in base 2} = 7_{in base 10}
Sorry, I have inverted it (it was G=0, L=1), anyway the logic is the same...

Julio
Julio Di Egidio
2019-02-16 20:18:48 UTC
Permalink
Post by Julio Di Egidio
Post by Julio Di Egidio
I'd have given the same answer as bert's: G=>0 and L=>1 and then each line
corresponds to a specific numeral whose value *is* the index of the line.
GGG => 111_{in base 2} = 7_{in base 10}
Sorry, I have inverted it (it was G=0, L=1), anyway the logic is the same...
Post by Julio Di Egidio
LGG => 011 = 6
I've actually messed it up one more way, right-to-left v left-to-right, but
never mind, the basic logic remains that of symbols interpreted as digits of
numerals in a positional notation...

HTH and sorry again for the confusion,

Julio
James Waldby
2019-02-16 19:25:37 UTC
Permalink
Post by François Patte
In an old text about versification . . .
Is there a relation between the algorithm used to construct the tables
and the way they use to calculate the rank of a line?
If you convert the lines to binary with G=0, L=1 and transpose them
This is obvious but it does not answer my question... Your answer deals
only with the table: ok it is the addition table in base 2 but what I
want to reconstruct is the relation between the way the table is
established and the way they calculate the rank of a line.
If you were given a binary number m, you can compute its decimal value
U(m) in a usual way as follows: Start with temp value u=0. Proceeding
left to right, if the next bit of m has value b, set u to 2u+b.
After all bits, set U(m) to u.

Example: m = 10110.
u=0, u=2*0+1=1, u=2*1+0=2, u=2*2+1=5, u=2*5+1=11, u=2*11+0=22, U(m)=22.

The method in your first post is like the following: If the next
bit of m has value b, set t to 2t-b (where t starts at some non-zero
value). After all bits, set T(m) to t.

If we exchange each bit b of m with 1-b, that is, if we complement m
and get m', we will have U(m') + U(m) = 2**k - 1, hence
U(m) = 2**k - 1 - U(m'), which is what the posted method is computing.
--
jiw
Julio Di Egidio
2019-02-16 20:15:11 UTC
Permalink
Post by James Waldby
Post by François Patte
established and the way they calculate the rank of a line.
If you were given a binary number m, you can compute its decimal value
A binary numeral...

Julio
Leon Aigret
2019-02-21 14:20:02 UTC
Permalink
On Sat, 16 Feb 2019 17:29:15 +0100, François Patte
Post by François Patte
In an old text about versification, you can find algorithms to write all
the possibilities to alternate long (G) and short (L) syllables in a
GGG
LGG
GLG
LLG
GGL
LGL
GLL
LLL
As you can see, this table is ordered in reverse lexicographical order
from bottom to top.
The text gives a mean to find out the number of a line in the table when
you know its content: take the last L and write 2 under it. Then,
proceeding from right to left, double this number if the next syllable
is L, double it and subtract 1 if the syllable is G.
Example: LLG write 2 under the last L, as the preceeding syllable is L,
double and you get 4 which is the number of the line.
LGL: 2 under the last L, under the G you get 2x2-1= 3, under the first L
you get 2x3 = 6.
This system works for every number of syllables, for instance for a 5
2 under the last L, double under the previous L: 4, double this 4 and
subtract 1 under the preceeding G: 8-1=7, double 7 and subtract 1 under
the preceeding G: 14-1= 13, double this 13 under the first L: 26.
Note that the system does not work for the first line. This could be
repaired by starting with writing 1 under the "space" after the last
letter and proceed from there: a tail of G's leaves the value at 1 and
the first L turns it into a 2, so the original system is a more
efficient, but less transparant, shortcut of the modified system, cut
even shorter by the assumption that the G-only case is too obvious to
mention.
Post by François Patte
Now the algorithm to construct these tables: take two copies of the
table for n syllables and put them one over the other and for the first
copy (on top) add a column of G on the right, and add a column of L on
the right of the 2nd copy (down) and you get the table for n+1 syllables.
Is there a relation between the algorithm used to construct the tables
and the way they use to calculate the rank of a line? Or between the
order of the lines (reverse lexicographical order from bottom to top)
and the calculation of this rank?
When a string of, for example, 5 syllables is extended with an extra G
or L at the end, it is obvious that the computed line number does not
change for the G-version. A step by step comparison of the
computations for the line numbers (modifiied method) of those two
strings shows that the first step results in a 1 under the G and a 2
under the L, which gives a difference of 1, and at each of the
following steps the difference is doubled, resulting in a final
difference of 2^5.

That shows that the line number of the L-version is also correct and
the correctness of the line number computation fot the 5 syllable
table implies the correctness for the 6 syllable table. The obvious
correctness for the 2 syllable tale then leads to the corretness of
the 3 syllable table etcetera.
Leon Aigret
2019-02-24 17:26:03 UTC
Permalink
On Sat, 23 Feb 2019 18:09:02 +0100, François Patte
Post by Leon Aigret
On Sat, 16 Feb 2019 17:29:15 +0100, François Patte
Post by François Patte
In an old text about versification, you can find algorithms to write all
the possibilities to alternate long (G) and short (L) syllables in a
GGG
LGG
GLG
LLG
GGL
LGL
GLL
LLL
As you can see, this table is ordered in reverse lexicographical order
from bottom to top.
The text gives a mean to find out the number of a line in the table when
you know its content: take the last L and write 2 under it. Then,
proceeding from right to left, double this number if the next syllable
is L, double it and subtract 1 if the syllable is G.
Example: LLG write 2 under the last L, as the preceeding syllable is L,
double and you get 4 which is the number of the line.
LGL: 2 under the last L, under the G you get 2x2-1= 3, under the first L
you get 2x3 = 6.
This system works for every number of syllables, for instance for a 5
2 under the last L, double under the previous L: 4, double this 4 and
subtract 1 under the preceeding G: 8-1=7, double 7 and subtract 1 under
the preceeding G: 14-1= 13, double this 13 under the first L: 26.
Note that the system does not work for the first line. This could be
repaired by starting with writing 1 under the "space" after the last
letter and proceed from there: a tail of G's leaves the value at 1 and
the first L turns it into a 2, so the original system is a more
efficient, but less transparant, shortcut of the modified system, cut
even shorter by the assumption that the G-only case is too obvious to
mention.
Post by François Patte
Now the algorithm to construct these tables: take two copies of the
table for n syllables and put them one over the other and for the first
copy (on top) add a column of G on the right, and add a column of L on
the right of the 2nd copy (down) and you get the table for n+1 syllables.
Is there a relation between the algorithm used to construct the tables
and the way they use to calculate the rank of a line? Or between the
order of the lines (reverse lexicographical order from bottom to top)
and the calculation of this rank?
When a string of, for example, 5 syllables is extended with an extra G
or L at the end, it is obvious that the computed line number does not
change for the G-version. A step by step comparison of the
computations for the line numbers (modifiied method) of those two
strings shows that the first step results in a 1 under the G and a 2
under the L, which gives a difference of 1, and at each of the
following steps the difference is doubled, resulting in a final
difference of 2^5.
Thank you for your answer, but I do not understand what is the
comparison you are doing: what are these two strings for which the
computation gives a difference of 1?
String is just a word I used for the row of syllables on a single line
of the table (because it saves a lot of syllables). The subject of the
argument was the question of how the adding of an extra syllable at
the end of a row affects the line number that the method produces for
the extended row of syllables.

Starting with with your example LGGLL the two possible extended rows
will be LGGLLG and LGGLLL. Writing down the steps of the computation
for these cases with, due to the restrictions of this medium, the
numbers written at the left of the syllables instead of below them,
results in:

26 L 13 G 7 G 4 L 2 L 1 G 1 "space"

58 L 29 G 15 G 8 L 4 L 2 L 1 "space"

One sees that the differences between the computed numbers for the two
lines are:

32, 16, 8, 4, 2, 1 and 0, which shows that after the first step has
created a difference of 1, each of the following steps doubles that
difference.

Hopefully, this answers your questions.
François Patte
2019-02-28 10:17:01 UTC
Permalink
Post by Leon Aigret
On Sat, 23 Feb 2019 18:09:02 +0100, François Patte
Post by Leon Aigret
On Sat, 16 Feb 2019 17:29:15 +0100, François Patte
Post by François Patte
In an old text about versification, you can find algorithms to write all
the possibilities to alternate long (G) and short (L) syllables in a
GGG
LGG
GLG
LLG
GGL
LGL
GLL
LLL
As you can see, this table is ordered in reverse lexicographical order
from bottom to top.
The text gives a mean to find out the number of a line in the table when
you know its content: take the last L and write 2 under it. Then,
proceeding from right to left, double this number if the next syllable
is L, double it and subtract 1 if the syllable is G.
Example: LLG write 2 under the last L, as the preceeding syllable is L,
double and you get 4 which is the number of the line.
LGL: 2 under the last L, under the G you get 2x2-1= 3, under the first L
you get 2x3 = 6.
This system works for every number of syllables, for instance for a 5
2 under the last L, double under the previous L: 4, double this 4 and
subtract 1 under the preceeding G: 8-1=7, double 7 and subtract 1 under
the preceeding G: 14-1= 13, double this 13 under the first L: 26.
Note that the system does not work for the first line. This could be
repaired by starting with writing 1 under the "space" after the last
letter and proceed from there: a tail of G's leaves the value at 1 and
the first L turns it into a 2, so the original system is a more
efficient, but less transparant, shortcut of the modified system, cut
even shorter by the assumption that the G-only case is too obvious to
mention.
Post by François Patte
Now the algorithm to construct these tables: take two copies of the
table for n syllables and put them one over the other and for the first
copy (on top) add a column of G on the right, and add a column of L on
the right of the 2nd copy (down) and you get the table for n+1 syllables.
Is there a relation between the algorithm used to construct the tables
and the way they use to calculate the rank of a line? Or between the
order of the lines (reverse lexicographical order from bottom to top)
and the calculation of this rank?
When a string of, for example, 5 syllables is extended with an extra G
or L at the end, it is obvious that the computed line number does not
change for the G-version. A step by step comparison of the
computations for the line numbers (modifiied method) of those two
strings shows that the first step results in a 1 under the G and a 2
under the L, which gives a difference of 1, and at each of the
following steps the difference is doubled, resulting in a final
difference of 2^5.
Thank you for your answer, but I do not understand what is the
comparison you are doing: what are these two strings for which the
computation gives a difference of 1?
String is just a word I used for the row of syllables on a single line
of the table (because it saves a lot of syllables). The subject of the
argument was the question of how the adding of an extra syllable at
the end of a row affects the line number that the method produces for
the extended row of syllables.
Starting with with your example LGGLL the two possible extended rows
will be LGGLLG and LGGLLL. Writing down the steps of the computation
for these cases with, due to the restrictions of this medium, the
numbers written at the left of the syllables instead of below them,
26 L 13 G 7 G 4 L 2 L 1 G 1 "space"
58 L 29 G 15 G 8 L 4 L 2 L 1 "space"
One sees that the differences between the computed numbers for the two
32, 16, 8, 4, 2, 1 and 0, which shows that after the first step has
created a difference of 1, each of the following steps doubles that
difference.
Hopefully, this answers your questions.
Thank you very much for this answer. Regards.
--
François Patte
Université Paris Descartes
Ross A. Finlayson
2019-02-26 01:17:30 UTC
Permalink
Post by François Patte
In an old text about versification, you can find algorithms to write all
the possibilities to alternate long (G) and short (L) syllables in a
GGG
LGG
GLG
LLG
GGL
LGL
GLL
LLL
As you can see, this table is ordered in reverse lexicographical order
from bottom to top.
The text gives a mean to find out the number of a line in the table when
you know its content: take the last L and write 2 under it. Then,
proceeding from right to left, double this number if the next syllable
is L, double it and subtract 1 if the syllable is G.
Exemple: LLG write 2 under the last L, as the preceeding syllable is L,
double and you get 4 which is the number of the line.
LGL: 2 under the last L, under the G you get 2x2-1= 3, under the first L
you get 2x3 = 6.
This system works for every number of syllables, for instance for a 5
2 under the last L, double under the previous L: 4, double this 4 and
subtract 1 under the preceeding G: 8-1=7, double 7 and subtract 1 under
the preceeding G: 14-1= 13, double this 13 under the first L: 26.
Now the algorithm to construct these tables: take two copies of the
table for n syllables and put them one over the other and for the first
copy (on top) add a column of G on the right, and add a column of L on
the right of the 2nd copy (down) and you get the table for n+1 syllables.
Is there a relation between the algorithm used to construct the tables
and the way they use to calculate the rank of a line? Or between the
order of the lines (reverse lexicographical order from bottom to top)
and the calculation of this rank?
Thank you.
--
François Patte
Université Paris Descartes
It seems to be for splitting the table, into two sorts
that otherwise each together would move the sorts
from the "best case", in terms of maintaining the indices,
then to write the sorts and indices, as that arithmetically
the products return in bounds then arrangements, for
not moving the table nor sorting in-place.

Exhausting the inter-record distances in all the sorts,
is just making an expensive compression routine, here
for it falling out in arithmetic and entropy tables,
for the forward and reverse sorting, and the simple
algorithm to compress a table to smaller ordered
definitions of tables, then to reconstitute those to
the original tables with the offsets, entropy coding
(or making an array) the table types, by their values,
as that then the types maintain an arithmetic relation,
in offsets for whatever tuple maintains the identity of
related rows regardless their content, the alphabet.
Array also are the offsets, for computing arithmetically
the bounds of those and reconstituting tables from
ranges in sorts.

Addressing into the space of the entire language of
combinations of letters from the alphabet, this as
a different problem that where the words no way
fill the space of the transliteration of the space of
words to the space of letters of words in lengths,
the space of words is etymological segmentation,
thus about this words in the space of the letters of
words as about either forward, backward, or left, right,
what results as for example the eventual space of
"all the 0's and 1's", that is same in all directions,
contra here where the list of words in letters is
exponentially longer than the length of the words.

Here instead it seems the goal is deconstructing
an arithmetic representation of the words, as it
is the arithmetic representation of the addressing
as so happens to be an increment or particular distance.


"Is there a relation between the algorithm used to construct the tables
and the way they use to calculate the rank of a line? Or between the
order of the lines (reverse lexicographical order from bottom to top)
and the calculation of this rank? "

This combinatorial enumeration of the algorithm,
it's a two letter alphabet so it doesn't require memory
just alternation or toggle as the words are built right-to-left,
either maintaining the memory or recomputing what would
be the carry arithmetic or where to start the carry arithmetic
from the previous, the next, of the combinatorial enumeration.

So, there might be more than one way, to construct and deconstruct
the arithmetic. (For the combinatorial enumeration as for example
a usual enumeration of integers to 2^n, or b^p, each of those an
arithmetization of the word from the language with whatever mapping
of digits for example positionally to letters.)

"Now the algorithm to construct these tables: take two copies of the
table for n syllables and put them one over the other and for the first
copy (on top) add a column of G on the right, and add a column of L on
the right of the 2nd copy (down) and you get the table for n+1 syllables. "

So, it seems you were building with having to compute the rank,
of the value, from the left as most significant, but positionally
you have changed the most significant bit, instead to the right.

That is your responsibility for maintenance of clock arithmetic
but it's no longer a clock arithmetic, that always it is left-to-right
most-significant-to-least-significant (or "big-endian" in usual
machine representation of binary data).

The original table as reverse ordered then, as that it was "constructed"
in reverse order a usual default integer assignment, each as computing
2^n then writing the value for 2^n-1 first instead of 0 first, it seems
that you constructed the table, then reversed it. (It is most-significant
from the right again.)

Then, copying that into two consequential tables, and putting the
next most-significant half to the lesser, and half to the greater,
this is simpler to maintain for each line, in only having to compute
the length once, then remembering only 2^n many or for half the
length of the doubled table, the next value, with uniform random
access to the value at the position of the item of the table.

It seems you're interested in adjusting construction semantics (and
arithmetic semantics) as introduce access semantics (arithmetic).

If the table is left-to-right or right-to-left, differences from the less
significant side are in terms of powers of the size of the alphabet
as indiced from the other side.

Here it seems a feature of deconstruction of carry arithmetic (bounded).
Ross Finlayson
2024-11-12 04:47:00 UTC
Permalink
Post by Ross A. Finlayson
Post by François Patte
In an old text about versification, you can find algorithms to write all
the possibilities to alternate long (G) and short (L) syllables in a
GGG
LGG
GLG
LLG
GGL
LGL
GLL
LLL
As you can see, this table is ordered in reverse lexicographical order
from bottom to top.
The text gives a mean to find out the number of a line in the table when
you know its content: take the last L and write 2 under it. Then,
proceeding from right to left, double this number if the next syllable
is L, double it and subtract 1 if the syllable is G.
Exemple: LLG write 2 under the last L, as the preceeding syllable is L,
double and you get 4 which is the number of the line.
LGL: 2 under the last L, under the G you get 2x2-1= 3, under the first L
you get 2x3 = 6.
This system works for every number of syllables, for instance for a 5
2 under the last L, double under the previous L: 4, double this 4 and
subtract 1 under the preceeding G: 8-1=7, double 7 and subtract 1 under
the preceeding G: 14-1= 13, double this 13 under the first L: 26.
Now the algorithm to construct these tables: take two copies of the
table for n syllables and put them one over the other and for the first
copy (on top) add a column of G on the right, and add a column of L on
the right of the 2nd copy (down) and you get the table for n+1 syllables.
Is there a relation between the algorithm used to construct the tables
and the way they use to calculate the rank of a line? Or between the
order of the lines (reverse lexicographical order from bottom to top)
and the calculation of this rank?
Thank you.
--
François Patte
Université Paris Descartes
It seems to be for splitting the table, into two sorts
that otherwise each together would move the sorts
from the "best case", in terms of maintaining the indices,
then to write the sorts and indices, as that arithmetically
the products return in bounds then arrangements, for
not moving the table nor sorting in-place.
Exhausting the inter-record distances in all the sorts,
is just making an expensive compression routine, here
for it falling out in arithmetic and entropy tables,
for the forward and reverse sorting, and the simple
algorithm to compress a table to smaller ordered
definitions of tables, then to reconstitute those to
the original tables with the offsets, entropy coding
(or making an array) the table types, by their values,
as that then the types maintain an arithmetic relation,
in offsets for whatever tuple maintains the identity of
related rows regardless their content, the alphabet.
Array also are the offsets, for computing arithmetically
the bounds of those and reconstituting tables from
ranges in sorts.
Addressing into the space of the entire language of
combinations of letters from the alphabet, this as
a different problem that where the words no way
fill the space of the transliteration of the space of
words to the space of letters of words in lengths,
the space of words is etymological segmentation,
thus about this words in the space of the letters of
words as about either forward, backward, or left, right,
what results as for example the eventual space of
"all the 0's and 1's", that is same in all directions,
contra here where the list of words in letters is
exponentially longer than the length of the words.
Here instead it seems the goal is deconstructing
an arithmetic representation of the words, as it
is the arithmetic representation of the addressing
as so happens to be an increment or particular distance.
"Is there a relation between the algorithm used to construct the tables
and the way they use to calculate the rank of a line? Or between the
order of the lines (reverse lexicographical order from bottom to top)
and the calculation of this rank? "
This combinatorial enumeration of the algorithm,
it's a two letter alphabet so it doesn't require memory
just alternation or toggle as the words are built right-to-left,
either maintaining the memory or recomputing what would
be the carry arithmetic or where to start the carry arithmetic
from the previous, the next, of the combinatorial enumeration.
So, there might be more than one way, to construct and deconstruct
the arithmetic. (For the combinatorial enumeration as for example
a usual enumeration of integers to 2^n, or b^p, each of those an
arithmetization of the word from the language with whatever mapping
of digits for example positionally to letters.)
"Now the algorithm to construct these tables: take two copies of the
table for n syllables and put them one over the other and for the first
copy (on top) add a column of G on the right, and add a column of L on
the right of the 2nd copy (down) and you get the table for n+1 syllables. "
So, it seems you were building with having to compute the rank,
of the value, from the left as most significant, but positionally
you have changed the most significant bit, instead to the right.
That is your responsibility for maintenance of clock arithmetic
but it's no longer a clock arithmetic, that always it is left-to-right
most-significant-to-least-significant (or "big-endian" in usual
machine representation of binary data).
The original table as reverse ordered then, as that it was "constructed"
in reverse order a usual default integer assignment, each as computing
2^n then writing the value for 2^n-1 first instead of 0 first, it seems
that you constructed the table, then reversed it. (It is most-significant
from the right again.)
Then, copying that into two consequential tables, and putting the
next most-significant half to the lesser, and half to the greater,
this is simpler to maintain for each line, in only having to compute
the length once, then remembering only 2^n many or for half the
length of the doubled table, the next value, with uniform random
access to the value at the position of the item of the table.
It seems you're interested in adjusting construction semantics (and
arithmetic semantics) as introduce access semantics (arithmetic).
If the table is left-to-right or right-to-left, differences from the less
significant side are in terms of powers of the size of the alphabet
as indiced from the other side.
Here it seems a feature of deconstruction of carry arithmetic (bounded).
Continue reading on narkive:
Loading...