a solution, under rot13: n ersyrpgvba naq ebgngvba jbexf, V guvax ol naq nobhg nal natyr gung vfa'g avargl qrterrf be nal nkvf gung vfa'g gur k be l nkvf.
I'd be interested in an explanation for exactly why the exceptions to my solution don't work, I don't really understand why they shouldn't.
I read this this morning and haven't been able to get the problem out of my head since, glad this thread exists :)
My solution exploits the fact that in CD, C combines the rows of D, while in DC, C combines the columns of D. Here's the rest:
Yrg P or gur vqragvgl zngevk rkprcg jvgu -1 nf vgf obggbz-evtug ryrzrag. Gura PQ vf Q jvgu vgf obggbz ebj artngrq. Fvzvyneyl, QP vf Q jvgu vgf evtug pbyhza artngrq naq -QP vf Q jvgu vgf yrsg pbyhza artngrq. Fb gb trg PQ = -QP, jr whfg arrq gb svaq n Q fhpu gung artngvat vgf obggbz ebj unf gur fnzr rssrpg nf artngvat vgf yrsg pbyhza. Sbe 2k2 zngevprf, guvf vf nal Q jvgu mreb va gur gbc-yrsg naq obggbz-evtug cbfvgvbaf.
Rot13 don't work so good for specifying matrices!
n avargl qrterr ebgngvba naq n ersyrpgvba nobhg, nf sne nf V pna gryy nal, yvar guebhtu gur bevtva frrzf gb tvir gur evtug erfhyg.
Are we sure this is the correct meaning for "A = -B", where A and B are matrices? Some things I've read seem to be saying that that should be equivalent to AB = identity matrix, rather than Av = -1(Bv), where v is some vector.
Also, WLOG (without loss of generality) the top left entry of C and D is either 0 or 1, because you can multiply either matrix by any number other than 0 without changing whether the equation is true.
Your WLOG is elegant, though, in that it gives a simpler starting point that's guaranteed to work if anything does. I'll have to remember that trick.
Prove me wrong, and I will be tripping over myself to upvote you ;)
Did you look at my solution (http://news.ycombinator.com/item?id=3129023)? There's no higher-level theory in it. Is it brute force? Not sure. At least it doesn't require solving any element-wise equations.