From 3cf39835a05cafffa1406c0ace944f9f4b7e3042 Mon Sep 17 00:00:00 2001 From: Nathann Cohen Date: Mon, 11 Aug 2014 11:04:12 +0200 Subject: [PATCH] trac #16604: Reviewing the review --- .../combinat/designs/orthogonal_arrays.py | 33 +++++++++++-------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/src/sage/combinat/designs/orthogonal_arrays.py b/src/sage/combinat/designs/orthogonal_arrays.py index a5d2eb9ba17..36f585a3620 100644 --- a/src/sage/combinat/designs/orthogonal_arrays.py +++ b/src/sage/combinat/designs/orthogonal_arrays.py @@ -33,6 +33,7 @@ :meth:`OA_from_quasi_difference_matrix` | Return an Orthogonal Array from a Quasi-Difference matrix :meth:`OA_from_Vmt` | Return an Orthogonal Array from a `V(m,t)` :meth:`OA_from_PBD` | Return an `OA(k,n)` from a PBD + :meth:`OA_n_times_2_pow_c_from_matrix` | Return an `OA(k, \vert G\vert \cdot 2^c)` from a constrained `(G,k-1,2)`-difference matrix. :meth:`OA_from_wider_OA` | Return the first `k` columns of `OA`. .. TODO:: @@ -1216,7 +1217,7 @@ def OA_n_times_2_pow_c_from_matrix(k,c,G,A,Y): matrix. This construction appears in [AbelCheng1994]_ and [AbelThesis]_. - + Let `G` be an additive Abelian group. Let `w` be a multiplicative generator of `GF(2^c)^*`. We denote by `H` the `GF(2)`-hyperplane in `GF(2^c)` spanned by `w^0, w^1, \ldots, w^{c-2}`. @@ -1224,27 +1225,23 @@ def OA_n_times_2_pow_c_from_matrix(k,c,G,A,Y): Let `A` be a `(k-1) \times 2|G|` array with entries in `G \times GF(2^c)` and `Y` be a vector with `k-1` entries in `GF(2^c)`. Let `B` and `C` be respectively the part of the array that belong to `G` and `GF(2^c)`. - - The input `A` and `Y` must satisfy the following condition. For any `i \neq - j` and `g \in G` - - there are exactly two values of `k` in {1,...,2p} such that `B_{i,k} - - B_{j,k} = g` (i.e. `B` is a `(G,k,2)`-difference matrix), + The input `A` and `Y` must satisfy the following conditions. For any `i \neq + j` and `g \in G`: + + - there are exactly two values of `k` such that `B_{i,k} - B_{j,k} = g` + (i.e. `B` is a `(G,k,2)`-difference matrix), - let `k_1` and `k_2` denote the two values of `k` given above, then exactly one of `C_{i,k_1} - C_{j,k_1}` and `C_{i,k_2} - C_{j,k_2}` belongs to the `GF(2)`-hyperplane `(Y_i - Y_j) \cdot H` (we implicitely assumed that `Y_i \not= Y_j`). - Under these conditions, it is easy to check that the array whose rows are - given for `i=1,\ldots,|G|` by `A_{i,k} + (0, Y_i \cdot v)` where `k` ranges - from `1` to `k-1` and `v` belongs to `H` is a difference matrix over `G_1 - \times GF(2^c)`. + Under these conditions, it is easy to check that the array whose `|G|\cdot + 2^c` rows of length `k-1` are given for all `1\leq i\leq 2|G|,v\in H` by + `A_{i,k} + (0, Y_i \cdot v)` is a `(G \times GF(2^c),k-1,1)`-difference + matrix. - By convention, the `GF(2^c)` part of the input matrix `A` and vector `Y` are - given in the following form: the integer `i` corresponds to the element - `w^i` and ``None`` corresponds to `0`. - INPUT: - ``k,c`` (integers) -- integers @@ -1255,6 +1252,14 @@ def OA_n_times_2_pow_c_from_matrix(k,c,G,A,Y): - ``Y`` -- a vector with entries in `GF(2^c)` + .. NOTE:: + + By convention, the `GF(2^c)` part of the input matrix `A` and vector `Y` + are given in the following form: the integer `i` corresponds to the + element `w^i` and ``None`` corresponds to `0`. + + + .. SEEALSO:: Several examples use this construction: