Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine growing letters #32594

Closed
videlec opened this issue Sep 30, 2021 · 29 comments
Closed

Refine growing letters #32594

videlec opened this issue Sep 30, 2021 · 29 comments

Comments

@videlec
Copy link
Contributor

videlec commented Sep 30, 2021

The aim is to refine WordMorphism.growing_letters to differentiate the various possible behaviors of |sigma^n(letter)|. This growth is always of the form alpha^n n^beta (where alpha is a Perron number and beta an integer). Without doing any linear algebra we could differentiate

  • mortal (= ultimately empty or alpha=0)
  • polynomial (alpha=1)
  • exponential (alpha > 1)
    The output of the method will a 3-tuple of lists (mortal, polynomial, exponential) where
  • mortal : list of mortal letters
  • polynomial: a list of lists where polynomial[i] is the list of letters with growth n^i.
  • exponential: list of at least exponentionally growing letters

The implementation can be done iteratively by "cleaning" the morphism

  • use the already existing immortal_letters to detect mortal letters and remove them
  • now run an iteration to detect cycles of letters and clean the morphism by removing letters belonging to cycles (each run give polynomially growing letters of higher and higher degrees)
  • once there is no cycle anymore, the remaining letters are exponentially growing

CC: @sagetrac-jlepsova @seblabbe

Component: combinatorics

Author: Sébastien Labbé, Vincent Delecroix

Branch/Commit: ce5ca81

Reviewer: Vincent Delecroix, Sébastien Labbé

Issue created by migration from https://trac.sagemath.org/ticket/32594

@videlec videlec added this to the sage-9.5 milestone Sep 30, 2021
@seblabbe
Copy link
Contributor

seblabbe commented Oct 7, 2021

Author: Sébastien Labbé

@seblabbe
Copy link
Contributor

seblabbe commented Oct 7, 2021

Commit: c625f9e

@seblabbe
Copy link
Contributor

seblabbe commented Oct 7, 2021

comment:1

We did this this morning during the Sage Thursday's in Bordeaux.


New commits:

c625f9e32594: adding letter_growth_types method

@seblabbe
Copy link
Contributor

seblabbe commented Oct 7, 2021

Branch: u/slabbe/32594

@videlec
Copy link
Contributor Author

videlec commented Oct 7, 2021

comment:2

Tu fais du sage en dehors des sage thursdays maintenant :)

@videlec
Copy link
Contributor Author

videlec commented Oct 7, 2021

comment:3

The "(mortal, polynomial, exponential)" would better be inside ``.

I don't understand the nested loop. Could you explain in the documentation or in comment how and why it works?

@seblabbe
Copy link
Contributor

seblabbe commented Oct 8, 2021

comment:4

ok

@seblabbe
Copy link
Contributor

seblabbe commented Oct 8, 2021

comment:5

Replying to @videlec:

Tu fais du sage en dehors des sage thursdays maintenant :)

C'était fait pendant, mais il y a eu une panne d'internet vers 11h45, donc j'ai fait le git push après déjeuner:)

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 18, 2021

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

5b0937c32594: adding letter_growth_types method
c649f3232594: added comments in the code

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 18, 2021

Changed commit from c625f9e to c649f32

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 18, 2021

Changed commit from c649f32 to 11d2679

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 18, 2021

Branch pushed to git repo; I updated commit sha1. New commits:

11d267932594: added some more comments about the loop invariant

@seblabbe
Copy link
Contributor

comment:9

Added few more comments. Now need review.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 18, 2021

Branch pushed to git repo; I updated commit sha1. New commits:

7dd5c2732594: while loop -> inner while loop

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 18, 2021

Changed commit from 11d2679 to 7dd5c27

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 18, 2021

Changed commit from 7dd5c27 to a89e941

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 18, 2021

Branch pushed to git repo; I updated commit sha1. New commits:

a89e94132594: few more comments about m vs morphism self

@seblabbe
Copy link
Contributor

comment:12

And few more sorry. Now I stop. Needs review!

@videlec
Copy link
Contributor Author

videlec commented Nov 20, 2021

Changed branch from u/slabbe/32594 to u/vdelecroix/32594

@videlec
Copy link
Contributor Author

videlec commented Nov 20, 2021

Changed commit from a89e941 to a5e4c76

@videlec
Copy link
Contributor Author

videlec commented Nov 20, 2021

New commits:

a5e4c7632594: simplifications

@videlec
Copy link
Contributor Author

videlec commented Nov 20, 2021

comment:14

I added a commit on top of yours. I did some modifications in the code in order to avoid building many dictionaries. Actually, the whole code is pure linear algebra and could be moved to matrices.

@videlec
Copy link
Contributor Author

videlec commented Nov 20, 2021

comment:15

If you are ok you can set to positive review.

@seblabbe
Copy link
Contributor

comment:16

There is only one issue to be fixed:

src/sage/combinat/words/morphism.py:3283:38: E701 multiple statements on one line (colon)

After that fixed, I am fine with positive review.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 26, 2021

Branch pushed to git repo; I updated commit sha1. New commits:

ce5ca8132594: fix multiple line statement

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 26, 2021

Changed commit from a5e4c76 to ce5ca81

@seblabbe
Copy link
Contributor

Reviewer: Vincent Delecroix, Sébastien Labbé

@seblabbe
Copy link
Contributor

Changed author from Sébastien Labbé to Sébastien Labbé, Vincent Delecroix

@vbraun
Copy link
Member

vbraun commented Dec 19, 2021

Changed branch from u/vdelecroix/32594 to ce5ca81

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants