Advertisement

DLT 2020: Developments in Language Theory pp 266-279

# Complexity of Searching for 2 by 2 Submatrices in Boolean Matrices

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 12086)

## Abstract

We study the problem of finding a given $$2\times 2$$ matrix as a submatrix of a given Boolean matrix. Three variants are considered: search for a matching submatrix of any area, of minimum area, or of maximum area. The problem relates to 2D pattern matching, and to fields such as data mining, where the search for submatrices plays an important role. Besides these connections, the problem itself is very natural and its investigation helps to demonstrate differences between search tasks in one-dimensional and multidimensional topologies.

Our results reveal that the problem variants are of different complexities. First, we show that given an $$m\times n$$ Boolean matrix, the any variant can be solved in $${\widetilde{O}(mn)}$$ time for any given $$2\times 2$$ matrix, but requires various strategies for different $$2\times 2$$ matrices. This contrasts with the complexity of the task over matrices with entries from the set $$\{0,1,2\}$$, where the problem is Triangle Finding-hard and hence no algorithm with similar running time is known for it. Then, we show that the minimization variant in the case of Boolean matrices can also be solved in $${\widetilde{O}(mn)}$$ time. Finally, in contrast, we prove Triangle Finding-hardness for the maximization variant and show that there is a rectangular matrix multiplication-based algorithm solving it in $$O\left( mn (\min \{m,n\})^{0.5302}\right)$$ time.

## Keywords

Boolean matrix Submatrices Two-dimensional pattern matching Local picture language Triangle Finding-hard problem Fast matrix multiplication

## 1 Introduction

We study the complexity of Four Corner Problems. A Four Corner Problem is concerned with finding a given $$2\times 2$$ matrix as a submatrix of a given Boolean matrix. By submatrix, we mean a matrix that is formed by restricting the original matrix to a subset of its rows and columns. For a matrix Open image in new window , where $$a,b,c,d\in \{0,1\}$$, we consider three kinds of Four Corner Problems:
1. 1.

In the input Boolean matrix $$\mathbf {M}$$, search for any $$2\times 2$$ submatrix of $$\mathbf {M}$$ that matches $$\mathbf {B}$$ (we abbreviate this task as Open image in new window )

2. 2.

Search for a submatrix that matches $$\mathbf {B}$$ and encloses the minimum area of $$\mathbf {M}$$ (abbreviated as Open image in new window )

3. 3.

Search for a submatrix that matches $$\mathbf {B}$$ and encloses the maximum area of $$\mathbf {M}$$ (abbreviated as Open image in new window ).

In general, the problem of finding a specific submatrix in a larger matrix is of importance in several computer science disciplines. For example Boolean matrices, and their associated submatrices of 1’s, play a central role in data mining problems such as frequent itemset mining . Moreover, finding a submatrix of 1’s in the adjacency matrix of a graph G corresponds to finding a biclique of G . As the maximum edge biclique problem is NP-complete , the complexity of searching for a $$k\times k$$ submatrix is expected to grow as k grows. In this paper, we deal with the simplest case when $$k=2$$. An example of its use is as follows. Given m respondents answering n yes/no questions in a questionnaire, are there two respondents who answered yes on two of the same questions?

The above tasks Open image in new window , Open image in new window and Open image in new window can also be viewed as two-dimensional pattern matching: we search for any/min/max rectangular block of a matrix that matches a given template. In only one dimension, similar pattern matching problems can be described using regular languages . In this case, all the any/min/max tasks are solvable by a finite-state automaton-based algorithm in time linear in the input length . In two dimensions, these problems are easily definable via the notion of local picture languages . This is a formalism defining sets of two-dimensional arrays (so called pictures) for which the membership problem can be determined by looking at a window of size $$2\times 2$$. These picture languages are a straightforward generalization of the well known local (string) languages , which form a proper subset of the family of regular languages.

We introduced in  a general algorithm solving two-dimensional pattern matching against local picture languages in time $$O(mn\min \{m,n\})$$ for $$m\times n$$ input matrices. Further, for a specific local picture language, we investigated the pattern matching problem which is precisely Open image in new window and showed it to be solvable in linear time in the input matrix area. Here our goal is to propose more efficient algorithms for a specialized subclass of local picture language pattern matching problems over Boolean matrices called Four Corner Problems. In particular, we show that the problem Open image in new window is solvable in $$\widetilde{O}(mn)$$ time for any $$a,b,c,d\in \{0,1\}$$ (Theorem 1). This result is surprising because it was proven in  that searching for a submatrix matching Open image in new window in an $$n\times n$$ matrix over $$\{0,1,2\}$$ is Triangle Finding-hard. In other words, the proof introduced a fine-grained reduction  from Triangle Finding to the search problem for Open image in new window over $$\{0,1,2\}$$ suggesting that Four Corner Problems are harder over larger alphabets.

The Triangle Finding problem is to decide whether a given undirected graph $$G=(V,E)$$ is triangle-free or not. It is a classic algorithmic problem which can be reduced to Boolean Matrix Multiplication (see ) and solved in time $$O(n^{\omega })$$, where $$n=|V|$$ and $$\omega < 2.373$$ denotes the matrix multiplication exponent . However, it is currently unknown whether Triangle Finding can be solved in time $$\widetilde{O}(n^2)$$. Note that conditional lower bounds based on Triangle Finding are known for several problems (see, e.g., [1, 7, 9, 11]).

We further investigate the minimization and maximization variants of the search problem over Boolean matrices. For the min variant, we improve on Theorem 1 by showing that the problem Open image in new window is solvable in $$\widetilde{O}(mn)$$ time for any $$a,b,c,d\in \{0,1\}$$ (Theorem 4). For the max variant, we prove that Open image in new window is Triangle Finding-hard for any $$a,b,c,d\in \{0,1\}$$ (Theorem 5). Also, we present an algorithm that solves Open image in new window in $$O\left( mn (\min \{m,n\})^{0.5302}\right)$$ time (Theorem 6). This algorithm is based on computing a minimum witness for Boolean matrix multiplication . However, it is likely impractical because it uses a fast rectangular matrix multiplication algorithm that involves a large constant factor.

The paper is structured as follows. Section 2 establishes some required notions. Then, Sects. 3, 4 and 5 gradually present results for the problems Open image in new window , Open image in new window and Open image in new window .

## 2 Preliminaries

$$\mathbb {N}=\{0,1,2,\ldots \}$$ is the set of natural numbers and Open image in new window is the set of positive integers. For functions $$f,g:\mathbb {N}\times \mathbb {N}\rightarrow \mathbb {N}$$, we write $$f(m,n)=\widetilde{O}(g(m,n))$$ if and only if there are numbers $$p,q \in \mathbb {N}$$ such that $$f(m,n)=O\left( g(m,n) \log ^p (m) \log ^q (n) \right)$$.

Let $$\mathbf {M}$$ be an $$m\times n$$ Boolean matrix. We write $$\overline{\mathbf {M}}$$ to denote the matrix obtained from $$\mathbf {M}$$ by negating its entries (i.e., we have $$\overline{\mathbf {M}}_{i,j}=1-\mathbf {M}_{i,j}$$ for every entry). We consider that rows and columns of $$\mathbf {M}$$ are indexed from 1 to m and n, respectively. A $$k\times \ell$$ (rectangular) block of $$\mathbf {M}$$ at a position (rc) is denoted as $$B=\mathbf {M}[r,c;k,\ell ]$$, where $$1\le k\le m$$, $$1\le \ell \le n$$, $$1\le r\le m-k+1$$, $$1\le c\le n-\ell +1$$. Its entries coincide with the entries of the submatrix obtained from $$\mathbf {M}$$ by deleting rows $$1,\ldots ,r-1$$ and $$r+k,\ldots ,m$$, and columns $$1,\ldots ,c-1$$ and $$c+\ell ,\ldots , n$$. We use $$B_{i,j}$$ to refer to the entry in the i-th row and j-th column of B. We have $$B_{i,j}=\mathbf {M}_{r+i-1,c+j-1}$$. We define the area of B as $$\mathrm {a}(B)=k\ell$$, and the $$2\times 2$$ corners submatrix of B as
$$\varkappa (B)=\left( \begin{array}{cc} B_{1,1} &{} B_{1,\ell } \\ B_{k,1} &{} B_{k,\ell } \end{array} \right) .$$
The set of all blocks of $$\mathbf {M}$$ is denoted by $$\mathcal {B}_{\mathbf {M}}$$.

For $$a,b,c,d\in \{0,1\}$$, we define the following search problems (also known as Four Corner Problems) for an input Boolean matrix $$\mathbf {M}$$.

## 3 Searching for Any Matching Submatrix

This section presents algorithms for Open image in new window that run in nearly linear time in the input matrix area, for every abc, and d. In some cases an efficient algorithm is achieved by using properties of the minimum matching submatrix, so these algorithms also solve the corresponding Open image in new window problem (see Lemmas 2 and 3).

Out of all Open image in new window problems, Open image in new window and Open image in new window are easiest to solve. It has already been shown in  that Open image in new window reduces to finding a four-cycle in a bipartite graph. Here we give a more straightforward algorithm.

### Proof

Let an $$m\times n$$ Boolean matrix $$\mathbf {M}$$ be given. Without loss of generality, suppose that $$m \ge n$$. The algorithm is as follows. We create a set S of pairs of column indexes. Initially, the set is empty. The matrix is traversed row by row. For each row i, we find the set $$C_i$$ of all column indexes j such that $$\mathbf {M}_{i,j}=1$$. Then, for every pair $$\{c_1,c_2\}\in {C_i \atopwithdelims ()2}$$, we check whether $$\{c_1,c_2\}$$ is in S. If not, it is added to S. Otherwise, a desired submatrix has been found.

The algorithm takes $$O(mn + n^2)$$ time because it visits each entry from $$\mathbf {M}$$ at most once and it adds at most $${n}\atopwithdelims (){2}$$ pairs of column indexes into S. Because $$m \ge n$$, the total runtime is $$O(m n)$$.    $$\square$$

### Proof

Let $$\mathbf {M}$$ be an $$m\times n$$ Boolean matrix. The algorithm is based on the following claim: If $$\mathbf {M}$$ contains a block $$B=\mathbf {M}[r,c;k,\ell ]$$ such that Open image in new window , then it contains a block $$B'=\mathbf {M}[r',c';k',\ell ']$$ such that Open image in new window , $$B'_{i,1}=0$$ for all $$i=2,\ldots , k'-1$$ and $$B'_{k',j}=0$$ for all $$j=2,\ldots , \ell '-1$$ (i.e., the left and bottom edge of $$B'$$, excluding the corners, contain only 0 entries).

To see this, suppose without loss of generality that $$B_{i,1}=1$$ for some $$1< i <k$$. Let $$B_1=\mathbf {M}[r,c;i,\ell ]$$ and $$B_2=\mathbf {M}[r+i-1,c;k-i+1,\ell ]$$. Then, either Open image in new window (if $$B_{i,\ell }=1$$) or Open image in new window (if $$B_{i,\ell }=0$$). Since $$B_1$$ and $$B_2$$ are proper subsets of B, we have found a smaller block containing Open image in new window as a submatrix.

Now, we present the algorithm. It creates a map $$\sigma$$ where a key is a pair (ij) such that $$\mathbf {M}_{i,j} = 1$$. The value associated with (ij) is a pair $$(i^{\prime },j^{\prime })$$ such that $$i^{\prime }$$ is the largest row index less than i such that $$\mathbf {M}_{i^{\prime },j} = 1$$ (i.e., $$i'$$ is the row index of the nearest entry 1 located upwards from the position (ij)) and $$j^{\prime }$$ is the smallest column index greater than j such that $$\mathbf {M}_{i,j^{\prime }} = 1$$ (i.e., the column index of the nearest entry 1 rightwards). Note that the value of $$i'$$ or $$j'$$ might be undefined if there is no such row index or column index, respectively.

It is possible to build $$\sigma$$ in $$O(m n)$$ time by making two passes over $$\mathbf {M}$$. The first pass is to compute the $$i^{\prime }$$’s. The matrix $$\mathbf {M}$$ is scanned column by column. Each column index j is scanned from top to bottom. Whenever entry 1 is detected at a position $$(i',j)$$, then $$i'$$ is the first component of $$\sigma (i,j)$$ for the next detected entry 1 from position (ij). Analogously, the second pass, scanning $$\mathbf {M}$$ row by row, is to compute the $$j^{\prime }$$’s.

Now, for each key (ij) in the map $$\sigma$$, the algorithm takes its value $$(i^{\prime }, j^{\prime })$$ and checks if rows $$i, i^{\prime }$$ and columns $$j, j^{\prime }$$ form a desired submatrix matching Open image in new window . By doing this, every existing block with 0 entries on the left and bottom edges is checked. Among these blocks, a minimum-area block B such that Open image in new window is returned as the result.

Assuming constant time map operations, the algorithm runs in $$O(m n)$$ time (note that the map $$\sigma$$ can be implemented by using an $$m\times n$$ array).    $$\square$$

### Proof

Case I (square matrices): Let an $$n\times n$$ Boolean matrix $$\mathbf {M}$$ be given. We present a divide and conquer strategy. If t(n) denotes the runtime of searching for a desired minimum submatrix in an $$n\times n$$ matrix, then we show that
\begin{aligned} t(n) = 4 \cdot t\left( \frac{n}{2}\right) + O\left( n^2\right) . \end{aligned}
(1)
To accomplish this, we split $$\mathbf {M}$$ horizontally into matrices $$\mathbf {M}_{\mathrm {top}}$$ and $$\mathbf {M}_{\mathrm {bottom}}$$, where $$\mathbf {M}_{\mathrm {top}}$$ is $$\lceil \frac{n}{2} \rceil$$ by n and $$\mathbf {M}_{\mathrm {bottom}}$$ is $$\lfloor \frac{n}{2} \rfloor$$ by n. Next, we split $$\mathbf {M}_{\mathrm {top}}$$ vertically into $$\mathbf {M}_{\mathrm {top},\mathrm {left}}$$, which is $$\lceil \frac{n}{2} \rceil$$ by $$\lceil \frac{n}{2} \rceil$$, and $$\mathbf {M}_{\mathrm {top},\mathrm {right}}$$, which is $$\lceil \frac{n}{2} \rceil$$ by $$\lfloor \frac{n}{2} \rfloor$$. Quite analogously, we split $$\mathbf {M}_{\mathrm {bottom}}$$ vertically into $$\mathbf {M}_{\mathrm {bottom}, \mathrm {left}}$$ and $$\mathbf {M}_{\mathrm {bottom}, \mathrm {right}}$$. A desired minimum submatrix is either in one of the four $$\frac{n}{2}$$ by $$\frac{n}{2}$$ matrices or it spans the border between either $$\mathbf {M}_{\mathrm {top}}$$ and $$\mathbf {M}_{\mathrm {bottom}}$$, $$\mathbf {M}_{\mathrm {top},\mathrm {left}}$$ and $$\mathbf {M}_{\mathrm {top},\mathrm {right}}$$, or, $$\mathbf {M}_{\mathrm {bottom},\mathrm {left}}$$ and $$\mathbf {M}_{\mathrm {bottom},\mathrm {right}}$$. We propose a procedure running in $$O(n^2)$$ time that finds a desired minimum submatrix by the assumption that there is such a submatrix crossing the specified borders. Therefore, in $$O(n^2)$$ time, we reduce finding a desired submatrix in an n by n matrix $$\mathbf {M}$$ to finding a desired submatrix in one of four $$\frac{n}{2}$$ by $$\frac{n}{2}$$ matrices. If we solve recurrence (1), then we get $$t(n) = O\left( n^2 \log (n) \right)$$ .

Without loss of generality, let us deal only with the border between $$\mathbf {M}_{\mathrm {top}}$$ and $$\mathbf {M}_{\mathrm {bottom}}$$. We claim: if $$B=\mathbf {M}[r,c;k,\ell ]$$ is a minimum-area block of $$\mathbf {M}$$ such that Open image in new window , then $$B_{i,1} = B_{i,\ell }$$ for all $$i=2,\ldots , k-1$$. Indeed, $$B_{i,1} \ne B_{i,\ell }$$ would clearly contradict the minimality of B.

Based on the claim, we create maps $$\sigma _{\mathrm {top}}$$ and $$\sigma _{\mathrm {bottom}}$$ such that $$\sigma _{\mathrm {top}}(\{i,j\})$$ is the largest row index such that columns i and j differ in $$\mathbf {M}_{\mathrm {top}}$$, and, analogously, $$\sigma _{\mathrm {bottom}}(\{i, j\})$$ is the smallest row index such that columns i and j differ in $$\mathbf {M}_{\mathrm {bottom}}$$. Once we have constructed $$\sigma _{\mathrm {top}}$$ and $$\sigma _{\mathrm {bottom}}$$ we go through each pair of column indexes $$\{i, j\}$$ and check if rows $$\sigma _{\mathrm {top}}(\{i, j\})$$, $$\sigma _{\mathrm {bottom}}(\{i, j\})$$ and columns i, j together create a desired submatrix of $$\mathbf {M}$$. A minimum submatrix among the detected submatrices is the candidate for the resulting submatrix returned by the procedure.

It remains to explain how we obtain the maps. Let us first give a construction for $$\sigma _{\mathrm {top}}$$. We create a set X of pairwise disjoint sets of column indexes. Initially, X contains one set containing all column indexes. We repeat the following process for each row of $$\mathbf {M}_{\mathrm {top}}$$, starting at the bottommost one and proceeding upwards: Create two disjoint sets $$A_0$$ and $$A_1$$ where $$A_0$$ contains all column indexes that are 0’s and $$A_1$$ contains all column indexes that are 1’s in the current row. For each set S in X, split S into two disjoint subsets $$S_0 = S \cap A_0$$ and $$S_1 = S \cap A_1$$. For every $$\{i, j\}$$ such that $$i \in S_0$$ and $$j \in S_1$$, set $$\sigma _{\mathrm {top}}(\{i, j\})$$ to the current row index. Then, update X by replacing S with $$S_0$$ and $$S_1$$. Throw out any sets from X that have less than two elements. Finish when X is empty or every row of $$\mathbf {M}_{\mathrm {top}}$$ has been processed.

We similarly build $$\sigma _{\mathrm {bottom}}$$, but we start at the top row of $$\mathbf {M}_{\mathrm {bottom}}$$ going one row down at a time. It only takes $$O(n^2)$$ time to construct $$\sigma _{\mathrm {top}}$$ and $$\sigma _{\mathrm {bottom}}$$ because we do O(n) work per row plus an additional constant amount of work for each pair of columns.

Case II (rectangular matrices): Let an $$m\times n$$ Boolean matrix $$\mathbf {M}$$ be given. Assume without loss of generality that $$m > n$$.

We perform horizontal splits to divide $$\mathbf {M}$$ into $$d = \lceil \frac{m}{n}\rceil$$ smaller matrices $$\{\mathbf {M}_k\}_{k\in [d]}$$ such that for each $$k \in [d - 1]$$, $$\mathbf {M}_k$$ is n by n, and $$\mathbf {M}_{d}$$ is c by n for some $$c \le n$$. A desired minimum submatrix is either in $$\mathbf {M}_k$$ for some $$k \in [d]$$ or it crosses the border between $$\mathbf {M}_k$$ and $$\mathbf {M}_{k+1}$$ for some $$k \in [d - 1]$$. Then, the former cases in total take $$O\left( \frac{m}{n} \cdot t(n) \right)$$ time. We claim that the latter cases take O(mn) time. For each $$k \in [d - 1]$$, we construct maps $$\sigma _{k, \mathrm {top}}$$ and $$\sigma _{k, \mathrm {bottom}}$$ such that $$\sigma _{k, \mathrm {top}}(\{i, j\})$$ is the smallest row index such that columns i and j differ in $$\mathbf {M}_{k}$$, and $$\sigma _{k, \mathrm {bottom}}(\{i, j\})$$ is the largest row index such that columns i and j differ in $$\mathbf {M}_{k}$$. Following the same approach as for the square matrix case, we can construct all maps in total time O(mn). Then, for each pair of column indexes i, j we have up to d cases to check. This results in total time O(mn). Note that if a map is not defined at $$\{i, j\}$$, then we try the next map and combine the cases together since this means a submatrix might span across multiple horizontal splits. In total, our algorithm takes $$O\left( \frac{m}{n} \cdot t(n) + m n\right) = O(m n \log (n))$$ time.    $$\square$$

### Proof

Let an $$m\times n$$ Boolean matrix $$\mathbf {M}$$ be given.

Case I (tall matrices): We consider the case when $$m \ge n$$. We proceed in a similar manner as in the proof of Lemma 1. We create a set S of pairs of column indexes. Initially, the set is empty. The matrix is traversed row by row. For each row, we do the following. We create a set R. Initially, R is empty, but we will add column indexes to R. We scan entries from left to right in the row. When we encounter a 1 entry at column index i, we add i to R. When we encounter a 0 entry at column index j, we go through each column index i from R. If (ij) is in S, then we found a desired submatrix. Otherwise, we add (ij) to S. Since $$m \ge n$$, this takes $$O(m n + n^2) = O(m n)$$ time.

Case II (short matrices): We consider the case when $$m < n$$. We perform vertical splits to divide $$\mathbf {M}$$ into $$d = \lceil \frac{n}{m}\rceil$$ smaller matrices $$\{\mathbf {M}_k\}_{k\in [d]}$$ such that for each $$k \in [d - 1]$$, $$\mathbf {M}_k$$ is m by m, and $$\mathbf {M}_{d}$$ is m by c for some $$c \le m$$. The matrix $$\mathbf {M}$$ contains a desired submatrix if and only if some $$\mathbf {M}_k$$ contains a minimal submatrix for some $$k \in [d]$$ or there is a minimal submatrix that crosses the border between $$\mathbf {M}_k$$ and $$\mathbf {M}_{k+1}$$ for some $$k \in [d - 1]$$.

Consider the former condition. Checking if a given $$\mathbf {M}_k$$ matrix contains a minimal desired submatrix takes $$O(m^2)$$ time by applying the approach from the first case. Checking all of the matrices in $$\{\mathbf {M}_k\}_{k\in [d]}$$ takes $$O(d \cdot m^2) = O\left( \frac{n}{m} \cdot m^2\right) = O(m n)$$ time.

Now, we focus on checking the latter condition. For each $$k \in [d - 1]$$, we construct maps $$\sigma _{k, \mathrm {left}}$$ and $$\sigma _{k, \mathrm {right}}$$ such that $$\sigma _{k, \mathrm {left}}(\{i, j\})$$ is the smallest column index such that rows i and j are equal in $$\mathbf {M}_{k}$$, and $$\sigma _{k, \mathrm {right}}(\{i, j\})$$ is the largest column index such that rows i and j are equal in $$\mathbf {M}_{k}$$. Once we have constructed these maps, we consider each pair of rows i and j. We have up to $$d - 1$$ cases to check where each case considers the border between $$\mathbf {M}_k$$ and $$\mathbf {M}_{k+1}$$ for some $$k \in [d - 1]$$. We check each case by seeing if rows i and j along with columns $$\sigma _{k, \mathrm {right}}(\{i, j\})$$ and $$\sigma _{k + 1, \mathrm {left}}(\{i, j\})$$ form a desired submatrix. It is sufficient to check these submatrices because we are only concerned with desired submatrices crossing the border that are minimal. Note if a map is not defined at $$\{i, j\}$$, then we try the next map and combine the cases together since this means a submatrix might span across multiple vertical splits. This takes $$O(d \cdot m^2) = O\left( \frac{n}{m} \cdot m^2\right) = O(m n)$$ time. It remains to describe how the maps are constructed. We claim that the maps can be constructed in $$O(m n \log (m))$$ time. Therefore, the total runtime is $$O(m n \log (m))$$.

Given $$k \in [d - 1]$$, we describe how to construct $$\sigma _{k, \mathrm {left}}$$ for the matrix $$\mathbf {M}_{k}$$. For each $$\ell \in [\log (m)]$$, we construct a matrix $$\mathbf {M}_{k, \ell }$$. The matrix $$\mathbf {M}_{k, \ell }$$ is obtained from $$\mathbf {M}_{k}$$ by negating all bits in each row i such that i’s binary expansion has a 1 at position $$\ell$$. Next, in a similar manner as described in the proof of Lemma 3, we construct a map $$\sigma _{\ell }$$ such that $$\sigma _{\ell }(\{i, j\})$$ is the smallest column index where rows i and j differ in $$\mathbf {M}_{k, \ell }$$. Now, we use these $$\log (m)$$ maps to construct $$\sigma _{k, \mathrm {left}}$$. For each pair of rows i and j, there is some position $$\ell$$ in i and j’s binary expansions where they differ. The smallest column index where rows i and j differ in $$\mathbf {M}_{k, \ell }$$ is exactly the same as the smallest column index where rows i and j are equal in $$\mathbf {M}_{k}$$. Hence, we make $$\sigma _{k, \mathrm {left}}(\{i, j\}) = \sigma _{\ell }(\{i, j\})$$. It takes $$O(m^2 \log (m))$$ time to construct $$\sigma _{k, \mathrm {left}}$$. The map $$\sigma _{k, \mathrm {right}}$$ can be constructed in a similar manner. In total, it takes $$O(d \cdot m^2 \log (m)) = O\left( \frac{n}{m} \cdot m^2 \log (m)\right) = O(m n \log (m))$$ time to construct all of the maps.    $$\square$$

### Theorem 1

Problem Open image in new window is solvable in time $${\widetilde{O}(mn)}$$ for m by n Boolean matrices and any $$a,b,c,d\in \{0,1\}$$.

### Proof

Consider the set of matrices Open image in new window . Every $$2\times 2$$ Boolean matrix $$\mathbf {A}$$ is similar to a Boolean matrix $$\mathbf {B} \in S$$ in the sense that $$\mathbf {B} = U(\mathbf {A})$$ for an operation U that combines a rotation with an optional negation of all bits. Further, for every Boolean matrix $$\mathbf {M}$$, the matrix $$\mathbf {M}$$ contains $$\mathbf {A}$$ as a submatrix if and only if $$U(\mathbf {M})$$ contains $$\mathbf {B}$$ as a submatrix. Applying Lemmas 123, and 4, we can determine if $$\mathbf {M}$$ has $$\mathbf {A}$$ as a submatrix in $${\widetilde{O}(mn)}$$ time.    $$\square$$

## 4 Searching for a Minimum 2-by-2 Submatrix of 1’s

First, we introduce an algorithm for Open image in new window . The technique we apply requires several preparatory steps: a characterization of Boolean matrices that do not have Open image in new window as a submatrix (Lemma 5), an algorithm solving Open image in new window whose complexity depends on the number of pairs of 1’s within the same rows (Lemma 6), and a fast algorithm solving Open image in new window approximately (Lemma 8). Then, we can apply a similar approach to solve Open image in new window .

### Lemma 5

Let $$\mathbf {A}$$ be an m by n Boolean matrix. Let $$a_i$$ denote the number of 1’s in the i-th row of $$\mathbf {A}$$. If $$\varSigma _{i=0}^m {a_i \atopwithdelims ()2} > {n \atopwithdelims ()2}$$, then $$\mathbf {A}$$ must contain a block whose corners are 1’s.

### Proof

$$\varSigma _{i=0}^m {a_i \atopwithdelims ()2}$$ is the size of the set $$T=\{(i,\{j,k\}) \mid j\ne k \,\wedge \, \mathbf {A}_{ij}=\mathbf {A}_{ik} = 1\}$$. If $$|T|>{n \atopwithdelims ()2}$$, then there are $$(i_1,\{j,k\}),(i_2,\{j,k\})\in T$$, where $$i_1\ne i_2$$. This means that rows $$i_1, i_2$$ and columns jk form a submatrix Open image in new window .    $$\square$$

### Lemma 6

Let $$\mathbf {M}$$ be an m by n Boolean matrix and $$T(\mathbf {M})=\{(i,\{j,k\}) \mid j\ne k \,\wedge \, \mathbf {M}_{i,j}=\mathbf {M}_{i,k}=1\}$$. There is an algorithm solving Open image in new window time.

### Proof

The algorithm uses a map $$\sigma$$ with keys $$\{j,k\}$$, where $$j\ne k$$ are column indexes. The value of $$\sigma (\{j,k\})$$ is a row index. Initially, the map is empty.

The input Boolean matrix $$\mathbf {M}$$ is processed row by row. In the i-th row, the following actions are performed for each $$(i,\{j,k\})\in T(\mathbf {M})$$. First, it is checked whether $$\sigma (\{j,k\})$$ is defined. If it is not, then $$\sigma (\{j,k\})$$ is set to i. Otherwise, the algorithm finds out whether the rectangle formed by rows i, $$\sigma (\{j,k\})$$ and columns j, k is the minimum one so far. Then, $$\sigma (\{j,k\})$$ is updated to be i.    $$\square$$

For convenience, for each Boolean matrix $$\mathbf {M}$$ considered now until the end of this section, assume that the number of rows and the number of columns of $$\mathbf {M}$$ are powers of 2. Since any matrix of a general size $$m\times n$$ can be extended to a $$2^{\lceil \log _2 m \rceil }\times 2^{\lceil \log _2 n \rceil }$$ matrix (with the added entries set to “undefined” value), the assumption will not have any impact on the generality and asymptotic time complexity of the presented algorithms.

For $$p\in \mathbb {N}^{+}$$, let $$\mathcal {S}(p)=\{2^i \mid i=1,2,\ldots ,\lfloor \log _2 p \rfloor \}$$ be the set of powers of two greater than 1 and not greater than p. Let $$\mathbf {M}$$ be an $$m\times n$$ Boolean matrix. For $$k\in \mathcal {S}(m)$$ and $$\ell \in \mathcal {S}(n)$$, let $$\mathcal {R}_{\mathbf {M}}(k,\ell )$$ denote the set of all $$k\times \ell$$ blocks of $$\mathbf {M}$$ whose top left corner is located in $$\mathbf {M}$$ at a position $$(1+a\cdot \frac{k}{2},1+b\cdot \frac{\ell }{2})$$ for some $$a,b\in \mathbb {N}$$. Let $$\mathcal {R}_{\mathbf {M}}=\bigcup _{k\in \mathcal {S}(m),\ell \in \mathcal {S}(n)} \mathcal {R}_{\mathbf {M}}(k,\ell )$$.

### Lemma 7

Let B be a p by q block of $$\mathbf {M}$$. There are powers of 2, denoted by k and $$\ell$$, such that $$k< 4p$$, $$\ell < 4q$$ and B is included in a block from $$\mathcal {R}_{\mathbf {M}}(k,\ell )$$.

### Proof

Assume $$B=\mathbf {M}[r,c;p,q]$$. Let $$k=\min \{m, 2\cdot 2^{\lceil \log _2 p \rceil }\}$$, $$\ell =\min \{n, 2\cdot 2^{\lceil \log _2 q \rceil }\}$$,
\begin{aligned} a&=\max \{x \mid x\in \mathbb {N}\,\wedge \, x\cdot \frac{k}{2}+k\le m \,\wedge \, 1 + x\cdot \frac{k}{2} \le r\}\,, \text { and} \end{aligned}
(2)
\begin{aligned} b&=\max \{y \mid y\in \mathbb {N}\,\wedge \, y\cdot \frac{\ell }{2}+\ell \le n \,\wedge \, 1 + y\cdot \frac{\ell }{2} \le c\}. \end{aligned}
(3)
Then, B is included in the block $$\mathbf {M}[1+a\cdot \frac{k}{2},1+b\cdot \frac{\ell }{2};k,\ell ]\in \mathcal {R}_{\mathbf {M}}(k,\ell )$$. This is proved as follows. The definition of a ensures that $$1+a\cdot \frac{k}{2} \le r$$. It is also needed to verify that
\begin{aligned} r+p-1 \le a\cdot \frac{k}{2} + k. \end{aligned}
(4)
Observe that this inequality is trivially fulfilled when $$a\cdot \frac{k}{2}+k = m$$. Hence, assume that
\begin{aligned} a\cdot \frac{k}{2}+k < m. \end{aligned}
(5)
Since m is divisible by $$\frac{k}{2}$$, inequality (5) implies that
\begin{aligned} (a+1)\cdot \frac{k}{2}+k \le m. \end{aligned}
(6)
It must thus hold that
\begin{aligned} 1+(a+1)\cdot \frac{k}{2}>r \end{aligned}
(7)
(otherwise the right-hand side of (2) is greater than a). Now, it suffices to combine (7) and $$p \le 2^{\lceil \log _2 p \rceil } = \frac{k}{2}$$ to obtain inequality (4).

Quite analogously, the definition of b ensures that $$1+b\cdot \frac{\ell }{2} \le c$$ and it can be proved that $$c+q-1 \le b \cdot \frac{\ell }{2} + \ell$$.    $$\square$$

Lemma 7 and the defined set of blocks $$\mathcal {R}_{\mathbf {M}}$$ provide a basis for designing a fast algorithm that solves Open image in new window approximately.

### Lemma 8

There is an algorithm that, for any m by n Boolean matrix $$\mathbf {M}$$, finds in $$O(mn\log m\log n)$$ time a block B of $$\mathbf {M}$$ such that Open image in new window and $$\mathrm {a}(B) < 16 \cdot \mathrm {a}(B_{\mathrm {min}})$$, where $$B_{\mathrm {min}}$$ is a minimum-area block of $$\mathbf {M}$$ fulfilling Open image in new window .

### Proof

The algorithm works as follows. For each block $$B\in \mathcal {R}_{\mathbf {M}}$$, it uses the algorithm of Lemma 1 to search inside B for a submatrix matching Open image in new window . Among all the detected submatrices, it outputs a minimal one.

By Lemma 7, $$B_{\mathrm {min}}$$ is a part of a block $$B'\in \mathcal {R}_{\mathbf {M}}$$ whose area is less than 16 times the area of $$B_{\mathrm {min}}$$, hence the algorithm of Lemma 1 running on $$B'$$ finds a block of $$\mathbf {M}$$ fulfilling the lemma requirement.

For each $$(k,\ell )\in \mathcal {S}(m)\times \mathcal {S}(n)$$, the sum of the areas of the blocks in $$\mathcal {R}_{\mathbf {M}}(k,\ell )$$ is $$O(mn)$$, hence all these blocks are processed by the algorithm of Lemma 1 cumulatively in O(mn) time. Finally, since $$|\mathcal {S}(m)\times \mathcal {S}(n)|=O(\log m \log n)$$, the proposed algorithm runs in $$O(mn\log m\log n)$$ time.    $$\square$$

### Proof

Let $$\mathbf {M}$$ be an input $$m\times n$$ Boolean matrix. Assume that the algorithm of Lemma 8 finds in $$\mathbf {M}$$ a block of an area S. The minimum area of a block of $$\mathbf {M}$$ containing Open image in new window as a submatrix is in the range $$(\frac{S}{16}, S]$$.

Let us identify a suitable subset of blocks in $$\mathcal {R}_{\mathbf {M}}$$ such that each minimum-area block containing Open image in new window as a submatrix is a part of a block from the subset. Define
$$\begin{array}{c} P=\left\{ (k,\ell ) \mid k\in \mathcal {S}(m) \,\wedge \, \ell =2^{\lceil \log _2 \frac{16\cdot S}{k} \rceil -1} \,\wedge \, \ell \le n \right\} , \text { and } \\ \mathcal {R}'_{\mathbf {M}} =\bigcup \nolimits _{(k,\ell )\in P} \mathcal {R}_{\mathbf {M}}(k,\ell ). \end{array}$$
The subset of blocks $$\mathcal {R}'_{\mathbf {M}}$$ satisfies the following properties.
Claim I: Every $$k\times \ell$$ block B in $$\mathcal {R}'_{M}$$ is of area less than $$16\cdot S$$. Indeed, we can derive
$$\mathrm {a}(B)=k\ell =k\cdot 2^{\lceil \log _2 \frac{16\cdot S}{k} \rceil -1}<k\cdot 2^{\log _2 \frac{16\cdot S}{k}}=16\cdot S .$$
Claim II: Every $$p\times q$$ block B of $$\mathbf {M}$$ such that $$\mathrm {a}(B)\le S$$ is a subset of a block in $$\mathcal {R}'_{\mathbf {M}}$$. This is proved as follows. By Lemma 7, there is a $$k\times \ell$$ block $$B_1$$ such that $$4p>k\in \mathcal {S}(m)$$, $$4q>\ell \in \mathcal {S}(n)$$, and B is included in $$B_1$$. It holds that $$k\ell <16\,\cdot \, pq\le 16\, \cdot \, S$$, and hence $$\ell < 2^{\lceil \log _2 \frac{16\cdot S}{k} \rceil }$$. Since l is a power of 2, we can write $$\ell \le 2^{\lceil \log _2 \frac{16\cdot S}{k} \rceil - 1}=\ell '$$, which implies that there is a block $$B_2\in \mathcal {R}_{\mathbf {M}}(k,\ell ')\subseteq \mathcal {R}'_{\mathbf {M}}$$ that includes $$B_1$$ as well as B.

Claim III: Every $$k\times \ell$$ block B in $$\mathcal {R}'_{\mathbf {M}}$$ fulfills Open image in new window (see Lemma 6 for the definition of T(B)). To show this, assume without loss of generality that $$k\ge \ell$$ and $$k\ge 256$$. Consider B to be split horizontally into 256 subblocks $$B_i$$ of size $$\frac{k}{256} \times \ell$$. Hence, $$\mathrm {a}(B_i)=\frac{k\ell }{256}$$. By Claim I, it holds that $$k\ell <16\,\cdot \, S$$, and hence $$\mathrm {a}(B_i)<\frac{16\cdot S}{256}=\frac{S}{16}$$. This means that $$B_i$$ does not contain Open image in new window as a submatrix, and hence Lemma 5 implies that $$|T(B_i)|=O(\ell ^2)$$. Finally, we derive $$|T(B)|=\sum _{i=1}^{256}|T(B_i)|=O(\ell ^2)$$.

Algorithm: We now have all prerequisites for describing the intended algorithm and deriving its time complexity. It works as follows. Call the algorithm of Lemma 8 to obtain S. For each $$B\in \mathcal {R}'_{\mathbf {M}}$$ of a size $$k\times \ell$$, call the algorithm of Lemma 6 either for B (if $$k\ge \ell$$) or Open image in new window ) to find a minimum-area block within B containing Open image in new window as a submatrix in time $$O((\min \{k,\ell \})^2)$$. A minimum-area block among all found blocks is returned as the final output.

For an ordered pair $$(k,\ell )\in P$$, the blocks of $$\mathcal {R}_{\mathbf {M}}(k,\ell )$$ are processed by the algorithm of Lemma 6 in cumulative time
$$O\left( \frac{mn}{k\ell } \cdot \left( (\min \{k,\ell \})^2 + k\ell \right) \right) =O\left( mn \right) .$$
Hence, assuming without loss of generality that $$m\le n$$, all the blocks of $$\mathcal {R}'_{\mathbf {M}}$$ are processed in total time
$$O\Biggl ( \sum _{(k,\ell )\in P} mn \Biggr )= O\left( mn \log m \right) .$$
Since the other stages of the algorithm run in $$\widetilde{O}(mn)$$ time, the stated time complexity has been proven.    $$\square$$

### Theorem 4

Open image in new window is solvable in time $${\widetilde{O}(mn)}$$ for m by n Boolean matrices and any $$a,b,c,d\in \{0,1\}$$.

## 5 Searching for a Maximum Matching Submatrix

We first prove that the problem Open image in new window is Triangle Finding-hard for any $$a,b,c,d\in \{0,1\}$$ (Theorem 5). Then, we show how Open image in new window can be solved using rectangular matrix multiplication (Theorem 6).

### Proof

By the same reasoning given in the proof of Theorem 1, it suffices to prove Triangle Finding-hardness for problems Open image in new window , Open image in new window , Open image in new window , and Open image in new window . We first present a fine-grained reduction from Triangle Finding to Open image in new window . We then adapt the reduction to the other three problems.

Let a graph $$G=(V,E)$$ be given. Let the set of vertices be $$V=\{v_i \mid i\in \{1,\ldots ,n\}\}$$. Let $$\mathbf {A}$$ be an $$n\times n$$ lower triangular Boolean matrix derived from the adjacency matrix of G as follows: $$\mathbf {A}_{i,j}=1$$ if and only if $$i>j$$ and $$\{v_i, v_j\}\in E$$. Observe that $$\{v_i, v_j, v_k\}$$, where $$i<j<k$$, is a triangle in G if and only if $$\mathbf {A}_{j,i}= \mathbf {A}_{k,i}= \mathbf {A}_{k,j}=1$$.

Define the matrix
$$\mathbf {M}_1= \left( \begin{array}{ccc} \mathbf {A}_1 &{} \mathbf {O} &{} \mathbf {I} \\ \mathbf {O} &{} \mathbf {O} &{} \mathbf {O} \\ \mathbf {A}_2 &{} \mathbf {O} &{} \mathbf {A}_3 \end{array} \right)$$
where $$\mathbf {O}$$ is the $$n\times n$$ zero matrix, $$\mathbf {I}$$ is the $$n\times n$$ identity matrix, and $$\mathbf {A}_1=\mathbf {A}_2=\mathbf {A}_3=\mathbf {A}$$. An example of a graph G and the induced matrices $$\mathbf {A}$$ and $$\mathbf {M}_1$$ is given in Fig. 1. Fig. 1.(a) A sample graph G on the set of vertices $$\{1,2,3,4\}$$ where the subset $$T=\{1,2,4\}$$ forms a triangle. (b) The lower triangular adjacency matrix of G. The framed entries indicate the existence of the triangle T. (c) Triangle Finding in G reduced to $$\mathsf {MAX}\left[ {\begin{matrix} 1 &{} 1\\ 1 &{} 1\end{matrix}}\right]$$.

Triangle Finding-hardness of Open image in new window is implied by the following property.

Claim: G has a triangle if and only if there is a block B of $$\mathbf {M}$$ such that Open image in new window and $$\mathrm {a}(B)\ge 3n^2$$.

To prove this, let us investigate which blocks can exist in $$\mathbf {M}_1$$ where all four corners are 1’s. It is easy to see that there are three types of such blocks:
• A block B included in one of the matrices $$\mathbf {A}_{i}$$, $$i\in \{1,2,3\}$$. Its area is not greater than $$n^2$$.

• A block B with two corners in $$\mathbf {A}_2$$ and the other two corners in either $$\mathbf {A}_1$$ or $$\mathbf {A}_3$$. Assume e.g. that the leftmost column of such a block is the k-th column of $$\mathbf {M}_1$$ and the rightmost column is in the $$\ell$$-th column of $$\mathbf {M}_1$$, where $$\ell >2n$$. The height of B is at most $$n-k$$ and it holds that $$\ell < 3n$$. Hence, $$\mathrm {a}(B)$$ is upper bounded by $$(\ell - k + 1)(n-k)\le (3n-k)(n-k)<3n^2$$.

• A block B that has one corner in each of the matrices $$\mathbf {A}_1$$, $$\mathbf {A}_2$$, $$\mathbf {A}_3$$, $$\mathbf {I}$$. Let the top left corner of B be in $$\mathbf {M}_1$$ at a position $$(k,\ell )$$, and the bottom right corner of B be at a position (st). Properties of the $$\mathbf {A}_i$$’s and $$\mathbf {I}$$ ensure that $$|\ell -k|<n$$, $$t=2n+k$$, and $$s>2n + \ell$$. Hence, $$\mathrm {a}(B)= (s-k+1)(t-\ell +1) >(2n+\ell -k) (2n+k-\ell )= 4n^2-(\ell -k)^2\ge 3n^2$$.

It is not difficult to verify that there is a one-to-one correspondence between blocks of the third type and triples $$i<j<k$$ such that $$\mathbf {A}_{j,i}= \mathbf {A}_{k,i}= \mathbf {A}_{k,j}=1$$, hence representing triangles $$\{v_i, v_j, v_k\}$$ of G.

To reduce Triangle Finding to Open image in new window , Open image in new window and Open image in new window , define the matrices $$\mathbf {M}_2$$, $$\mathbf {M}_3$$ and $$\mathbf {M}_4$$, respectively, as
$$\mathbf {M_2}= \left( \begin{array}{ccc} \mathbf {A}_1 &{} \mathbf {O} &{} \overline{\mathbf {I}} \\ \mathbf {O} &{} \mathbf {O} &{} \mathbf {O} \\ \mathbf {A}_2 &{} \mathbf {O} &{} \mathbf {A}_3 \end{array} \right) , \quad \mathbf {M_3}= \left( \begin{array}{ccc} \mathbf {A}_1 &{} \mathbf {O} &{} \overline{\mathbf {I}} \\ \mathbf {O} &{} \mathbf {O} &{} \mathbf {O} \\ \overline{\mathbf {A}}_2 &{} \mathbf {O} &{} \mathbf {A}_3 \end{array} \right) , \quad \mathbf {M_4}= \left( \begin{array}{ccc} \mathbf {A}_1 &{} \overline{\mathbf {O}} &{} \overline{\mathbf {I}} \\ \mathbf {O} &{} \mathbf {O} &{} \mathbf {O} \\ \mathbf {A}_2 &{} \mathbf {O} &{} \overline{\mathbf {A}}_3 \end{array} \right) .$$
Recall that $$\overline{\mathbf {C}}$$ denotes the matrix created from a Boolean matrix $$\mathbf {C}$$ by negating its entries. Figure 2 shows the matrices $$\mathbf {M}_3$$ and $$\mathbf {M}_4$$ constructed for the graph G from Fig. 1.

One can again verify that G has a triangle if and only if each of the constructed matrices contains a block B such that $$\mathrm {a}(B) \ge 3n^2$$ and $$\varkappa (B)$$ matches the desired $$2\times 2$$ matrix.    $$\square$$ Fig. 2. Triangle Finding reduced to (a) $$\mathsf {MAX}\left[ {\begin{matrix} 1 &{} 0\\ 0 &{} 1\end{matrix}}\right]$$ and (b) $$\mathsf {MAX}\left[ {\begin{matrix} 1 &{} 0\\ 1 &{} 0\end{matrix}}\right]$$, respectively.

Now, let us focus on approaches for solving the maximization problems. Given an $$m\times n$$ Boolean matrix $$\mathbf {M}$$ and $$p,q\in \{0,1\}$$, let $$\sigma ^{\mathbf {M}}_{p,q}$$ denote the map whose keys are pairs (ij), where ij are row indexes of $$\mathbf {M}$$ such that $$i<j$$. For a key (ij), the map value is defined as the smallest column index c such that $$\mathbf {M}_{i,c}=p$$ and $$\mathbf {M}_{j,c}=q$$.

Let $$\mathbf {M}'$$ denote the matrix $$\mathbf {M}$$ flipped left to right. It is easy to see that every problem Open image in new window , where $$a,b,c,d\in \{0,1\}$$, can be solved based on the maps $$\sigma ^{\mathbf {M}}_{a,c}$$ and $$\sigma ^{\mathbf {M}'}_{b,d}$$. Conversely, this also shows that these maps are Triangle Finding-hard to build.

The maps can be computed based on a minimum witness for Boolean matrix multiplication , and hence the time complexity of solving Open image in new window in this way coincides with the time complexity in  for the minimum witness problem.

### Lemma 9

There is an algorithm that, for any m by n Boolean matrix $$\mathbf {M}$$ where $$m\le n$$, and any $$p,q\in \{0,1\}$$, builds $$\sigma ^{\mathbf {M}}_{p,q}$$ in time $$O\left( mn\cdot m^{0.5302}\right)$$.

### Theorem 6

For any $$a,b,c,d\in \{0,1\}$$, there is an algorithm solving Open image in new window in time $$O\left( mn\cdot ({\min \{m,n\}})^{0.5302}\right)$$ for m by n Boolean matrices.

## 6 Conclusion

We investigated the complexity of Four Corner Problems over Boolean matrices. A Four Corner Problem is concerned with searching for a given $$2\times 2$$ submatrix in a given Boolean matrix. We demonstrated that minimum-area Four Corner Problems over Boolean matrices are solvable in nearly linear time in the input matrix area (Theorem 4) and maximum-area Four Corner Problems over Boolean matrices are Triangle Finding-hard (Theorem 5). The algorithms that we presented for the former problems might lead to efficient implementations, while the results achieved for the latter problems give rise to an interesting unresolved theoretical question: Are the maximum-area Four Corner Problems harder than the Triangle Finding problem? Going further, we suggest that a possible future direction is to investigate the complexity of Four Corner Problems over matrices with entries from larger alphabets.

## References

1. 1.
Abboud, A., Backurs, A., Williams, V.V.: If the current clique algorithms are optimal, so is Valiant’s parser. In: Guruswami, V. (ed.) IEEE 56th Annual Symposium on Foundations of Computer Science (FOCS 2015), pp. 98–117. IEEE Computer Society (2015)Google Scholar
2. 2.
Aho, A.V.: Algorithms for finding patterns in strings. In: van Leeuwen, J. (ed.) Algorithms and Complexity, Handbook of Theoretical Computer Science, vol. A, pp. 255–300. The MIT Press, Cambridge (1990)Google Scholar
3. 3.
Bentley, J.L., Haken, D., Saxe, J.B.: A general method for solving divide-and-conquer recurrences. SIGACT News 12(3), 36–44 (1980)
4. 4.
Cohen, K., Yuster, R.: On minimum witnesses for boolean matrix multiplication. Algorithmica 69(2), 431–442 (2014)
5. 5.
Giammarresi, D., Restivo, A.: Two-dimensional languages. In: Rozenberg, G., Salomaa, A. (eds.) Handbook of Formal Languages, pp. 215–267. Springer, Heidelberg (1997).
6. 6.
Itai, A., Rodeh, M.: Finding a minimum circuit in a graph. In: 9th Annual ACM Symposium on Theory of Computing (STOC 1977), pp. 1–10. ACM, New York (1977)Google Scholar
7. 7.
Lee, L.: Fast context-free grammar parsing requires fast boolean matrix multiplication. J. ACM 49(1), 1–15 (2002)
8. 8.
Mráz, F., Průša, D., Wehar, M.: Two-dimensional pattern matching against basic picture languages. In: Hospodár, M., Jirásková, G. (eds.) CIAA 2019. LNCS, vol. 11601, pp. 209–221. Springer, Cham (2019).
9. 9.
de Oliveira Oliveira, M., Wehar, M.: Intersection non-emptiness and hardness within polynomial time. In: Hoshi, M., Seki, S. (eds.) DLT 2018. LNCS, vol. 11088, pp. 282–290. Springer, Cham (2018).
10. 10.
Peeters, R.: The maximum edge biclique problem is NP-complete. Discret. Appl. Math. 131(3), 651–654 (2003)
11. 11.
Potechin, A., Shallit, J.: Lengths of words accepted by nondeterministic finite automata. CoRR abs/1802.04708 (2018)Google Scholar
12. 12.
Salomaa, A.: Jewels of Formal Language Theory. Computer Science Press, Rockville (1981)
13. 13.
Sun, X., Nobel, A.B.: On the size and recovery of submatrices of ones in a random binary matrix. J. Mach. Learn. Res. 9(Nov), 2431–2453 (2008)
14. 14.
Williams, V.V.: Multiplying matrices faster than Coppersmith-Winograd. In: 44th Annual ACM Symposium on Theory of Computing (STOC 2012), pp. 887–898. ACM, New York (2012)Google Scholar
15. 15.
Williams, V.V.: Hardness of easy problems: basing hardness on popular conjectures such as the strong exponential time hypothesis (invited talk). In: Husfeldt, T., Kanj, I.A. (eds.) 10th International Symposium on Parameterized and Exact Computation (IPEC 2015). LIPIcs, vol. 43, pp. 17–29. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2015)Google Scholar

## Copyright information

© Springer Nature Switzerland AG 2020

## Authors and Affiliations

1. 1.Czech Technical UniversityPragueCzech Republic
2. 2.Swarthmore CollegeSwarthmoreUSA