Home / Computer science / Set cover / Computation
Input
\begin{equation*}
A = \begin{pmatrix}
a_{11} & & \cdots & & a_{1n} \\
& \ddots & & & \\
\vdots & & a_{ij} & & \vdots \\
& & & \ddots & \\
a_{m1} & & \cdots & & a_{mn}
\end{pmatrix}
\in {\{0, 1\}}^{m \times n}
\end{equation*}
table = np.array(TABLE)[2:, 1:]
A = np.where(table == '', 0, 1)
A
| 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 | 1 | 1 | 0 | 0 |
| 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 |
| 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 1 | 0 | 0 | 0 | 1 |
m = A.shape[0]
n = A.shape[1]
(m, n)
(6, 8)