#17662: Evenly distributed sets
-------------------------------------+-------------------------------------
       Reporter:  vdelecroix         |        Owner:
           Type:  enhancement        |       Status:  needs_info
       Priority:  major              |    Milestone:  sage-6.5
      Component:  combinatorial      |   Resolution:
  designs                            |    Merged in:
       Keywords:                     |    Reviewers:  Nathann Cohen
        Authors:  Vincent Delecroix  |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:  public/17662       |  ac142f40af9a5df101cf7e312590d65bb71a307a
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by ncohen):

 * status:  needs_review => needs_info


Comment:

 Hellooooooooooooooooooo,

 - Isn't it weird that all EDS not considered 'up to isomorphism' always
 begin
   with `0,1`? Perhaps you should say somewhere that they are always
 normalized?
   {{{
   sage: E = EvenlyDistributedSetsBacktracker(Zmod(13), 4,
 up_to_isomorphism=False)
   sage: for B in E: print B
   [0, 1, 11, 5]
   [0, 1, 4, 6]
   [0, 1, 9, 3]
   [0, 1, 8, 10]
   }}}

 - `to_difference_family` -- could you add a check that this is indeed a
   difference family? Like with the usual `check` argument?

 - Same with `an_element`.

 - "The value of the other" -- the value of the other what?
   {{{
   # Given one such function, the values of the other are 1/z, 1-z,
   # 1/(1-z), (z-1)/z and z/(z-1).
   }}}

 - Why would that map `B[i]` to 1?
   {{{
   # We choose
   #    t -> (x - t)/ (x - B[j])
   #  (that maps x to 0 and B[i] to 1
   }}}

 - I do not get this line
   {{{
   # try to append x
   if self._add_element(x,kk):
       # note: the element x is already added to B in ._add_element()
       if kk == k-1:
           ans = self._B_automorphisms()
           if ans is False:
               continue
   }}}
   Wouldn't it be better to call `_B_automorphisms()` in
 `self._add_element`, and
   to not add the element if the min property is not satisfied?

 - I do not understand why you do the same test twice:
   {{{
             if x == q-2:
                 kk -= 1
                 x = B[kk]
                 self._pop(kk)
                 if x == q-2:
                     kk -= 1
                     x = B[kk]
                     self._pop(kk)
                     if x == q-2:
   }}}
   Isn't it better to define x as "the last element in the list+1"? This
 way you
   couldn't have `x==q-2` when `B[kk-1]=q-2`

 I added a small commit containing mostly doc. I also changed a bit the
 management of `self.t`. I began by replacing your `if self.t[i]:
 self.coset[i]=1` by a `self.coset[i] |= self.t[i]`, then noticed that it
 was
 probably why you had been setting t to zero outside of the `_add_element`
 function.

 It actually took me some time to understand that `t` was always equal to 0
 when
 this function was called. Because you initialized it elsewhere, I thought
 for a
 while that it used some values computed in another function.

 Nathann

--
Ticket URL: <http://trac.sagemath.org/ticket/17662#comment:24>
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.

Reply via email to