Boolean Multiplication

Issue #69 new
Peter Schäfer created an issue

Hello,

I have extended M4RI to multiplication over the Boolean semiring. To put it short, XOR addition is replaced by OR. Cubic and M4R multiplication is available (but not Strassen).

I would like to contribute my code. Can I create a pull request ?

Regards, Peter

Comments (8)

  1. Peter Schäfer reporter

    Looks like I'm missing some privileges. Could you please grant me rights to create a pull request ?

    My code for Boolean matrix multiplication is mostly identical to the original code. The differences are not large:

    (1) addition is done using bitwise OR (instead of XOR)

    (2) in cubic multiplication, there's no need to calculate parity. Instead I look for the first entry != 0, and leave the loop early.

    (3) M4R lookup tables are calculated in different order. Your elegant loop over Gray codes doesn't work for me, because I can't subtract rows. Instead, table rows are summed in order of increasing Hamming weights (number of set bits). The resulting tables are still indexed by Gray codes, so everything else remains the same. Also, complexity does not increase.

    Regards, Peter

  2. Martin Albrecht repo owner

    Strange, doesn't everybody have the right to create a PR? I can't find an option to specifically enable it.

  3. Martin Albrecht repo owner

    Sorry if I'm misunderstanding but you should fork this repository, then push to that and then finally send a PR from your fork to this repository.

  4. Egor Basharin Account Deactivated

    Hello,

    I forked the repository and merged aforementioned sources with it. Also I created a pull request.

  5. Log in to comment