3
$\begingroup$

The built in function:

Orthogonalize[m]

where m is a list of vectors returns a orthogonal basis for m. However, I want to stick to the binary field. However, I tried this:

Orthogonalize[m,Mod[#1.#2,2]&]

But this just still gives a set of vectors with negative coordinates.

Can anyone please help.

Thanks.

$\endgroup$
2
  • $\begingroup$ Can you give an example of a set of vectors where your proposal fails, and what the answer ought to be? $\endgroup$ – J. M.'s ennui Aug 14 '12 at 5:29
  • $\begingroup$ Will vectors that are self-orthogonal be problrmatic for your purposes? if not, could just do Gram-Schmidt without the normalization part. $\endgroup$ – Daniel Lichtblau Aug 14 '12 at 15:33
9
$\begingroup$

Define the inner product modulo $2$:

orthogonalize[a_] := Mod[Orthogonalize[a, Mod[#1.#2, 2] &], 2]

Example:

(m = Union[orthogonalize[RandomInteger[{0, 1}, {500, 64}]] ]) // ArrayPlot

Orthogonal basis

Check orthogonality:

Mod[m . Transpose[m], 2] // ArrayPlot

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.