Update: this is now solved, see Re^2: decomposing binary matrices (2).
Given a set of variables and a set of values, with the property that each variable has a distinct value, we can get a matrix of booleans summarising the possibilities (such that a value of 1 means "possible", 0 means "not possible"):
With those constraints, we can derive additional information: since A and E are restricted to only two values between them, they must consume those two values; effectively we can split the above matrix into two smaller matrices:
While this is relatively easy to do by eye with a small grid, I'm looking for an efficient algorithm to find such decompositions for larger grids, for both the case as in the example above where the number of variables is the same as the number of values, and for the case where there are more values than variables (so not all the values are used).
I'm not sure quite where to start looking, so suggestions for useful search terms would also be appreciated - I suspect that I should be treating the '1's in the matrix as edges in a graph, but quite what I'm looking for in the resulting graph I've not been able to characterise.
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link or
or How to display code and escape characters
are good places to start.