As part of the long history of research in robotic minimalism, a recent thread has devised methods that aim to automatically reduce and reason about robots’ resource footprints. That work fits within the larger context of methodologies and formalisms for tackling robot design problems, being useful for designing robots subject to resource limits [censi17co, pervan2018low, saberifar18hardness]. But, more fundamentally, the associated algorithms also help identify the information requirements of certain robot tasks. The methods have the potential to provide insights about the interplay of sensing, state, and actuation within the context of particular tasks. One class of objects where the problem of resource minimization can be clearly posed is in the case of combinatorial filters [lavalle10sensing]. These are discrete variants of the probabilistic estimators and recursive Bayesian filters widely adopted for practical use in robots. Combinatorial filters process a stream of discrete sensor inputs and integrate information via transitions between states. The natural question, studied in [o2017concise], then is: How few states are needed to realize specified filter functionality? In this paper, we define a more general class of filters and ask the same question.
We start with a simple motivating scenario where the generalization we introduce is exactly what is needed. Figure 1 shows a driving drone patrolling a house.111Such bizarre chimera robots are not our invention, e.g., see the Syma X9 Flying Car. The drone can either drive or fly, but its choice must satisfy navigability constraints. Its wheels can’t drive on grass (F and Y) nor in the pantry (P), owing to spills. Spinning propellers, on the other hand, will disturb the tranquil bedroom (B). Otherwise, either means may be chosen (see inset map pair marking regions in brown/blue for driving/flying). The robot is equipped with an ambient light sensor that is useful because the living room and kitchen are lighter than the bedroom and pantry, while the outdoors is lightest of all.
We wish to construct a filter for the drone to determine how to navigate, with the inputs being brightness changes, and the filter’s output providing some valid mode of locomotion. It is easy to give a valid filter by using one state for each location — this naïve filter is depicted in Figure 1(a). In the living room and kitchen, the filter lists two outputs since both modes are applicable there (both locations are covered by the brown and blue choices). Now consider the question of the smallest filter. If we opt to fly in both the living room and kitchen, then the smallest filter is shown in Figure 1(b) with states. But when choosing to fly in the living room but drive in the kitchen, the minimal filter requires only states (in Figure 1(c)).
This last filter is also the globally minimal filter. The crux is that states with multiple valid outputs introduce a new degree of freedom which influences the size of the minimal filter. These arise, for instance, whenever there are ‘don’t-care’ options. The flexibility of such states must be retained to truly minimize the number of states.
2 Preliminary Definitions and Problem Description
To begin, we define the filter minimization problem in the most general form, where the input is allowed to be non-deterministic and each state may have multiple outputs. This is captured by the procrustean filter (p-filter) formalism [setlabelrss].
2.1 P-filters and their minimization
We firstly introduce the notion of p-filter:
Definition 1 (procrustean filter [setlabelrss]).
A procrustean filter, p-filter or filter for short, is a tuple with:
a finite set of states , a non-empty initial set of states , and a set of possible observations ,
a transition function ,
a set , which we call the output space, and
an output function .
The states, initial states and observations for p-filter will be denoted , and . Without loss of generality, we will also treat a p-filter as a graph with states as its vertices and transitions as directed edges.
A sequence of observations can be traced on the p-filter:
Definition 2 (reached).
Given any p-filter , a sequence of observations , and states , we say that is a state reached by some sequence from in (or reaches from ), if there exists a sequence of states in , such that . We denote the set of all states reached by from state in as . For simplicity, we use , without the subscript, to denote the set of all states reached when starting from any state in , i.e., . Note that holds only when sequence crashes in starting from .
For convenience, we will denote the set of sequences reaching state from some initial state by .
Definition 3 (extensions, executions and interaction language).
An extension of a state on a p-filter is a finite sequence of observations that does not crash when traced from , i.e., . An extension of any initial state is also called an execution or a string on . The set of all extensions of a state on is called the extensions of , written as . The extensions of all initial vertices on is also called the interaction language (or, briefly, just language) of , and is written .
Note in particular that the empty string belongs to the extensions of any state on the filter, and belongs to the language of the filter as well.
Definition 4 (filter output).
Given any p-filter , a string and an output , we say that is a filter output with input string , if is an output from the state reached by , i.e., . We denote the set of all filter outputs for string as .
Specifically, for the empty string , we have .
Definition 5 (output simulating).
Given any p-filter , a p-filter output simulates if , and .
Plainly in words: for one p-filter to output simulate another, it has to generate some of the outputs of the other, for every string the other admits.
We are interested in practicable p-filters with deterministic behavior:
Definition 6 (deterministic).
A p-filter is deterministic or state-determined, if , and for every with , .
Any non-deterministic p-filter can be state-determinized, denoted , following Algorithm in [saberifar18pgraph].
Then the p-filter minimization problem can be formalized as follows:
Problem: P-filter Minimization (pfm) Input: A deterministic p-filter . Output: A deterministic p-filter with fewest states, such that output simulates .
‘pf’ denotes that the input is a p-filter, and ‘m’ denotes that we are interested in finding a deterministic minimal filter as a solution.
2.2 Complexity of p-filter minimization problems
Definition 7 (state single-outputting and multi-outputting).
A p-filter is state single-outputting or single-outputting for short, if only maps to singletons, i.e., . Otherwise, we say that is multi-outputting.
Depending on whether the state in the input p-filter (pf) is single-outputting (so) or multi-outputting (mo), we further categorize the problem pfm into the following problems: so-fm and mo-fm.
The filter minimization problem fm of [o2017concise] is so-fm, and so-fm is NP-Complete (Theorem in [o2017concise]).
mo-fm is NP-Complete.
Firstly, so-fm is a special case of mo-fm problems. These mo-fm problems are at least as hard as so-fm. Hence, mo-fm are in NP-hard. On the other hand, a solution for mo-fm can be verified in polynomial time. (Change the equality check on line 7 of Algorithm 1 in [o2017concise] to a subset check.) Therefore, mo-fm is NP-Complete. ∎
3 Related work: Prior filter minimization ideas (so-fm)
Several elements come together in this section and Figure 3 attempts to show the inter-relationships graphically. The original question of minimizing state in filtering is first alluded to by LaValle [lavalle10sensing] as an open problem, who suggested that it is ‘similar to Nerode equivalence classes’. The problem of filter reduction, i.e., so-fm in our terms, was formalized and shown to differ in complexity class from the automata problem in [o2017concise]
. That paper also proposed a heuristic algorithm, which served as a starting point for subsequent work. The heuristic algorithm uses conflict graphs to designate which vertices cannot be merged (are conflicting). It starts with a conflict relation where two vertices are in conflict when they have different outputs, then iteratively refines the conflict relation. Refinement has two steps: () introducing edges: two vertices are determined to be conflicting or not via a graph coloring subroutine, and edges are added between conflicting vertices; () propagating conflicts upstream: filter states are marked as conflicted when they transition to conflicted states under the same observation. An example input filter, shown in Figure 3(a), is reduced by following this procedure, which is depicted step-by-step in Figures 3(b)–3(e).
A conjecture in [o2017concise] was that this algorithm is guaranteed to find a minimal filter if the graph coloring subroutine gives a minimal coloring. (Put another way: the inexactness in arriving at a minimal filter can be traced to the graph coloring giving a suboptimal result.) But this conjecture was later proved to be false by Saberifar et al. [saberifar2017combinatorial]. They show an instance where there exist multiple distinct optimal solutions to the graph coloring subproblem, only a strict subset of which lead to the minimal filter. One might naturally ask, and indeed they do ask, the question of whether some optimal coloring is sufficient to arrive at the optimal filter. Following along these lines (see §7.3 in [saberifar2017combinatorial]), one might sharpen the original conjecture of [o2017concise] to give the following statement:
In the step-wise conflict refinement procedure of O’Kane and Shell’s heuristic algorithm [o2017concise], some optimal coloring is sufficient to guarantee a minimal filter for so-fm.
Idea 1 is false.
This is simply shown with a counterexample. Consider the problem of minimizing the input filter shown in Figure 3(a), the heuristic algorithm will first initialize the colors of the vertices with their output. Next, it identifies the vertices that disagree on the outputs of extensions with length as shown in Figure 3(b), and then refines the colors of the vertices as shown in Figure 3(c) following a minimal graph coloring solution on the conflict graph. Then it further identifies the conflicts on extensions with length , via the conflict graph shown in Figure 3(d), and the vertex colors are further refined as shown in Figure 3(e). Now, no further conflicts can be found. A filter, with states, is then obtained by merging the states with the same color. However, there exists a minimal filter, with states, shown in Figure 3(f), that can be found by choosing coloring solution for the conflict graph shown in Figure 3(b). That coloring is suboptimal. ∎
This appears to indicate a sort of local optimum arising via sub-problems associated with incremental (or stepwise) reduction. Since optimal colorings for individual steps are seen to be insufficient to guarantee a minimal filter, to find a minimal filter, we would have to enumerate all colorings (suboptimal or otherwise) at each iteration. That is, however, essentially a brute force algorithm. A more informed approach is to compute implications of conflicts more globally, in a way that doesn’t depend on earlier merger decisions. In our algorithm, rather than tracking vertices which are in conflict, we introduce a new notion of compatibility between vertices that may be merged. This notion differs from the one recursively defined in [rahmani2018relationship], as our compatibility relation is computed in one fell swoop, before making any decisions to reduce the filter:
Definition 11 (compatibility).
Let be a deterministic p-filter. We say a pair of vertices are compatible, denoted , if they agree on the outputs of all their extensions, i.e., . A mutually compatible set consists of vertices where all pairs are compatible.
Via this notion of compatibility, we get an undirected compatibility graph:
Definition 12 (compatibility graph).
Given a deterministic filter , its compatibility graph is an unlabeled undirected graph constructed by creating a vertex associated with each state in , and building an edge between the pair of vertices associated with two compatible states.
This compatibility graph can be constructed in polynomial time. As every filter state and associated compatibility graph state are one-to-one, to simplify notation we’ll use the same symbol for both and context to resolve any ambiguity.
The second idea relates to the type of the output one obtains after merging states that are compatible or not in conflict. Importantly, the filter minimization problem so-fm requires one to give a minimal filter which is deterministic.
By merging the states that are compatible, the heuristic algorithm always produces a deterministic p-filter.
The definition of the reduction problems within [o2017concise, saberifar2017combinatorial, rahmani2018relationship] are specified so as to require that the output obtained be deterministic. But this postcondition is never shown or formally established. In fact, it does not always hold.
Idea 2 is false.
We show that the existing algorithm may produce a non-deterministic filter, which does not output simulate the input filter, and is thus not a valid solution. Consider the filter shown in Figure 4(a) as an input. The vertices with the same color are compatible with each other, with the following exception for , and . Vertex is compatible with , vertex is compatible with , but is not compatible with . The minimal filter found by the existing algorithm is shown in Figure 4(b). The string suffices to shows the non-determinism, reaching both orange and cyan vertices. It fails to output simulate the input because cyan should never be produced. ∎
If determinism can’t be taken for granted, we might constrain the output to ensure the result will be a deterministic filter. To do this, we introduce a zipper constraint when merging compatible states:
Definition 14 (zipper constraint).
In the compatibility graph of filter , if there exists a set of mutually compatible states , then they can only be selected to be merged if they always transition to a set of states that are also selected to be merged. For any sets of mutually compatible states and some observation , we create a zipper constraint expressed as a pair if . We denote the set of all zipper constraints on compatibility graph by .
The zipper constraints for the input filter shown in Figure 4(a) consist of and . Constraint is interpreted as: if and are selected for merger, then and (reached under ) should also be merged. We call it a zipper constraint owing to the resemblance to a zipper fastener: merger of two earlier states, merges (i.e., pulls together) later states. In the worst case, the number of zipper constraints can be exponential in the size of the input filter.
A third idea is used by O’Kane and Shell’s heuristic algorithm and is also stated, rather more explicitly, by Saberifar et al. (see Lemma 5 in [saberifar2017combinatorial] and Lemma in [rahmani2018relationship]). It indicates that we can obtain a minimal filter via merging operations on the compatible states.
Some equivalence relation induces a minimal filter.
Before examining this, we rigorously define the notion of an induced relation:
Definition 15 (induced relation).
Given a filter and another filter , if output simulates , then induces a relation , where if and only if there exists a vertex such that and . We also say that and corresponds to state .
Idea 3 is false.
It is enough to scrutinize the previous counterexample closely. The minimization problem so-fm for the input filter shown in Figure 4(a), is shown in Figure 5(a). It is obtained by () splitting vertex into an upper part reached by and a lower part reached by , () merging the upper part of with , the lower part of with , and other vertices with those of the same color. This does not induce an equivalence relation, since corresponds to two different vertices in the minimal filter. ∎
In light of this, for some filter minimization problems, there may be no quotient operation that produces a minimal filter and an exact algorithm for minimizing filters requires that we look beyond equivalence relations.
Some strings that reach a single state in an input filter may reach multiple states in a minimal p-filter (e.g., and on Figure 4(a) and 5(a)). On the other hand, strings that reach different states in the input p-filter may reach the same state in the minimal filter (e.g., and on those same filters). We say that a state from the input filter corresponds to a state in the minimal filter if there exists some string reaching both of them and, hence, this correspondence is many-to-many. An important observation is this: for each state in some hypothetical minimal filter, suppose we collect all those states in the input filter that correspond with . When we examine the associated states in the compatibility graph for that collection, they must all form a clique. Were it not so, the minimal filter could have more than one output associated for some strings owing to non-determinism. But this causes it to fail to output simulate the input p-filter.
After firming up and developing these intuitions, the next section introduces the concept of a clique cover which enables representation of a search space that includes relations more general than equivalence relations. Based on this new representation, we propose a graph problem use of zipper constraints, and prove it to be equivalent to filter minimization.
4 A new graph problem that is equivalent to so-fm
By building the correspondence between the input p-filter in Figure 4(a) and the minimal result in Figure 5(a), one obtains the set of cliques in the compatibility graph shown visually in Figure 5(b). Like previous approaches that make state merges by analyzing the compatibility graph, we interpret each clique as a set of states to be merged into one state in the minimal filter. The clique containing and in Figure 5(b) gives rise to in the minimal filter in Figure 5(a) (and and yields , and so on). However, states may further be shared across multiple cliques. We observe that was merged with in the minimal filter to give , and also merged with to give . The former has an incoming edge labeled with an , while the latter has an incoming edge labeled . The vertex , being shared by multiple cliques, is split into different copies and each copy merged separately.
Generalizing this observation, we turn to searching for the smallest set of cliques that cover all vertices in the compatibility graph. Further, to guarantee that the set of cliques induces a deterministic filter, we must ensure they respect the zipper constraints. It will turn out that a solution of this new constrained minimum clique cover problem always induces a minimal filter for so-fm, and a minimal filter for so-fm always induces a solution for this new problem. The final step is to reduce any mcczc problem to a SAT instance, and leverage SAT solvers to find a minimal filter for so-fm.
4.1 A new minimum clique cover problem
To begin, we extend the preceding argument from the compatibility clique associated to single state , over to all the states in the minimal filter. This leads one to observe that the collection of all cliques for each state in the minimal p-filter forms a clique cover:
Definition 17 (induced clique cover).
Given a p-filter and another p-filter , we say that a vertex in corresponds to a vertex in if . Then, denoting the subset of vertices of corresponding to in with , we form the collection of all such sets, , for where . When output simulates , then the form cliques in the compatibility graph . Further, when this collection of sets covers all vertices in , i.e., , we say that is an induced clique cover.
It is worth repeating: the size of filter (in terms of number of vertices) and the size of the induced clique cover (number of sets) are equal.
Without loss of generality, here and henceforth we only consider the p-filter with all vertices reachable from the initial state, since the ones that can never be reached will be deleted during filter minimization anyway.
Each clique of the clique cover represents the states that can be potentially merged. But the zipper constraint, to enforce determinism, requires that the set of vertices to be merged should always transition under the same observation to the ones that can also be merged. Hence, the zipper constraints (of Definition 14) can be evaluated across whole covers:
A clique cover satisfies the set of zipper constraints , when for every zipper constraint , if there exist a clique , such that , then there exists another clique such that .
Now, we have our new graph problem, mcczc.
Problem: Minimum clique cover with zipper constraints (mcczc) Input: A compatibility graph , a set of zipper constraints Zip. Output: A minimal cardinality clique cover of satisfying Zip.
4.2 From minimal clique covers to filters
Given a minimal cover that solves mcczc, we construct a filter by merging the states in the same clique and choosing edges between these cliques appropriately:
Definition 19 (induced filter).
Given a clique cover on the compatibility graph of deterministic p-filter , if satisfies all the zipper constraints in , then it induces a filter by treating cliques as vertices:
Create a new filter with vertices, where each vertex is associated with a clique in ;
Add each vertex in to iff the associated clique contains an initial state in ;
The output of every in , with associated clique , is the set of common outputs for all states in , i.e., .
For any pair of and in , inherit all transitions between states in the cliques of and , i.e., .
For each vertex in with multiple outgoing edges labeled , keep only the single edge to the vertex , such that all vertices transition to under are included in . This edge must exist since satisfies all .
The size of the cover (in terms of number of sets) and size of the induced filter (number of vertices) are equal.
Notice that the earlier intuition is mirrored by this formal construction: states belonging to the same clique are merged when constructing the induced filter; states in multiple cliques are split when we make the edge choice in step 5. Next, we establish that the induced filter indeed supplies the goods:
lemmadeterministicouputsimulating Given any clique cover on the compatibility graph of a deterministic p-filter , if satisfies the zipper constraints and covers all vertices of , then the induced filter is deterministic and output simulates .
For any string , let the vertex reached by string in be . Then must belong at least one clique in , where all vertices in this clique can be viewed as merged into a new vertex in . Hence, should reach at least one vertex in and this vertex yield the same output . Since satisfies the zipper constraints , the induced filter must be deterministic since there is no vertex that has any non-deterministic outgoing edges bearing the same label. Because is deterministic, , reaches a single vertex in . In addition, this vertex in shares the same output . Therefore, also output simulates . ∎
A surprising aspect of the preceding is how the zipper constraints —which are imposed to ensure that a deterministic filter is produced— enforce output-simulating behavior, albeit indirectly, too. One might have expected that this separate property would demand a second type of constraint, but this is not so.
On the other hand, needing to satisfy the zipper constraints of the input filter does not entail the imposition of any gratuitous requirements:
lemmacliqueaux Given any deterministic p-filters and , if output simulates , then the induced clique cover on the compatibility graph of satisfies all zipper constraints in .
Suppose that does not satisfy all zipper constraints in . Specifically, let be the zipper constraint that is violated, where each vertex in transitions from some vertex in under observation . Then there exists a clique , such that , but there is no clique that . According to the construction of the induced cover, there exists a vertex , such that corresponds to . For any vertex , let . Then is also a string in both and since transitions to some vertex in under observation in and is output simulating . Let . (It is a singleton set as is deterministic.) Hence corresponds to on common string . Similarly, each vertex corresponds to on some string ending with . Let the clique corresponding to be , and we have . But that is a contradiction. ∎
4.3 Correspondence of mcczc and so-fm solutions
To establish the equivalence between mcczc and so-fm, we will show that the induced filter from the solution of mcczc is a minimal filter for so-fm, and the induced clique cover from a minimal filter is a solution for mcczc.
Minimal clique covers for mcczc induce minimal filters for so-fm.
Given any minimal clique cover as a solution for problem mcczc with input p-filter , construct p-filter . Since satisfies the zipper constraints , is deterministic and output simulates according to Lemma 19. To show that is a minimal deterministic filter for so-fm, suppose the contrary. Then there exists a minimal deterministic filter with fewer states, i.e., . Hence, induces a clique cover with fewer cliques than . Since is deterministic, satisfies all via Lemma 19. But then satisfies all the requirements to be a solution for mcczc, and has fewer cliques than , contradicting the assumption. ∎
A minimal filter for so-fm with input induces a clique cover that solves mcczc with compatibility graph and zipper constraints of .
Given minimal filter as a solution for so-fm with input filter , we can construct a clique cover from the minimal filter. For this cover to be a solution for mcczc with compatibility graph and zipper constraints , first, it must satisfy all constraints in . Lemma 19 affirms this fact. Second, we must show it to be minimal among all the covers satisfying those constraints. Supposing is not a minimal, there must exist a clique cover with satisfying . Then, consider the induced filter . Since satisfies all the zipper constraints , is deterministic and will output simulate (Lemma 19). But , contravening the fact that is a minimal filter. Hence is minimal. ∎
Together, they establish the theorem.
The solution for mcczc with compatibility graph and zipper constraints of a filter induces a solution for so-fm with input filter , and vice versa.
Having established this correspondence, any so-fm can be solved by tackling its associated mcczc problem, the latter problem being cast as a SAT instance and solved via a solver (see Section 6 for further details).
5 Generalizing to mo-fm
Finally, we generalize the previous algorithm to multi-outputting filters. In mo-fm problems, the input p-filter is deterministic but states in the p-filter may have multiple outputs. One straightforward if unsophisticated approach is to enumerate all filters under different output choices for the states with multiple outputs, and then solve every one the resulting deterministic single-outputting filters as instances of so-fm. The filter with the fewest states among all the minimizers could then be treated as a minimal one for the mo-fm problem.
Unfortunately, this is too simplistic. Prematurely committing to an output choice is detrimental. Consider the input filter shown in Figure 6(a), it has two multi-outputting states ( and ). If we choose to have both and give the same output, the so-fm minimal filter, shown in Figure 6(b), has states. If we choose distinct outputs for and , the so-fm minimal filter, shown in Figure 6(c), now has states. But neither is the minimal mo-fm filter. The true minimizer appears in Figure 6(d), with only states. It is obtained by splitting both and into two copies, each copy giving a different output.
The idea underlying a correct approach is that output choices should be made together with the splitting and merging operations during filter minimization. Multi-outputting vertices may introduce additional split operations, but these split operations can still be treated via clique covers on the compatibility graph. This requires that we define a new compatibility relationship—it is only slightly more general than Definition 11:
Definition 23 (group compatibility).
Let be a deterministic p-filter. We say that the set of states are group compatible, if there is a common output on all their extensions, i.e.,
(The preceding exploits the subtle fact, in Definition 3, that when tracing from crashes in .) With this definition, the compatibility graph must be generalized suitably:
Definition 24 (compatibility simplicial complex).
Given a deterministic multi-output filter , its compatibility simplicial complex is a collection of simplices, where each simplex is a set of group compatible vertices in .
The zipper constraints are generalized too, replacing mutual compatibility with group compatible states:
Definition 25 (generalized zipper constraint).
In the compatibility simplicial complex of filter , if there exists a set of group compatible states , then they can only be selected to be merged if they always transition to a set of states that are also selected to be merged. For any sets of group compatible states and some observation , we create a generalized zipper constraint expressed as a pair if for some .
The information formerly encoded in cliques of edges is now within simplicies; the minimum clique cover on the compatibility graph, thus, becomes a minimum simplex cover on the compatibility simplicial complex. Hence, the mcczc problem is generalized as follows:
Problem: Generalized Minimum Cover with zipper constraints (gmczc) Input: A compatibility simplicial complex , a set of generalized zipper constraints Zip. Output: A minimal cardinality simplex cover of satisfying Zip.
6 Reduction from mcczc and gmczc to SAT
Prior algorithms for filter minimization used multiple stages to find a set of vertices to merge, solving a graph coloring problem repeatedly as more constraints are identified. In contrast, an interesting aspect of mcczc and its generalized version is that it tackles filter minimization as a constrained optimization problem with all constraints established upfront. Thus the clique (simplex) perspective gives an optimization problem which is tangible and easy to visualize. Still, being a new invention, there are no solvers readily available for direct use. But reducing mcczc (gmczc) to Boolean satisfaction (SAT) enables the use of state-of-the-art solvers to find minimum cliques (simplices).
Since the edges that make up the cliques can be encoded via 1-simplices, in what follows we give the treatment of gmczc.
Next, we follow the standard practice for treating optimization problems via a decision problem oracle, viz. define a -gmczc problem, asking for the existence of a cover with size satisfying the zipper constraints; one then decreases to find the minimum cover. Each -gmczc problem can be written as a logic formula in conjunctive normal form (CNF), polynomial in the size of the -gmczc instance, and solved.
Firstly, the -gmczc problem is formalized as follows:
Problem: Minimum simplex cover with zipper constraints (-gmczc) Input: A compatibility simplicial complex , a set of zipper constraints Zip, maximum number of simplices Output: A simplex cover with no more than simplices on that satisfies all zipper constraints in Zip
Then, we represent the simplex cover as choices to assign each vertex in the compatibility simplicial complex to a simplex , with . To represent these choices, we create a boolean variable to represent the fact that is assigned to simplex , and its negation to represent its inverse. The simplex cover is captured by such variables.
A simplex cover for problem -gmczc should guarantee that each vertex in is assigned to at least one clique, i.e.,
For simplicity, we will use “” and “” for logic or, “” and “” for logic and, “” for logic equivalence.
We denote each simplex in the compatibility simplicial complex as a set. Let the set of simplicies for compatibility simplicial complex be , which is a collection of sets. For any set that does not form a simplex in , i.e., , they should never be assigned to the same simplex:
To satisfy each zipper constraint (with and ), if is assigned to a simplex (), then there must exist another simplex (), such that all vertices in are assigned to simplex , i.e.,
Let and , then
For each , we have
To solve -gmczc, we need to leverage off-the-shelf SAT solvers to find an assignment of the variables such that formulas in (1), (2) and (3) are satisfied. For any vertex in the compatibility graph, we create variables. For each zipper constraint, we need to create variables. Suppose that there are vertices in the input filter and zipper constraints. Then, we need variables. Similarly, (1) gives us clause for each vertex, (2) gives us at most clauses in total, (3) gives for each zipper constraint. Hence, the number of clauses to solve a -gmczc is .
To find the minimum solution for gmczc, we will solve -gmczc with equals the number of states in the input filter, and the decrease until we cannot find a solution for -gmczc (i.e., the SAT solver times out).
7 Experimental results
The method described was implemented by leveraging a Python implementation of 2018 SAT Competition winner, MapleLCMDistChronoBT [nadel2018maple, imms-sat18]. Their solver will return a solution if it solves the -mcczc problem before timing out. If it finds a satisfying assignment, we decrease , and try again. Once no satisfying assignment can be found, we construct a minimal filter from the solution with minimum .
First, as a sanity check, we examined the minimization problems for the inputs shown in Figure 1(a), Figure 4(a) and Figure 6(a). Our implementation takes , and , respectively, to reduce those filters. All filters found have exactly the minimum number of states, as reported above.
Next, designed a test where we could examine scalability aspects of the method. We generalized the input filter shown in Figure 6(a) to produce a family of instances, each described by two parameters: the -input filter has rows and states at each row. (Figure 6(a) is the version.) Just like the original filter, the states in the same row share the same color, but the states in different rows have different colors. The initial state outputs a single unique color; the last two states, and , output any of the colors. In this example, the states in the same row, together with and , are compatible with each other.
The time to construct the zipper constraints, prepare the formulas and the time used by the SAT solver were recorded. We also measured the number of zipper constraints found by our algorithm. Figure 8 summarizes the data for . The result shows that about of the time is used in preparing the logical formula, with the SAT solver and construction of the zipper constraints accounting for only a very small fraction of time.
In light of this, to further dissect the computational costs of different phases, we tested a robot in the square grid environment shown in Figure 8(a). The robot starts from the bottom left cell, and moves to some adjacent cell at each time step. The robot only receives observations indicating its row number at each step. We are interested in small filter allowing the robot to recognize whether it has reached a cell with an exit (at the inner side or outer side). States with both inner and outer exits have multiple outputs. To search for a minimal filter, we firstly start with deterministic input filters for a grid world with size , , , , , , and then minimize these filters. We collected the total time spent in different stages of filter minimization, including the construction of zipper constraints, SAT formula generation and resolution of SAT formula by the SAT solver. The results are summarized visually in Figure 8(b).
In this problem, the number of states in the input filter scales linearly with the size of the square. So does the minimal filter. But the particular problem has an important additional property: it represents a worst-case in a certain sense because there are no zipper constraints. We do not indicate this fact to the algorithm, so the construction of zipper constraints examines many cliques, determining that none apply. The results highlight that the construction of the zipper constraints quickly grows to overtake the time to generate the logical formula — even though, in this case, the zipper constraint set is empty.
The preceding hints toward our direction of current research: the construction of by naïvely following Definition 14 is costly. And, though the SAT formula is polynomial in the size of the mcczc instance, that instance can be very large. On the other hand, the need for a zipper constraint can be detected when the output produced fails to be deterministic. Hence, our future work will look at how to generate these constraints lazily.
With an eye toward generalizing combinatorial filters, we introduced a new class of filter, the cover filters. Then, in order to reduce the state complexity of such filters, we re-examined earlier treatments of traditional filter minimization; this paper has shown some prior ideas to be mistaken. Building on these insights, we formulate the minimization problem via compatibility graphs, examining covers comprised of cliques formed thereon. We present an exact algorithm that generalizes from the traditional filter minimization problem to cover filters elegantly.