Skip to content
This repository was archived by the owner on Jan 31, 2023. It is now read-only.

Latest commit

 

History

History
383 lines (299 loc) · 11 KB

20956.md

File metadata and controls

383 lines (299 loc) · 11 KB

Issue 20956: Number of reflections in Weyl and Coxeter groups can be computed faster

archive/issues_020719.json:

{
    "assignees": [],
    "body": "<div id=\"comment:0\"></div>\n\nFor Weyl groups, we have\n\n```\nsage: W = WeylGroup(['E',7])\nsage: %timeit len(W.long_element(as_word=True))\n10 loops, best of 3: 98.6 ms per loop\nsage: %timeit W.number_of_reflections()\n1 loop, best of 3: 208 ms per loop\n```\nand for Coxeter groups, we have\n\n```\nsage: W = CoxeterGroup(['E',7])\nsage: %timeit len(W.long_element(as_word=True))\n1 loop, best of 3: 206 ms per loop\nsage: %timeit W.number_of_reflections()\n1 loop, best of 3: 378 ms per loop\n```\n\nI think that we should either use the longest element, or, even better, to speed the computations of the degrees (which are used to compute the number of reflections).\n\nCC:  @tscrim @fchapoton @nthiery\n\nComponent: **combinatorics**\n\nKeywords: **reflection group, coxeter group, subword complex, days80**\n\n_Issue created by migration from https://trac.sagemath.org/ticket/20956_\n\n",
    "closed_at": "2016-08-30T13:32:25Z",
    "created_at": "2016-07-06T12:33:37Z",
    "labels": [
        "https://github.com/sagemath/sage/labels/c%3A%20combinatorics",
        "https://github.com/sagemath/sage/labels/enhancement",
        "https://github.com/sagemath/sage/labels/wontfix"
    ],
    "reactions": [],
    "repository": "https://github.com/sagemath/sage",
    "title": "Number of reflections in Weyl and Coxeter groups can be computed faster",
    "type": "issue",
    "updated_at": "2016-08-30T13:32:25Z",
    "url": "https://github.com/sagemath/sage/issues/20956",
    "user": "https://github.com/stumpc5"
}

For Weyl groups, we have

sage: W = WeylGroup(['E',7])
sage: %timeit len(W.long_element(as_word=True))
10 loops, best of 3: 98.6 ms per loop
sage: %timeit W.number_of_reflections()
1 loop, best of 3: 208 ms per loop

and for Coxeter groups, we have

sage: W = CoxeterGroup(['E',7])
sage: %timeit len(W.long_element(as_word=True))
1 loop, best of 3: 206 ms per loop
sage: %timeit W.number_of_reflections()
1 loop, best of 3: 378 ms per loop

I think that we should either use the longest element, or, even better, to speed the computations of the degrees (which are used to compute the number of reflections).

CC: @tscrim @fchapoton @nthiery

Component: combinatorics

Keywords: reflection group, coxeter group, subword complex, days80

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


archive/issue_events_292250.json:

{
    "actor": "https://github.com/stumpc5",
    "created_at": "2016-07-06T12:33:37Z",
    "event": "milestoned",
    "issue": "https://github.com/sagemath/sage/issues/20956",
    "milestone_number": null,
    "milestone_title": "sage-7.3",
    "type": "issue_event",
    "url": "https://github.com/sagemath/sage/issues/20956#event-292250"
}

archive/issue_events_292251.json:

{
    "actor": "https://github.com/stumpc5",
    "created_at": "2016-07-06T12:33:37Z",
    "event": "labeled",
    "issue": "https://github.com/sagemath/sage/issues/20956",
    "label": "https://github.com/sagemath/sage/labels/c%3A%20combinatorics",
    "label_color": "0000ff",
    "label_name": "c: combinatorics",
    "label_text_color": "ffffff",
    "type": "issue_event",
    "url": "https://github.com/sagemath/sage/issues/20956#event-292251"
}

archive/issue_events_292252.json:

{
    "actor": "https://github.com/stumpc5",
    "created_at": "2016-07-06T12:33:37Z",
    "event": "labeled",
    "issue": "https://github.com/sagemath/sage/issues/20956",
    "label": "https://github.com/sagemath/sage/labels/p%3A%20major%20/%203",
    "label_color": "ffbb00",
    "label_name": "p: major / 3",
    "label_text_color": "ffffff",
    "type": "issue_event",
    "url": "https://github.com/sagemath/sage/issues/20956#event-292252"
}

archive/issue_events_292253.json:

{
    "actor": "https://github.com/stumpc5",
    "created_at": "2016-07-06T12:33:37Z",
    "event": "labeled",
    "issue": "https://github.com/sagemath/sage/issues/20956",
    "label": "https://github.com/sagemath/sage/labels/enhancement",
    "label_color": "696969",
    "label_name": "enhancement",
    "label_text_color": "ffffff",
    "type": "issue_event",
    "url": "https://github.com/sagemath/sage/issues/20956#event-292253"
}

archive/issue_comments_304479.json:

{
    "body": "<div id=\"comment:1\" align=\"right\">comment:1</div>\n\nSome timings with the branch of #20943\n\n```\nsage: sage: W = WeylGroup(['E',7])\nsage: sage: %timeit len(W.long_element(as_word=True))\n10 loops, best of 3: 41.6 ms per loop\nsage: sage: %timeit W.number_of_reflections()\nThe slowest run took 1047579.52 times longer than the fastest.\nThis could mean that an intermediate result is being cached.\n10000000 loops, best of 3: 57.2 ns per loop\nsage: sage: %timeit sum(d-1 for d in W.degrees())\n10 loops, best of 3: 41.1 ms per loop\n```",
    "created_at": "2016-07-06T13:26:02Z",
    "formatter": "markdown",
    "issue": "https://github.com/sagemath/sage/issues/20956",
    "type": "issue_comment",
    "url": "https://github.com/sagemath/sage/issues/20956#issuecomment-304479",
    "user": "https://github.com/fchapoton"
}
comment:1

Some timings with the branch of #20943

sage: sage: W = WeylGroup(['E',7])
sage: sage: %timeit len(W.long_element(as_word=True))
10 loops, best of 3: 41.6 ms per loop
sage: sage: %timeit W.number_of_reflections()
The slowest run took 1047579.52 times longer than the fastest.
This could mean that an intermediate result is being cached.
10000000 loops, best of 3: 57.2 ns per loop
sage: sage: %timeit sum(d-1 for d in W.degrees())
10 loops, best of 3: 41.1 ms per loop

archive/issue_comments_304480.json:

{
    "body": "<div id=\"comment:2\" align=\"right\">comment:2</div>\n\nOkay, I think we should close this as duplicate.",
    "created_at": "2016-07-06T13:35:48Z",
    "formatter": "markdown",
    "issue": "https://github.com/sagemath/sage/issues/20956",
    "type": "issue_comment",
    "url": "https://github.com/sagemath/sage/issues/20956#issuecomment-304480",
    "user": "https://github.com/stumpc5"
}
comment:2

Okay, I think we should close this as duplicate.


archive/issue_events_292254.json:

{
    "actor": "https://github.com/fchapoton",
    "created_at": "2016-07-06T13:41:00Z",
    "event": "labeled",
    "issue": "https://github.com/sagemath/sage/issues/20956",
    "label": "https://github.com/sagemath/sage/labels/needs%20review",
    "label_color": "7fff00",
    "label_name": "needs review",
    "label_text_color": "ffffff",
    "type": "issue_event",
    "url": "https://github.com/sagemath/sage/issues/20956#event-292254"
}

archive/issue_comments_304481.json:

{
    "body": "<div id=\"comment:3\" align=\"right\">comment:3</div>\n\nagreed.",
    "created_at": "2016-07-06T13:41:00Z",
    "formatter": "markdown",
    "issue": "https://github.com/sagemath/sage/issues/20956",
    "type": "issue_comment",
    "url": "https://github.com/sagemath/sage/issues/20956#issuecomment-304481",
    "user": "https://github.com/fchapoton"
}
comment:3

agreed.


archive/issue_events_292255.json:

{
    "actor": "https://github.com/fchapoton",
    "created_at": "2016-07-06T13:41:08Z",
    "event": "unlabeled",
    "issue": "https://github.com/sagemath/sage/issues/20956",
    "label": "https://github.com/sagemath/sage/labels/needs%20review",
    "label_color": "7fff00",
    "label_name": "needs review",
    "label_text_color": "ffffff",
    "type": "issue_event",
    "url": "https://github.com/sagemath/sage/issues/20956#event-292255"
}

archive/issue_events_292256.json:

{
    "actor": "https://github.com/fchapoton",
    "created_at": "2016-07-06T13:41:08Z",
    "event": "labeled",
    "issue": "https://github.com/sagemath/sage/issues/20956",
    "label": "https://github.com/sagemath/sage/labels/positive%20review",
    "label_color": "dfffc0",
    "label_name": "positive review",
    "label_text_color": "ffffff",
    "type": "issue_event",
    "url": "https://github.com/sagemath/sage/issues/20956#event-292256"
}

archive/issue_events_292257.json:

{
    "actor": "https://github.com/fchapoton",
    "created_at": "2016-07-06T13:41:08Z",
    "event": "demilestoned",
    "issue": "https://github.com/sagemath/sage/issues/20956",
    "milestone_number": null,
    "milestone_title": "sage-7.3",
    "type": "issue_event",
    "url": "https://github.com/sagemath/sage/issues/20956#event-292257"
}

archive/issue_events_292258.json:

{
    "actor": "https://github.com/embray",
    "created_at": "2016-08-30T13:32:25Z",
    "event": "unlabeled",
    "issue": "https://github.com/sagemath/sage/issues/20956",
    "label": "https://github.com/sagemath/sage/labels/positive%20review",
    "label_color": "dfffc0",
    "label_name": "positive review",
    "label_text_color": "ffffff",
    "type": "issue_event",
    "url": "https://github.com/sagemath/sage/issues/20956#event-292258"
}

archive/issue_events_292259.json:

{
    "actor": "https://github.com/embray",
    "created_at": "2016-08-30T13:32:25Z",
    "event": "closed",
    "issue": "https://github.com/sagemath/sage/issues/20956",
    "type": "issue_event",
    "url": "https://github.com/sagemath/sage/issues/20956#event-292259"
}

archive/issue_comments_304482.json:

{
    "body": "<div id=\"comment:5\" align=\"right\">comment:5</div>\n\nDetermined to be invalid/duplicate/wontfix (closing as \"wontfix\" as a catch-all resolution).",
    "created_at": "2016-08-30T13:32:25Z",
    "formatter": "markdown",
    "issue": "https://github.com/sagemath/sage/issues/20956",
    "type": "issue_comment",
    "url": "https://github.com/sagemath/sage/issues/20956#issuecomment-304482",
    "user": "https://github.com/embray"
}
comment:5

Determined to be invalid/duplicate/wontfix (closing as "wontfix" as a catch-all resolution).


archive/issue_events_292260.json:

{
    "actor": "https://github.com/embray",
    "created_at": "2016-08-30T13:32:25Z",
    "event": "unlabeled",
    "issue": "https://github.com/sagemath/sage/issues/20956",
    "label": "https://github.com/sagemath/sage/labels/p%3A%20major%20/%203",
    "label_color": "ffbb00",
    "label_name": "p: major / 3",
    "label_text_color": "ffffff",
    "type": "issue_event",
    "url": "https://github.com/sagemath/sage/issues/20956#event-292260"
}

archive/issue_events_292261.json:

{
    "actor": "https://github.com/embray",
    "created_at": "2016-08-30T13:32:25Z",
    "event": "labeled",
    "issue": "https://github.com/sagemath/sage/issues/20956",
    "label": "https://github.com/sagemath/sage/labels/wontfix",
    "label_color": "c6c6c6",
    "label_name": "wontfix",
    "label_text_color": "ffffff",
    "type": "issue_event",
    "url": "https://github.com/sagemath/sage/issues/20956#event-292261"
}