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

SAGE's multivariate gcd sucks over QQ and/or ZZ #694

Closed
williamstein opened this issue Sep 19, 2007 · 5 comments
Closed

SAGE's multivariate gcd sucks over QQ and/or ZZ #694

williamstein opened this issue Sep 19, 2007 · 5 comments

Comments

@williamstein
Copy link
Contributor


I think those timings are way out of date, since Singular 3 seems
to be *very* fast at mod p multivariate GCD computation, even
though it sucks over QQ.   Check out this paper:

          http://www.cecm.sfu.ca/CAG/papers/brown.ps

It on exactly the problem of GCD over QQ (or equiv ZZ),
and section 2 has a complete description of a gcd algorithm 
that reduces gcd over ZZ to doing gcd's mod p.

Who wants to be a hero -- like Jon Bober and number of partitions -- 
and implement this for Sage, so that multivariate GCD's aren't 
embarrassingly slow in Sage anymore?   This slowness *has* 
been something reported to me on several occasions during 
the last 2 years. 

William

CC: =

Component: basic arithmetic

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

@williamstein
Copy link
Contributor Author

Attachment: gcd_slow.singular.gz

this file has the singular input of a multivariate polynomial gcd that takes minutes in SAGE over QQ, but mod p the same takes 0.08 seconds.

@williamstein
Copy link
Contributor Author

comment:1

This paper describes the algorithm used in Singular:
http://portal.acm.org/citation.cfm?doid=800192.805698

Jack Schmidt claims the paper I mention above is a dead end for this problem:

Careful to check the papers.  The Moses, et al. paper for singular
shows that Brown's method is ineffective for your problem, and it is
reasonably likely that this modified Brown method of Kaltofen et al.
is also ineffective.  The Kaltofen, et al. paper avoids the question
of exponential runtime by restricting to bivariate dense polynomials.
The Wang paper describes one major improvement in a reasonable common
corner case for singular's algorithm.  One presumes singular can be
asked to describe what it is doing during its EZ-GCD calculation, and
you can check if you are in this corner case.   Wang's EEZ-GCD may be
the better solution, and one should be able to implement a prototype
of this quickly in the singular language.  At any rate, it may be
better to look for improvements to EZ-GCD than for the modular gcd.

EZ-GCD is also a modular/p-adic algorithm, so it should benefit from various
fast mod-p gcd.

@williamstein
Copy link
Contributor Author

comment:3

This is basically fixed (as soon as we upgrade to the newer singular).
From the Singular team:

"hannes@mathematik.uni-kl.de" 	
to me, joel, sage-devel, singular-team
	
show details
	 8:40 am (49 minutes ago) 
Dear sage-devel readers,

following the discussion on sage-devel last week we implemented a
modular approach to compute the multivariate gcd over QQ in
Singular.
We still need to develop the heuristic when to prefer
EZGCD or the modular method: currently,
the modular method is prefered - this is not too bad:
the posted examples goes from several minutes to 1 sec running time.

These changes are inlcuded in
ftp://www.mathematik.uni-kl.de/pub/Math/Singular/src/3-0-3/Singular-3-0-3-1.tar.gz

Hans

PS: the timings at
http://magma.maths.usyd.edu.au/users/allan/gcdcomp.html
(originally from http://home.bway.net/lewis/fermat/gcdcomp)
are questionable as they refer also to computations in characteristic 43051
in Singular 2.0.4, which it did not support.

@williamstein williamstein modified the milestones: sage-2.10, sage-2.9 Sep 26, 2007
@malb
Copy link
Member

malb commented Oct 1, 2007

Attachment: 6546.patch.gz

@malb
Copy link
Member

malb commented Oct 1, 2007

comment:5

Attached is a patch (6546) which makes use of the new SINGULAR spkg found at

http://sage.math.washington.edu/home/malb/pkgs/singular-3-0-3-1-20070929.spkg

which provides a multimodular GCD.

@malb malb assigned malb and unassigned sagetrac-jbmohler Oct 1, 2007
@malb malb modified the milestones: sage-2.9, sage-2.8.6 Oct 1, 2007
vbraun pushed a commit that referenced this issue Mar 26, 2023
    
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-
action) from 2 to 3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/codecov/codecov-
action/releases">codecov/codecov-action's releases</a>.</em></p>
<blockquote>
<h2>v3.0.0</h2>
<h3>Breaking Changes</h3>
<ul>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/689">#689</a> Bump to node16 and small fixes</li>
</ul>
<h3>Features</h3>
<ul>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/688">#688</a> Incorporate <code>gcov</code> arguments for
the Codecov uploader</li>
</ul>
<h3>Dependencies</h3>
<ul>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/548">#548</a> build(deps-dev): bump jest-junit from 12.2.0
to 13.0.0</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/603">#603</a> [Snyk] Upgrade <code>@​actions/core</code>
from 1.5.0 to 1.6.0</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/628">#628</a> build(deps): bump node-fetch from 2.6.1 to
3.1.1</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/634">#634</a> build(deps): bump node-fetch from 3.1.1 to
3.2.0</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/636">#636</a> build(deps): bump openpgp from 5.0.1 to
5.1.0</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/652">#652</a> build(deps-dev): bump
<code>@​vercel/ncc</code> from 0.30.0 to 0.33.3</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/653">#653</a> build(deps-dev): bump
<code>@​types/node</code> from 16.11.21 to 17.0.18</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/659">#659</a> build(deps-dev): bump
<code>@​types/jest</code> from 27.4.0 to 27.4.1</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/667">#667</a> build(deps): bump actions/checkout from 2 to
3</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/673">#673</a> build(deps): bump node-fetch from 3.2.0 to
3.2.3</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/683">#683</a> build(deps): bump minimist from 1.2.5 to
1.2.6</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/685">#685</a> build(deps): bump
<code>@​actions/github</code> from 5.0.0 to 5.0.1</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/681">#681</a> build(deps-dev): bump
<code>@​types/node</code> from 17.0.18 to 17.0.23</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/682">#682</a> build(deps-dev): bump typescript from 4.5.5
to 4.6.3</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/676">#676</a> build(deps): bump
<code>@​actions/exec</code> from 1.1.0 to 1.1.1</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/675">#675</a> build(deps): bump openpgp from 5.1.0 to
5.2.1</li>
</ul>
<h2>v2.1.0</h2>
<h2>2.1.0</h2>
<h3>Features</h3>
<ul>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/515">#515</a> Allow specifying version of Codecov
uploader</li>
</ul>
<h3>Dependencies</h3>
<ul>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/499">#499</a> build(deps-dev): bump
<code>@​vercel/ncc</code> from 0.29.0 to 0.30.0</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/508">#508</a> build(deps): bump openpgp from 5.0.0-5 to
5.0.0</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/514">#514</a> build(deps-dev): bump
<code>@​types/node</code> from 16.6.0 to 16.9.0</li>
</ul>
<h2>v2.0.3</h2>
<h2>2.0.3</h2>
<h3>Fixes</h3>
<ul>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/464">#464</a> Fix wrong link in the readme</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/485">#485</a> fix: Add override OS and linux default to
platform</li>
</ul>
<h3>Dependencies</h3>
<ul>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/447">#447</a> build(deps): bump openpgp from 5.0.0-4 to
5.0.0-5</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/458">#458</a> build(deps-dev): bump eslint from 7.31.0 to
7.32.0</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/465">#465</a> build(deps-dev): bump <code>@​typescript-
eslint/eslint-plugin</code> from 4.28.4 to 4.29.1</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/466">#466</a> build(deps-dev): bump <code>@​typescript-
eslint/parser</code> from 4.28.4 to 4.29.1</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/468">#468</a> build(deps-dev): bump
<code>@​types/jest</code> from 26.0.24 to 27.0.0</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/470">#470</a> build(deps-dev): bump
<code>@​types/node</code> from 16.4.0 to 16.6.0</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/472">#472</a> build(deps): bump path-parse from 1.0.6 to
1.0.7</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/473">#473</a> build(deps-dev): bump
<code>@​types/jest</code> from 27.0.0 to 27.0.1</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/codecov/codecov-
action/blob/main/CHANGELOG.md">codecov/codecov-action's
changelog</a>.</em></p>
<blockquote>
<h2>3.1.1</h2>
<h3>Fixes</h3>
<ul>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/661">#661</a> Update deprecation warning</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/593">#593</a> Create codeql-analysis.yml</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/712">#712</a> README: fix typo</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/725">#725</a> fix: Remove a blank row</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/726">#726</a> Update README.md with correct badge
version</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/633">#633</a> Create scorecards-analysis.yml</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/747">#747</a> fix: add more verbosity to validation</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/750">#750</a> Regenerate scorecards-analysis.yml</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/774">#774</a> Switch to v3</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/783">#783</a> Fix network entry in table</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/791">#791</a> Trim arguments after splitting them</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/769">#769</a> Plumb failCi into verification
function.</li>
</ul>
<h3>Dependencies</h3>
<ul>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/713">#713</a> build(deps-dev): bump typescript from 4.6.3
to 4.6.4</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/714">#714</a> build(deps): bump node-fetch from 3.2.3 to
3.2.4</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/724">#724</a> build(deps): bump github/codeql-action from
1 to 2</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/717">#717</a> build(deps-dev): bump
<code>@​types/jest</code> from 27.4.1 to 27.5.0</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/729">#729</a> build(deps-dev): bump
<code>@​types/node</code> from 17.0.25 to 17.0.33</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/734">#734</a> build(deps-dev): downgrade
<code>@​types/node</code> to 16.11.35</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/723">#723</a> build(deps): bump actions/checkout from 2 to
3</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/733">#733</a> build(deps): bump
<code>@​actions/github</code> from 5.0.1 to 5.0.3</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/732">#732</a> build(deps): bump
<code>@​actions/core</code> from 1.6.0 to 1.8.2</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/737">#737</a> build(deps-dev): bump
<code>@​types/node</code> from 16.11.35 to 16.11.36</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/749">#749</a> build(deps): bump ossf/scorecard-action from
1.0.1 to 1.1.0</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/755">#755</a> build(deps-dev): bump typescript from 4.6.4
to 4.7.3</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/759">#759</a> build(deps-dev): bump
<code>@​types/node</code> from 16.11.36 to 16.11.39</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/762">#762</a> build(deps-dev): bump
<code>@​types/node</code> from 16.11.39 to 16.11.40</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/746">#746</a> build(deps-dev): bump
<code>@​vercel/ncc</code> from 0.33.4 to 0.34.0</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/757">#757</a> build(deps): bump ossf/scorecard-action from
1.1.0 to 1.1.1</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/760">#760</a> build(deps): bump openpgp from 5.2.1 to
5.3.0</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/748">#748</a> build(deps): bump actions/upload-artifact
from 2.3.1 to 3.1.0</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/766">#766</a> build(deps-dev): bump typescript from 4.7.3
to 4.7.4</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/799">#799</a> build(deps): bump openpgp from 5.3.0 to
5.4.0</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/798">#798</a> build(deps): bump
<code>@​actions/core</code> from 1.8.2 to 1.9.1</li>
</ul>
<h2>3.1.0</h2>
<h3>Features</h3>
<ul>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/699">#699</a> Incorporate <code>xcode</code> arguments for
the Codecov uploader</li>
</ul>
<h3>Dependencies</h3>
<ul>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/694">#694</a> build(deps-dev): bump
<code>@​vercel/ncc</code> from 0.33.3 to 0.33.4</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/696">#696</a> build(deps-dev): bump
<code>@​types/node</code> from 17.0.23 to 17.0.25</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/698">#698</a> build(deps-dev): bump jest-junit from 13.0.0
to 13.2.0</li>
</ul>
<h2>3.0.0</h2>
<h3>Breaking Changes</h3>
<ul>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/689">#689</a> Bump to node16 and small fixes</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="codecov/codecov-action@d9f34f8cd5
cb3b3eb79b3e4b5dae3a16df499a70"><code>d9f34f8</code></a> release: update
changelog and version to 3.1.1 (<a href="https://github-
redirect.dependabot.com/codecov/codecov-
action/issues/828">#828</a>)</li>
<li><a href="codecov/codecov-action@0e9e7b4e8a
4cbde89b1d36ffe91a812536089d02"><code>0e9e7b4</code></a> Plumb failCi
into verification function. (<a href="https://github-
redirect.dependabot.com/codecov/codecov-
action/issues/769">#769</a>)</li>
<li><a href="codecov/codecov-action@7f20bd4c41
51750a1d013be0901b7e35a46c2aad"><code>7f20bd4</code></a> build(deps):
bump <code>@​actions/core</code> from 1.8.2 to 1.9.1 (<a
href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/798">#798</a>)</li>
<li><a href="codecov/codecov-action@13bc2536ab
285b021e72dfb3cd53e56f5c1f4e26"><code>13bc253</code></a> build(deps):
bump openpgp from 5.3.0 to 5.4.0 (<a href="https://github-
redirect.dependabot.com/codecov/codecov-
action/issues/799">#799</a>)</li>
<li><a href="codecov/codecov-action@5c0da1b28f
1c589bf17db0088d610ae638f4ccb7"><code>5c0da1b</code></a> Trim arguments
after splitting them (<a href="https://github-
redirect.dependabot.com/codecov/codecov-
action/issues/791">#791</a>)</li>
<li><a href="codecov/codecov-action@68d5f6d0be
32fb7f92b47e97218cf01690e6e3b5"><code>68d5f6d</code></a> Fix
<code>network</code> entry in table (<a href="https://github-
redirect.dependabot.com/codecov/codecov-
action/issues/783">#783</a>)</li>
<li><a href="codecov/codecov-action@2a829b95de
aeea2d11d127cc0358005714ff35ea"><code>2a829b9</code></a> Switch to v3
(<a href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/774">#774</a>)</li>
<li><a href="codecov/codecov-action@8e09eaf1b4
7fbb5da0e32a27bf08cd11929a1b4a"><code>8e09eaf</code></a> build(deps-
dev): bump typescript from 4.7.3 to 4.7.4 (<a href="https://github-
redirect.dependabot.com/codecov/codecov-
action/issues/766">#766</a>)</li>
<li><a href="codecov/codecov-action@39e222921f
d6f8ff1aae5c56948ff1599a2b57d1"><code>39e2229</code></a> build(deps):
bump actions/upload-artifact from 2.3.1 to 3.1.0 (<a
href="https://github-redirect.dependabot.com/codecov/codecov-
action/issues/748">#748</a>)</li>
<li><a href="codecov/codecov-action@b2b7703473
2e1f073c09521d4f31f4db18b099e2"><code>b2b7703</code></a> build(deps):
bump openpgp from 5.2.1 to 5.3.0 (<a href="https://github-
redirect.dependabot.com/codecov/codecov-
action/issues/760">#760</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/codecov/codecov-action/compare/v2...v3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-
badges.githubapp.com/badges/compatibility_score?dependency-
name=codecov/codecov-action&package-manager=github_actions&previous-
version=2&new-version=3)](https://docs.github.com/en/github/managing-
security-vulnerabilities/about-dependabot-security-updates#about-
compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>
    
URL: #35183
Reported by: dependabot[bot]
Reviewer(s): Tobias Diez
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

2 participants