Cody

Problem 1051. Exact binary matrix factorization

Given a binary-valued (only ones and zeroes) MxN matrix C, and K (where K<M and K<N) find a binary-valued MxK matrix A and a binary-valued KxN matrix B such that A*B equals C. e.g. for K = 2, and

C =
       1     1     1     0
       0     0     0     0
       0     1     0     1

then one possible solution is

A =
     0     1
     0     0
     1     0
B =
       0     1     0     1
       1     1     1     0

For this problem, assume that at least one solution exists.

Note that you cannot do matrix multiplication with two logical matrices in MATLAB.

Solution Stats

32.35% Correct | 67.65% Incorrect
Last solution submitted on Jun 25, 2015

Problem Comments

Solution Comments

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!

Join the 15-year community celebration.

Play games and win prizes!

Learn more