#17528: bug in difference_family(9,3)
-------------------------------------+-------------------------------------
Reporter: vdelecroix | Owner:
Type: defect | Status: needs_info
Priority: major | Milestone: sage-6.5
Component: combinatorial | Resolution:
designs | Merged in:
Keywords: | Reviewers:
Authors: Vincent Delecroix | Work issues:
Report Upstream: N/A | Commit:
Branch: public/17528 | 2846ea403672a1f110098ddfecd99f08ea1ea4ef
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by vdelecroix):
Replying to [comment:8 ncohen]:
> Also: instead of checking that the cosets are disjoint like you do,
wouldn't it be simpler/faster to:
>
> 1) Take all elements of A
> 2) Multiply it in any way possible (except by 1) and check that the
result is not in A ?
>
> It removes `already_in` and `nb_seen`.
I do not think it works. What you need is to write all elements a_i of A
as x^m i_k + j_k^ with j_k < m. Then you need to check that the j_k are
different. A possible way to do it along your lines is the following:
{{{
AA = set(~x*y for x in A for y in A if x != y)
for i in range((v-1)//m):
if x**(m*i) in AA:
# bad case
# good case
}}}
You reduce the iteration over the whole `K` to iteration over `Hm` which
is a bit smaller (it has size 2v/k). I will do that.
By the way, `nb_seen` was not needed. It was just to stop the loop as soon
as all elements of A are decomposed (instead of enumerating the whole K).
The same "trick" is actually used in `singer_difference_set`... the thing
is that you know exactly what you are looking for but there is no better
way to do it rather then iterating through the whole K.
Vincent
--
Ticket URL: <http://trac.sagemath.org/ticket/17528#comment:9>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.