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

guessing k-regular sequences #35682

Merged
merged 79 commits into from
Jul 20, 2023
Merged
Changes from 1 commit
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
c92f2fe
method for guessing k-regular sequences
dkrenn Aug 8, 2016
8cc4611
function "value"
dkrenn Aug 9, 2016
f91a850
function "split_interlace"
dkrenn Aug 9, 2016
a755c22
one linebreak to avoid a long line
dkrenn Aug 9, 2016
0ed5254
docstring of pad_right
dkrenn Aug 9, 2016
7029bc6
Merge branch 'u/dkrenn/sequences/k-regular' into u/dkrenn/sequences/k…
dkrenn Aug 9, 2016
99799a9
switch to Python's logging
dkrenn Aug 10, 2016
77e1e67
Merge branch 'u/dkrenn/sequences/k-regular' into u/dkrenn/sequences/k…
dkrenn Aug 10, 2016
cc14b63
post-merge Änderungen
dkrenn Aug 10, 2016
11c7ec4
Merge branch 'u/dkrenn/sequences/k-regular' into u/dkrenn/sequences/k…
dkrenn Aug 10, 2016
73ad7bd
Merge branch 'u/dkrenn/sequences/k-regular' into u/dkrenn/sequences/k…
dkrenn Aug 21, 2016
c349170
fix code and doctests to adapt with upstream recognizable series
dkrenn Aug 21, 2016
15e4008
Merge branch 'u/dkrenn/sequences/k-regular' into u/dkrenn/sequences/k…
dkrenn Aug 22, 2016
eaf8df2
Merge branch 'u/dkrenn/sequences/k-regular' into u/dkrenn/sequences/k…
dkrenn Aug 22, 2016
355d24d
simplify code by using features of recognizable series better (and ad…
dkrenn Aug 22, 2016
348fcff
solve transpositioning problem
dkrenn Aug 22, 2016
2e99c5c
another example
dkrenn Aug 22, 2016
65da1e7
Merge branch 'u/dkrenn/sequences/k-regular' into u/dkrenn/sequences/k…
dkrenn Aug 24, 2016
3e955e1
guessing partial sums
dkrenn Aug 25, 2016
a68e20d
Merge branch 't/21203/sequences/k-regular' into t/21204/sequences/k-r…
dkrenn Aug 25, 2016
816fcfd
Merge branch 't/21325/sequences/k-regular-subseq' into t/21204/sequen…
dkrenn Aug 25, 2016
0d5fbed
Merge ../7.2 into t/21204/sequences/k-regular-guess
dkrenn Aug 25, 2016
9818d94
Merge branch 't/21319/sequences/rec-hash' into t/21204/sequences/k-re…
dkrenn Aug 25, 2016
90e4ed5
doctests
dkrenn Aug 25, 2016
899e56e
finish .guess (docstrings etc)
dkrenn Aug 25, 2016
0dae02b
Merge branch 't/21319/sequences/rec-hash' into t/21204/sequences/k-re…
dkrenn Aug 26, 2016
bde8e67
Merge branch 't/21319/sequences/rec-hash' into t/21204/sequences/k-re…
dkrenn Jan 24, 2017
622c3f6
Merge branch 'u/dkrenn/sequences/rec-hash' into u/dkrenn/sequences/k-…
dkrenn Apr 6, 2018
4e7f615
Merge branch 'u/dkrenn/sequences/rec-hash' into u/dkrenn/sequences/k-…
dkrenn Mar 29, 2019
e726278
Merge branch 't/21319/sequences/rec-hash' into t/21204/sequences/k-re…
dkrenn May 11, 2021
dcc7cd1
Trac #21204: cherry-pick to avoid merge conflict
dkrenn May 11, 2021
c0519f0
Trac #21204: fixup code and tests
dkrenn May 11, 2021
5ce5276
Merge branch 't/21319/sequences/rec-hash' into t/21204/sequences/k-re…
dkrenn Jun 25, 2021
00047ce
Trac #21204: fix punctuation
dkrenn Jun 25, 2021
3c634df
Merge branch 't/21319/sequences/rec-hash' into t/21204/sequences/k-re…
dkrenn Jan 5, 2022
858253f
Merge tag '10.0' into u/dkrenn/sequences/k-regular-guess
dkrenn May 25, 2023
2536600
Fix pycodestyle issue E306
cheuberg Oct 2, 2022
bb32fee
Trac #21204: Fix typo
cheuberg Oct 11, 2022
4792a8f
Add ALGORITHM section to docstring
cheuberg Oct 11, 2022
b65aba3
Add some further comments
cheuberg Oct 11, 2022
bc63bd0
Merge remote-tracking branch 'cheuberg/u/cheuberg/sequences/k-regular…
dkrenn May 26, 2023
113acab
rename to linear_combination
dkrenn May 26, 2023
028b29d
rename to linear_combination_candidate
dkrenn May 26, 2023
305519d
fixup renameing
dkrenn May 26, 2023
46daf57
remove unused third component of "line"
dkrenn May 26, 2023
9be3124
remove split_interlace as never used
dkrenn May 26, 2023
9fc2663
rewrite preparation of left to be more readable
dkrenn May 26, 2023
3fc45d5
fix rest/latex: \operatorname
dkrenn May 26, 2023
c532a1e
use .linear_representation
dkrenn May 26, 2023
fd320c1
describe variants in example
dkrenn May 26, 2023
e6a5a84
compare outputs of variants in example
dkrenn May 26, 2023
221d33c
logging-info: show sequences in k-kernel properly
dkrenn May 26, 2023
0297668
apply suggestion oneline-description of .guess
dkrenn May 26, 2023
9e5682b
rewrite documentation of parameter "sequence"
dkrenn May 26, 2023
f878f75
fixup catching NoLinearCombination exception
dkrenn May 26, 2023
d0ddcab
rename, describe and test max_exponent
dkrenn May 26, 2023
100d978
write error message
dkrenn May 26, 2023
98f0587
Merge branch 'u/dkrenn/sequences/k-regular-guess' of github.com:dkren…
dkrenn May 26, 2023
dbf2bdc
Apply suggestions from code review
dkrenn May 26, 2023
3a39323
Apply suggestions from code review
dkrenn Jun 7, 2023
ec28f89
remove unneeded import
dkrenn Jun 7, 2023
29238d9
make NoLinearCombination a RuntimeError
dkrenn Jun 7, 2023
1b118be
simplify code by removing variables
dkrenn Jun 7, 2023
67562fb
consequently rename to linear_combination
dkrenn Jun 7, 2023
c15742d
more consistent naming in DEBUG output
dkrenn Jun 8, 2023
c198d90
fix left/right issue when bootstraping guessing
dkrenn Jun 8, 2023
ae8a287
fixup n_max
dkrenn Jun 8, 2023
6aab949
add another test
dkrenn Jun 8, 2023
250a98c
add another test
dkrenn Jun 8, 2023
9c772e5
better handling of n_max
dkrenn Jun 8, 2023
d4edd45
fix whitespaces
dkrenn Jun 8, 2023
f2dd055
fix docstring (LaTeX)
dkrenn Jun 9, 2023
43f58c6
remove W293 blank line contains whitespace
dkrenn Jun 9, 2023
bb0efc5
add comment and ref to #35748
dkrenn Jun 9, 2023
a98c32d
test RuntimeError no invertible matrix
dkrenn Jun 9, 2023
a2d8b25
break long line in doctest
dkrenn Jul 17, 2023
1c56e7f
implement coefficient_of_n (for __getitem__)
dkrenn Jul 17, 2023
1050e70
fix left/right vector sequence issue in docstrings
dkrenn Jul 17, 2023
822ce11
Update src/sage/combinat/k_regular_sequence.py
dkrenn Jul 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/sage/combinat/k_regular_sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -1016,20 +1016,20 @@ def guess(self, f, n_verify=100, max_exponent=10, sequence=None):

ALGORITHM:

For the purposes of this description, the left vector valued sequence
associated with a regular sequence consists of the left vector
multiplied by the corresponding matrix product, but without the right
vector of the regular sequence.
For the purposes of this description, the right vector valued sequence
associated with a regular sequence consists of the
corresponding matrix product multiplied by the right vector,
but without the right vector of the regular sequence.
dkrenn marked this conversation as resolved.
Show resolved Hide resolved

The algorithm maintains a left vector valued sequence consisting
of the left vector valued sequence of the argument ``sequence``
The algorithm maintains a right vector valued sequence consisting
of the right vector valued sequence of the argument ``sequence``
(replaced by an empty tuple if ``sequence`` is ``None``) plus several
components of the shape `m \mapsto f(k^t\cdot m +r)` for suitable
``t`` and ``r``.

Implicitly, the algorithm also maintains a `d \times n_\mathrm{verify}` matrix ``A``
(where ``d`` is the dimension of the left vector valued sequence)
whose columns are the current left vector valued sequence evaluated at
(where ``d`` is the dimension of the right vector valued sequence)
whose columns are the current right vector valued sequence evaluated at
the non-negative integers less than `n_\mathrm{verify}` and ensures that this
matrix has full row rank.

Expand Down Expand Up @@ -1282,12 +1282,12 @@ def guess(self, f, n_verify=100, max_exponent=10, sequence=None):
# `k**t * m + r`

# The elements of `lines` will correspond to the current components
# of the left vector valued sequence described in the algorithm section
# of the right vector valued sequence described in the algorithm section
# of the docstring.

def values(m, lines):
"""
Return current (as defined by ``lines``) left vector valued
Return current (as defined by ``lines``) right vector valued
sequence for argument ``m``.
"""
return tuple(seq(m)) + tuple(f(k**t_R * m + r_R) for t_R, r_R in lines)
Expand All @@ -1302,7 +1302,7 @@ def some_inverse_U_matrix(lines):

The output is the inverse of the invertible submatrix and
the corresponding list of column indices (i.e., arguments to
the current left vector valued sequence).
the current right vector valued sequence).
"""
d = len(seq(0)) + len(lines)

Expand Down