Opened 2 months ago

Closed 2 months ago

#31370 closed enhancement (duplicate)

Create a new module for morphic words

Reported by: slabbe Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: combinatorics Keywords:
Cc: chapoton Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

The goal of this ticket is to create a new module for morphic words.

As a consequence, it will improve the following computations which take a lot of time:

sage: m = WordMorphism('a->ab,b->a')
sage: w = m.fixed_point('a')
sage: w
word: abaababaabaababaababaabaababaabaababaaba...
sage: %time w[1000]
CPU times: user 1.45 ms, sys: 0 ns, total: 1.45 ms
Wall time: 1.45 ms
'a'
sage: %time w[10000]
CPU times: user 82.9 ms, sys: 0 ns, total: 82.9 ms
Wall time: 82.1 ms
'a'
sage: %time w[100000]
CPU times: user 5.19 s, sys: 6.26 ms, total: 5.2 s
Wall time: 5.19 s
'b'
sage: %time w[1000000]
CPU times: user 12min 45s, sys: 93.4 ms, total: 12min 45s
Wall time: 12min 45s
'a'

Change History (3)

comment:1 Changed 2 months ago by slabbe

  • Milestone changed from sage-9.3 to sage-duplicate/invalid/wontfix
  • Status changed from new to needs_review

let's close this one as duplicate of #31378.

comment:2 Changed 2 months ago by slabbe

  • Cc chapoton added

comment:3 Changed 2 months ago by chapoton

  • Resolution set to duplicate
  • Status changed from needs_review to closed
Note: See TracTickets for help on using tickets.