#19779: Hadamard difference set
-------------------------------------+-------------------------------------
       Reporter:  vdelecroix         |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-7.0
      Component:  combinatorial      |   Resolution:
  designs                            |    Merged in:
       Keywords:                     |    Reviewers:  Nathann Cohen
        Authors:  Vincent Delecroix  |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  20f965560e44b538d9b26ccfe86710c8502c995e
  u/vdelecroix/19779                 |     Stopgaps:
   Dependencies:  #19778             |
-------------------------------------+-------------------------------------

Comment (by vdelecroix):

 Hello,

 Replying to [comment:10 ncohen]:
 > Helloooooo Vincent,
 >
 > Here is the review for this second ticket:
 >
 > - In the docstring of `hadamard_difference_set_product_parameters`,
 could you
 >   specify the inputs of the product construction (i.e. could you specify
 which
 >   difference sets you are looking for)?

 done

 > - This look like something that should not be there:
 >
 >   {{{
 > +    try:
 > +        fac1 = tuple(G1.cartesian_factors())
 > +        tup1 = tuple
 > +    except AttributeError:
 > +        fac1 = (G1,)
 > +        tup1 = lambda x: (x,)
 >   }}}
 >
 >   Can you explain why you need this (twice)?

 Because cartesian product does not flatten stuff.
 {{{
 sage: G1 = cartesian_product([Zmod(2),Zmod(2)])
 sage: G2 = cartesian_product([Zmod(3),Zmod(5)])
 sage: cartesian_product(G1,G2)
 The cartesian product of (The cartesian product of (Ring of integers
 modulo 2, Ring of integers modulo 2), The cartesian product of (Ring of
 integers modulo 3, Ring of integers modulo 5))
 }}}
 versus
 {{{
 sage: cartesian_product(G1.cartesian_factors() + G2.cartesian_factors())
 sage: cartesian_product(G1.cartesian_factors() + G2.cartesian_factors())
 The cartesian product of (Ring of integers modulo 2, Ring of integers
 modulo 2, Ring of integers modulo 3, Ring of integers modulo 5)
 }}}

 > - docstring of `turyn_1965_3x3xK` -- can you wrap the `C3x...` with
 backticks so
 >   that it displays properly as mathematics notations?

 done

 > - As this functions is only building two difference families, shouldn't
 it be in some kind
 >   of database instead?

 A database with one function? Hum...

 > - Typo:
 >   {{{"can not exists"}}}

 done

 > - Is it correct to have a 'else' inside of `elif
 >   are_hadamard_difference_set_parameters(v,k,l)` which says that no
 construction
 >   is known? Couldn't another construction be able to build it?

 Not the one which are after. `4N^2` is a prime power if and only if
 `N=2^k`. In which case the construction is taken care before (!McFarland
 1973). The twin primes construction does not apply.

 > - To simplify the flow of those if/else if you need to break it into
 several
 >   smaller ones, you can use a trick like that:
 >   {{{
 >   if are_hadamard_difference_set_parameters(v,k,l) and
 (k-2*lmbda).is_prime():
 >       <whatever>
 >   }}}

 It will cost 3 of them and I need the `N` to dispatch to the constructors.

--
Ticket URL: <http://trac.sagemath.org/ticket/19779#comment:11>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to