# Randomly choose matrices $A_{j}B = C_{j}$ with elements between 0 and 1

Problem

I have $$J$$ matrices $$C_{j}$$, which are $$K \times M$$.

Elements of each matrix $$C_{j}$$ are between 0 and 1.

I want to randomly choose $$J$$ matrices $$A_{j}$$ and one matrix $$B$$ such that:

• Elements of all matrices $$A_{j}$$ and matrix $$B$$ are between 0 and 1
• $$A_{j}B = C_{j}$$ for all $$j$$.
• Dimensions of each matrix $$A_{j}$$ is $$K \times L$$
• Dimensions of matrix $$B$$ is $$L \times M$$
• $$L \lt M \lt\lt J$$
• $$J$$ is ~50,000. $$K$$, $$L$$, and $$M$$ are ~15.

Attempt

1. Randomly choose a matrix $$B$$ within bounds.
2. Fix $$B$$ and find least square solutions $$A_{j}$$ such that $$A_{j}B \approx C_{j}$$
3. Replace any element in $$A_{j}$$ that is not between 0 and 1 by a random value between 0 and 1.
4. Fix $$A_{j}$$ and find least square solution $$B$$ such that that $$A_{j}B \approx C_{j}$$
5. Replace any element in $$B$$ that is not between 0 and 1 by a random value between 0 and 1.
6. Repeat steps 2 to 6 till converge.

Since $$J$$ is large, this might take a long time.

Question

What is the standard way to do this?

Thank you.

• Please credit the original source of the problem in the question. – Apass.Jack Dec 16 '18 at 16:16
• @Apass.Jack Where did you see this problem? What is the "original source"? – R zu Dec 16 '18 at 16:21
• The issue is not about whether I have seen this problem. The issue is, is this problem created by you? If yes, it is better stated that way. If not, then it is a general practice that the original copyright owner be credited, unless it is in public domain. Or something like that. – Apass.Jack Dec 16 '18 at 16:29