IBM Research

PUZZLE   IBM-337

The Powers of a Binary Matrix

IBM Research · Ponder This · 2026-05

IBM Ponder This #337 · May 2026

This riddle was proposed by Lorenzo Gianferrari Pini and Radu-Alexandru Todor - thanks!

Given a square binary matrix of order N, AM(Z2)N×N such there is exactly one "1" value in each row and column of A, we can find the lowest m>0 such that Am=I, the identity matrix.

Denote by g(N) the maximum such m when going over all the matrices in M(Z2)N×N satisfying the above condition.

For example, g(10)=30 and g(50)=180180.

Your goal: Find g(106) mod (109+7).

A bonus "*" will be given for finding g(108) mod (109+7).

Solution

Best opened after a real attempt

To be added.