线性规划?
一个84*84的表格中填满了0和1,其中每行或每列的1的个数都是19个。如何选择最少的n行组成n*84的新表格,使得每列至少有一个1.
示例数据如下:111111100011100000001110000000000001110000000000000000001110000000000000000000000000
111110011010011000001001100000000001001100000000000000001001100000000000000000000000
111101010101010100000101010000000000101010000000000000000101010000000000000000000000
111100101100101100000010110000000000010110000000000000000010110000000000000000000000
110011111010000011001000001100000001000001100000000000001000001100000000000000000000
101011110101000010100100001010000000100001010000000000000100001010000000000000000000
100111101100100001100010000110000000010000110000000000000010000110000000000000000000
011011011100010010010001001001000000001001001000000000000001001001000000000000000000
010110111100001001010000100101000000000100101000000000000000100101000000000000000000
001101111100000100110000010011000000000010011000000000000000010011000000000000000000
110010000011111011001000000000110001000000000110000000001000000000110000000000000000
101001000011110110100100000000101000100000000101000000000100000000101000000000000000
100100100011101101100010000000011000010000000011000000000010000000011000000000000000
011000010011011110010001000000100100001000000100100000000001000000100100000000000000
010100001010111101010000100000010100000100000010100000000000100000010100000000000000
001100000101111100110000010000001100000010000001100000000000010000001100000000000000
000011010011010011110000001000100010000001000100010000000000001000100010000000000000
000010101010101011110000000100010010000000100010010000000000000100010010000000000000
000001100101100111110000000010001010000000010001010000000000000010001010000000000000
000000011100011111110000000001000110000000001000110000000000000001000110000000000000
110010000010000000001111101100110001000000000000001100001000000000000001100000000000
101001000001000000001111011010101000100000000000001010000100000000000001010000000000
100100100000100000001110110110011000010000000000000110000010000000000000110000000000
011000010000010000001101111001100100001000000000001001000001000000000001001000000000
010100001000001000001011110101010100000100000000000101000000100000000000101000000000
001100000100000100000111110011001100000010000000000011000000010000000000011000000000
000011010000000010001101001111100010000001000000001000100000001000000001000100000000
000010101000000001001010101111010010000000100000000100100000000100000000100100000000
000001100100000000100110011111001010000000010000000010100000000010000000010100000000
000000011100000000010001111111000110000000001000000001100000000001000000001100000000
000000000011010010001101001000111110000000000100001000010000000000100001000010000000
000000000010101001001010100100111110000000000010000100010000000000010000100010000000
000000000001100100100110010010111110000000000001000010010000000000001000010010000000
000000000000011100010001110001111110000000000000100001010000000000000100001010000000
000000000000000011110000001111111110000000000000010000110000000000000010000110000000
110010000010000000001000000000000001111101100110001100001000000000000000000001100000
101001000001000000000100000000000001111011010101001010000100000000000000000001010000
100100100000100000000010000000000001110110110011000110000010000000000000000000110000
011000010000010000000001000000000001101111001100101001000001000000000000000001001000
010100001000001000000000100000000001011110101010100101000000100000000000000000101000
001100000100000100000000010000000000111110011001100011000000010000000000000000011000
000011010000000010000000001000000001101001111100011000100000001000000000000001000100
000010101000000001000000000100000001010101111010010100100000000100000000000000100100
000001100100000000100000000010000000110011111001010010100000000010000000000000010100
000000011100000000010000000001000000001111111000110001100000000001000000000000001100
000000000011010010000000000000100001101001000111111000010000000000100000000001000010
000000000010101001000000000000010001010100100111110100010000000000010000000000100010
000000000001100100100000000000001000110010010111110010010000000000001000000000010010
000000000000011100010000000000000100001110001111110001010000000000000100000000001010
000000000000000011110000000000000010000001111111110000110000000000000010000000000110
000000000000000000001101001000100001101001000100001111110000000000000001000001000001
000000000000000000001010100100010001010100100010001111110000000000000000100000100001
000000000000000000000110010010001000110010010001001111110000000000000000010000010001
000000000000000000000001110001000100001110001000101111110000000000000000001000001001
000000000000000000000000001111000010000001111000011111110000000000000000000100000101
000000000000000000000000000000111110000000000111111111110000000000000000000010000011
110010000010000000001000000000000001000000000000000000001111101100110001100001100000
101001000001000000000100000000000000100000000000000000001111011010101001010001010000
100100100000100000000010000000000000010000000000000000001110110110011000110000110000
011000010000010000000001000000000000001000000000000000001101111001100101001001001000
010100001000001000000000100000000000000100000000000000001011110101010100101000101000
001100000100000100000000010000000000000010000000000000000111110011001100011000011000
000011010000000010000000001000000000000001000000000000001101001111100011000101000100
000010101000000001000000000100000000000000100000000000001010101111010010100100100100
000001100100000000100000000010000000000000010000000000000110011111001010010100010100
000000011100000000010000000001000000000000001000000000000001111111000110001100001100
000000000011010010000000000000100000000000000100000000001101001000111111000011000010
000000000010101001000000000000010000000000000010000000001010100100111110100010100010
000000000001100100100000000000001000000000000001000000000110010010111110010010010010
000000000000011100010000000000000100000000000000100000000001110001111110001010001010
000000000000000011110000000000000010000000000000010000000000001111111110000110000110
000000000000000000001101001000100000000000000000001000001101001000100001111111000001
000000000000000000001010100100010000000000000000000100001010100100010001111110100001
000000000000000000000110010010001000000000000000000010000110010010001001111110010001
000000000000000000000001110001000100000000000000000001000001110001000101111110001001
000000000000000000000000001111000010000000000000000000100000001111000011111110000101
000000000000000000000000000000111110000000000000000000010000000000111111111110000011
000000000000000000000000000000000001101001000100001000001101001000100001000001111111
000000000000000000000000000000000001010100100010000100001010100100010000100001111111
000000000000000000000000000000000000110010010001000010000110010010001000010001111111
000000000000000000000000000000000000001110001000100001000001110001000100001001111111
000000000000000000000000000000000000000001111000010000100000001111000010000101111111
000000000000000000000000000000000000000000000111110000010000000000111110000011111111
000000000000000000000000000000000000000000000000001111110000000000000001111111111111 EXCEL表如下: 最小顶点覆盖问题,NPC的,不过本题用类似双向搜的方法,有可能在O(n^4)求解。 \(f(1,1) = \begin{pmatrix}
0& 1 \\
1 & 0\end{pmatrix}
f(2,1) = \begin{pmatrix}
0& 1&0 \\
0 & 0&1\\1&0&0\end{pmatrix}
f(3,2) = \begin{pmatrix}
1 & 0&0&0&1 \\ 0 & 1&0&1&0\\0&0&1&1&0\\1&0&1&0&0\\0&1&0&0&1\end{pmatrix}\) 本帖最后由 aimisiyou 于 2017-1-7 09:17 编辑
\( 如果将一矩形(长宽不相等)的位置状态规定0为纵放,1为横放。则如图: \)
\( f(65,19)=? \) n=5吧。
页:
[1]