Optimizing/complete coverage

bahllr

Board Regular
Joined
May 7, 2009
Messages
62
I am working on the following problem and now realizing that my previous (ridiculously complex solution), is only a partial solution. I would appreciate any help!

I have a matrix that can expand in either direction (limited to 220 rows and roughly 90 columns). I am indicating the intersections with '1' as below.

<table border="0" cellpadding="0" cellspacing="0" width="320"><col style="width: 48pt;" width="64" span="5"> <tbody><tr style="height: 15pt;" height="20"> <td class="xl69" style="height: 15pt; width: 48pt;" width="64" height="20">
</td> <td class="xl69" style="width: 48pt;" width="64">Area 1</td> <td class="xl69" style="width: 48pt;" width="64">Area 2</td> <td class="xl69" style="width: 48pt;" width="64">Area 3</td> <td class="xl69" style="width: 48pt;" width="64">Area 4</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">Topic 1</td> <td align="right">1</td> <td align="right">1</td> <td align="right">1</td> <td align="right">1</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">Topic 2</td> <td align="right">1</td> <td align="right">1</td> <td align="right">1</td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">Topic 3</td> <td>
</td> <td align="right">1</td> <td>
</td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">Topic 4</td> <td>
</td> <td align="right">1</td> <td>
</td> <td align="right">1</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">Topic 5</td> <td>
</td> <td>
</td> <td align="right">1</td> <td align="right">1</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">Topic 6</td> <td>
</td> <td>
</td> <td align="right">1</td> <td>
</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">Topic 7</td> <td>
</td> <td>
</td> <td align="right">1</td> <td>
</td> </tr> </tbody></table>

I am looking for every combination of areas that will 'cover' or meet the topic requirements. So Topic 1 and 2 are 'covered' by area 1. But Topic 3 and 4 are covered by Area 2.....

So one 'solution' is: Topic 1,2 - Area 1
Topic 3,4 - Area 2
Topic 5,6,7 - Area 3

But there are multiple solutions and I am trying to outline them all....

I don't know if anyone has an idea about how this could be done. I am pretty familiar with VBA but not so much with matrix algebra or arrays....

I would really be keen on hearing peoples thoughts. Please let me know if I have not explained it well.
 
In re-reading my post I realize that the output is somewhat unclear. i am looking to have each set of Areas arranged in columns like below:

Area 1 Area 2
Area 2 Area 4
Area 3

Each column represents a set of areas that have intersections ('1') that cover each topic.

Thanks.
 
Upvote 0
I think generating every combination of 90 areas is computationally intractable; that's 2^90 ~ 10^27 combinations to evaluate.
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top