← Complete problem index

PROJECT EULER · #0782

Distinct Rows and Columns

Statement only · UnsolvedOriginal problem ↗

The complexity of an n×n binary matrix is the number of distinct rows and columns.

For example, consider the 3×3 matrices A=(101000101)B=(000000111) A has complexity 2 because the set of rows and columns is {000,101}. B has complexity 3 because the set of rows and columns is {000,001,111}.

For 0kn2, let c(n,k) be the minimum complexity of an n×n binary matrix with exactly k ones.

Let C(n)=k=0n2c(n,k) For example, C(2)=c(2,0)+c(2,1)+c(2,2)+c(2,3)+c(2,4)=1+2+2+2+1=8.
You are given C(5)=64, C(10)=274 and C(20)=1150.

Find C(104).

Write-up coming later

The complete problem is available here. An approach, code, and answer will be added later.