CARTESIAN PRODUCT PARTITIONING OF MULTI-DIMENSIONAL REACHABLE STATE SPACES

Markov chains (MCs) are widely used to model systems which evolve by visiting the states in their state spaces following the available transitions. When such systems are composed of interacting subsystems, they can be mapped to a multi-dimensional MC in which each subsystem normally corresponds to a different dimension. Usually the reachable state space of the multi-dimensional MC is a proper subset of its product state space, that is, Cartesian product of its subsystem state spaces. Compact storage of the matrix underlying such a MC and efficient implementation of analysis methods using Kronecker operations require the set of reachable states to be represented as a union of Cartesian products of subsets of subsystem state spaces. The problem of partitioning the reachable state space of a three or higher dimensional system with a minimum number of partitions into Cartesian products of subsets of subsystem state spaces is shown to be NP-complete. Two algorithms, one merge based the other refinement based, that yield possibly non-optimal partitionings are presented. Results of experiments on a set of problems from the literature and those that are randomly generated indicate that, although it may be more time and memory consuming, the refinement based algorithm almost always computes partitionings with a smaller number of partitions than the merge-based algorithm. The refinement based algorithm is insensitive to the order in which the states in the reachable state space are processed, and in many cases it computes partitionings that are optimal.


INTRODUCTION
Markov chains (MCs) are widely used to model systems which evolve by visiting the states in their state spaces following the available transitions. When such systems are composed of interacting subsystems, they can be modeled with various high-level formalisms. For analysis purposes, the high-level formalism is mapped to a multi-dimensional MC in which each subsystem normally corresponds to a different dimension. Then the MC is analyzed probabilistically for its steady-state or transient behavior [19] to improve the existing system or to devise a new system that meets certain requirements. The problem considered in this paper arises in this context of state based modeling.
We consider multi-dimensional MCs that are used to model systems composed of a finite number of interacting subsystems. The Cartesian product of the subsystem state spaces is called the product state space of the system. Due to semantic constraints, usually the system can only be in a proper subset of its product state space. This set is called the reachable state space of the system since its difference from the product state space consists of those unreachable states which the system never occupies. Compact storage of the matrix underlying the multi-dimensional MC incident on the reachable state space and efficient implementation of relevant analysis methods using Kronecker operations require the set of reachable states to be represented as a union of Cartesian products of subsets of subsystem state spaces [8]. We call this the problem of Cartesian product partitioning of multi-dimensional reachable state spaces. Currently, there are only ad hoc methods that can be used to this end, and to the best of our knowledge the study undertaken here is the first for state-based models.
A D-dimensional orthogonal polytope can be represented by a set of D-dimensional vectors [3]. In such a representation, the Cartesian product of sets of consecutive integers represents a hyper-rectangle. Hence, Cartesian product partitioning of a D-dimensional reachable state space is equivalent to the hyper-rectangular partitioning of the D-dimensional polytope that is represented by the reachable state space. Partitioning a two-dimensional orthogonal polytope into minimum number of hyper-rectangles is well studied and there are polynomial time algorithms for this problem [12,15,18]. However, the three-dimensional version of this problem is shown to be NP-complete, where NP stands for nondeterministic polynomial time [11]. In [14], an algorithm to partition three-dimensional orthogonal polytopes into hyper-rectangles is proposed. To the best of our knowledge, there is no algorithm to partition a D-dimensional orthogonal polytope into hyper-rectangles for D > 3.
Our motivation therefore is to automate the partitioning of a given multi-dimensional reachable state space into Cartesian products of subsets of subsystem state spaces. For practical purposes, the number of partitions in the partitioning should be kept as small as possible. With this objective in mind, we first show that the problem of partitioning the reachable state space of a three or higher dimensional system with a minimum number of partitions into Cartesian products of subsets of subsystem state spaces is NP-complete [13]. Then we present two algorithms that can be used to compute possibly non-optimal partitionings of the reachable state space into Cartesian products of subsets of subsystem state spaces.
We assume without loss of generality that the subsystem state spaces are defined on consecutive nonnegative integers starting from 0. Otherwise, it is always possible to enumerate the subsystem state spaces so that they satisfy this assumption. The first algorithm starts with partitions as singletons, each representing a reachable state. Two partitions are merged if their union is also a Cartesian product of sets of consecutive integers. The partitions are merged until there are no partitions that can be merged with each other. We call this the merge-based algorithm. The second algorithm takes a different approach. First, the unit distance graph of the reachable state space is constructed. The vertex set of this graph is the reachable state space and there is an edge between two vertices if the distance between them is one. Then this graph is refined [17] by removing edges until no further refinement is necessary. We call this the refinement-based algorithm.
Through a set of problems from the literature [2,4,6] and those that are randomly generated, the performance of the two algorithms is investigated. Results indicate that although it may be more time and memory consuming, the refinement-based algorithm almost always computes partitionings with a smaller number of partitions than the merge-based algorithm. In many cases, the partitionings computed by the refinement-based algorithm are the optimal ones. Furthermore, the refinement-based algorithm is insensitive to the order in which the states in the reachable state space are processed.
The next section introduces the notation and preliminary definitions used. The third section defines the partitioning problem formally, shows that it is NP-complete, and presents two algorithms that provide, possibly non-optimal, solutions to the problem. The fourth section reports on experimental results with the two algorithms. The last section concludes the paper.

NOTATION AND DEFINITIONS
Throughout the paper, calligraphic uppercase letters are used for sets. | · | and × respectively stand for the number of elements in a set and the Cartesian product operator. Vectors are represented with boldface lowercase letters and used to denote multi-dimensional states. For a D-dimensional vector x, x d denotes the dth element of the vector for d = 1, . . . , D.
The vector e d denotes the dth column of the identity matrix, that is, the dth principal axis vector, and its length is determined by the context in which it is used. O(·) stands for the big O notation. The complexities of the algorithms are worst case complexities unless otherwise stated. R, Z ≥0 , and Z >0 denote the sets of reals, nonnegative integers, and positive integers, respectively.
A D-dimensional hyper-rectangle is defined to be a Cartesian product of D intervals as A point set X ⊆ R D is convex if the line segment between x and y is in X for x, y ∈ X . The convex hull of X is the smallest set containing X . A D-dimensional convex polytope is the convex hull of a finite set X ⊆ R D [20]. A D-dimensional polytope is the union of a finite number of D-dimensional convex polytopes. A D-dimensional polytope is orthogonal if it is a union of D-dimensional hyper-rectangles [3].
Let G = (V, E) be an undirected graph with vertex set V and edge set E. A graph is a graph whose vertex set is V and edge set is {(x, y) ∈ E | x, y ∈ V }. Two vertices of a graph are said to be connected if there exists a sequence of edges that lead from one of the vertices to the other. A subgraph of G = (V, E) forms a connected component if each pair of vertices in the subgraph are connected. A unit distance graph is a graph having a drawing in which all edges are of unit length [16].

CARTESIAN PRODUCT PARTITIONING ALGORITHMS
We consider multi-dimensional state based models with D interacting subsystems. The state space of the dth subsystem is denoted by S d ⊆ Z ≥0 for d = 1, . . . , D and S = × D d=1 S d is said to be the product state space. In many cases, the reachable state space of the system, denoted by R, is a proper subset of S [8] and can be partitioned in a myriad of ways. We are interested in partitionings, where the partitions themselves are Cartesian products of subsets of subsystem state spaces. Next we define the Cartesian product partitioning problem.
For practical purposes that aid the use of Kronecker operations, the number of partitions in the Cartesian product partitionings of R should be as small as possible. Therefore, our interest lies in minimizing the number of partitions in the partitioning of R. Unfortunately, the decision problem derived from the minimum Cartesian product partitioning problem is NP-complete [13] when the system has three or higher dimensions as we next show. Theorem 3.1: It is NP-complete to decide whether there is a Cartesian product partitioning of the multi-dimensional reachable state space R with less than K R partitions for given D ∈ Z >0 , K R ∈ Z >0 , and R ⊆ Z D ≥0 when D ≥ 3.
Proof: See [10]. Now, we present two algorithms to compute Cartesian product partitionings of the multi-dimensional reachable state space R. The first algorithm starts with partitions as singletons, each representing a reachable state. A partition is merged with another partition if their union is also a Cartesian product of sets of consecutive integers. This algorithm terminates when there are no partitions that can be merged with each other. The second algorithm takes a different approach. The unit distance graph of the reachable state space is constructed. Then this graph is refined by removing edges until the vertex set of each connected component can be expressed as a Cartesian product of sets of consecutive integers.

Merge-Based Partitioning
We start by defining set mergeability and then provide the condition for the mergeability of two partitions in a Cartesian product partitioning of R. Proof: See [10]. Now, we demonstrate the concept of mergeability on an example. Let X = × D d=1 X d be a partition in a Cartesian product partitioning of R. The states (min(X 1 ), . . . , min(X D )) ∈ X and (max(X 1 ), . . . , max(X D )) ∈ X are said to be the end states of the partition X . Due to Lemma 3.1, mergeability of two partitions can be determined by their end states. Besides, the states in a partition can be obtained from its end states. Therefore, it is sufficient to keep only the end states of the partitions instead of maintaining the partitions by using a disjoint-set data structure and a union-find algorithm [7] to merge two partitions.
In Algorithm 1, we provide the merge-based Cartesian product partitioning of R. It starts by constructing a singleton for each state in R. For each partition that is a singleton or is obtained by merging two partitions, a mergeable partition is sought. If such a partition is located, the two partitions are merged. There are |R| partitions; hence, the total time complexity of constructing a new partition is O(D|R|). A new partition is obtained when a Algorithm 1 Merge-based algorithm to compute a Cartesian product partitioning of given multi-dimensional reachable state space Input: D-dimensional reachable state space: R Output: Cartesian product partitioning of R: for all x ∈ R do 4: X ← {x} 5: while there exists some Y ∈ Q mergeable with X do 6: The efficiency of the algorithm depends on the data structure used to keep the end states of the partitions. When a balanced tree such as an AVL tree [1] is used to keep the end states, the cost of searching for a partition becomes O(lg(L)) time, where L is the maximum number of partitions during the execution of the algorithm. Therefore, the time complexity of the algorithm associated with seeking a mergeable partition is O(D|R| lg(L)) when the end states of the partitions are kept in a balanced tree. Another cost in the algorithm is inserting end states to the tree when no mergeable partition is found and removing the end states from the tree when two partitions are merged. The time complexities of these operations are also O(|R| lg(L)). Therefore, the time complexity of the algorithm is O(D|R| lg(L)). The space requirement for each partition is O(D); hence, the space requirement of the algorithm is O(DL). In the worst case, no partitions are merged and L = |R|; hence, the time and space complexities of the algorithm are O(D|R| lg(|R|)) and O(D|R|), respectively. If L is constant, the number of partitions is bounded by a constant during the execution of the algorithm. In that case, the time and space complexities of the algorithm become O(D|R|) and O(D), respectively.
Observe that the partition computed by Algorithm 1 depends on the order in which the states of R are processed. Now, let us consider the following three-dimensional example.

Refinement-Based Partitioning
The refinement based partitioning algorithm constructs the unit distance graph of the multidimensional reachable state space R. The vertex set of this graph is R and there is an edge between two vertices In other words, two vertices are adjacent in the unit distance graph if there is consecutiveness of the vertices along a particular dimension while the values of states variables in other dimensions remain constant. We next define conflicting edges in a subgraph of the unit distance graph.
The next lemma and corollary show that in a subgraph of the unit distance graph of R with no conflicting edges, the vertices in each connected component can be written as a Cartesian product of sets of consecutive integers. Therefore, eliminating conflicting edges in the unit distance graph of R leads to a Cartesian product partitioning of R.
The next definition introduces the concept of a separator, which is used in refining the unit distance graph of R.
The next lemma shows that removing the edges in a separator decreases the number of conflicting edges in a subgraph of the unit distance graph of R. Proof: See [10]. Now, we are in a position to provide the refinement based algorithm for Cartesian product partitioning of R (see Algorithm 2). At the outset, the unit distance graph of R is constructed. Then the separators in this graph are constructed and inserted to a priority queue [7], where the priority of a separator is the total number of edges which conflict with an edge in the separator. The graph is refined by removing the separator with maximum priority until no conflicting edges remain. The edge set of the graph changes when a separator is removed; hence, the separators need to be reconstructed. By Lemma 3.3, an edge is conflicting in the refined graph only if it is also conflicting before refinement. Hence, each separator in the refined graph is a subset of a separator in the graph before refinement. Therefore, in order to reconstruct the separators, it is necessary and sufficient to visit the vertices incident to the edges in the separators intersecting the removed separator, where two separators are said to be intersecting if they include edges incident to the same vertex. If all conflicting edges are eliminated, then the vertices in each connected component can be written as a union of Cartesian products of sets of consecutive integers by Corollary 3.1.
In order to construct the unit distance graph, first all adjacent vertices need to be determined. In order to facilitate this, each vertex keeps an adjacency list of length 2D to identify the adjacent vertices. The vertices are first inserted to an AVL tree [1]. Then for each vertex, vertices that might be adjacent in the product state space are sought in the tree. There are 2D such vertices; hence, 2D vertices are sought for each vertex. Therefore, the space complexity of maintaining the graph becomes O(D|R|) and the time complexity of constructing the unit distance graph becomes O(D|R| lg(|R|)). After the graph is constructed, the AVL tree is destroyed.
After the adjacency list of each vertex is set, separators need to be constructed. Each separator includes at least one conflicting edge, that is, its priority is positive. Algorithm 2 visits each edge and checks whether it conflicts with some other edge. A separator is formed by the two vertex sets (U and V in Definition 3.4) and the subgraphs induced by these two sets are connected. Besides, the separator is maximal; hence, the separator including a particular edge is unique and only one separator can include the edge (see Item 3 of Definition 3.4). Therefore, the separator including an edge is constructed only once in the unit distance graph. While constructing a separator Z including the edge (x, y), a breadthfirst search starting at x is used to visit the vertices connected to x [7]. The time complexity of constructing the separator Z is O(D|Z|). Since each edge is added to at most one separator, the number of edges in the union of separators is O(|E|). Therefore, the total time complexity of constructing all separators in the unit distance graph becomes O(D|E|). At each vertex, we use an array of size 2D to keep the separators including the edge incident to that vertex. The space complexity of the algorithm remains as O(D|R|), but it takes constant time to retrieve the separator including a given edge. Construct unit distance graph of R, G = (R, E)

3:
Construct an empty priority queue PQ 4: for all x ∈ R do 5: for all d = 1, . . . , D do 6: if x + e d ∈ R then 7: if (x, x + e d ) conflicts with some edge in E AND (x, x + e d ) is not in a separator then 8: Construct separator Z including (x, x + e d ); Insert Z to PQ 9: end if 10: end if 11: end for 12: end for 13: while PQ is not empty do 14: Z max ← separator Z in PQ whose priority is maximum 15: Remove Z max from PQ 16: for all (x, y) ∈ Z max do 17: L ← ∅ 18: for all separators Z in PQ including an edge incident to x or y do 19: When a separator is constructed, it is added to the priority queue. We use a binary heap as the priority queue. Observe that the number of separators does not exceed |E| since each separator includes at least one edge. Therefore, the cost of inserting separators to the priority queue is O(|E| lg(|E|)). We consider an array implementation of the priority queue and the maximum number of separators is not known in advance; therefore, we allocate O(|E|) = O(D|R|) space for the priority queue.
After the separators in the unit distance graph are inserted to the priority queue, the graph is refined by removing the edges in the separator with maximum priority until no separators remain in the priority queue. The graph is refined at most |E| times since at least one edge is removed from the graph at each refinement step. At each refinement step, the separator with maximum priority, Z max , is chosen. When Z max is removed, the intersecting separators need to be reconstructed. Hence, at each refinement step, all edges of Z max are visited to obtain the intersecting separators. These separators are inserted to a list L and removed from the heap. Then these separators are reconstructed for the edge set E \ Z max and inserted to the heap. Reconstruction of a separator Z requires visiting all the vertices incident to the edges in it. The number of edges in the union of separators intersecting with Z max is O(D|E|); hence, reconstruction of separators at each step has time complexity O(D|E|). Therefore, the total time complexity of reconstructing separators becomes O(D|E| 2 ) since reconstruction is required in all refinement steps. Now, consider the costs related to the heap operations. At each refinement step, the separators intersecting with  The priority of separator Z (1,1) is 2, and the priorities of the other separators are 1. Then the edges in Z (1,1) are removed from the edge set E (1) . After these edges are removed,  Z (1,3) and Z (1,4) are reconstructed and one conflicting edge remains in G (2) (see Figure 2(c)). The separators in this graph are Z (2,1) = Z (1,2) and Z (2,2) = Z (1,5) . The priorities of both separators are 1, and either of them can be chosen for refinement. If Z (2,2) is chosen, Z (2,1) is reconstructed and no conflicting edges remain in G (3) (see Figure 2

EXPERIMENTAL RESULTS
We implemented the proposed partitioning algorithms in C; the code can be obtained from [9]. All experiments are performed on a PC with an Intel Core2 Duo 2.4 GHz processor and 4 Gigabytes (GB) of main memory. All times are reported as seconds of CPU time. We monitor the memory allocation of the algorithms with the pidstat command of the sysstat package under Linux and all memory allocation results are reported as Megabytes (MB). We consider two groups of test problems. The first group consists of multi-dimensional reachable state spaces of Markovian models from the literature. The second group consists of a class of randomly generated multi-dimensional reachable state spaces with known minimum Cartesian product partitioning. We use the second group to find out how good the partitioning algorithms perform in terms of number of partitions with respect to the optimal solution.

Test Problems from Literature
We consider state spaces of call center models with different control policies (N-model, Vmodel, W-model ) [2], a parallel communication software model (courier large, courier med ) [5], a manufacturing systems model with Kanban control (kanban fail, kanban large) [4], and a queueing model with multiple servers and queues (msmq large) [6]. The V-model has different variations with 2, 3, and 4 types of customers that we consider. "V-model (2)", "V-model (3)" and "V-model (4)" in the results refer to the V-model with 2, 3, and 4 customer types [2]. Table 1 gives the properties of the first group of test problems. The first four columns give the model name, the dimension of the state space, the size of the product state space, and the size of the reachable state space. The fifth column gives the minimum number of partitions in Cartesian product partitioning. The states of each connected component in the graph, that is obtained by removing the separators from the unit distance graph of R, are in same partition in the minimum Cartesian product partitioning of R as shown in the next lemma.  Hence, each partition in the minimum Cartesian product partitioning of R is a union of partitions obtained by removing the separators from the unit distance graph of R. We compute all possible Cartesian product partitionings satisfying this condition in order to obtain the number of partitions in the minimum Cartesian product partitioning. This is relatively simple when there are small number of separators and intersecting separator pairs. However, the number of Cartesian product partitionings to compute increase exponentially with the number of separators and intersecting separator pairs. We also report two important characteristics of the models. The sixth and seventh columns give the number of separators and the number of separator pairs that have at least one edge incident to the same vertex in the unit distance graph, respectively. The reachability of a multi-dimensional state depends on the interaction of the subsystems. Hence, the number of separators and intersecting separator pairs depends on the model and the reachability conditions. There are many different reachability conditions, such as the sum of different subsystem state values might be bounded or a subsystem cannot be in a state depending on other subsystem states. In the N-model, the sum of different subsystem state values is bounded implying more separators and intersecting separator pairs. There is no such interaction in the other models we consider. V-model, W-model, courier large, and courier med are simpler than the N-model, and have relatively small numbers of separators. There are no separators in kanban fail, kanban large, and msmq large, that is, the unit distance graphs of these models do not include any conflicting edges. Therefore, these models can be considered as relatively simple.
In Table 2, we present the results of experiments for the models from literature when the states are processed in lexicographical order. If the states are not given in this order, then it may be easily obtained by sorting. The second and fifth columns give the number of partitions in the Cartesian product partitionings computed by merge and refinement based partitioning algorithms, respectively. When the states are processed in lexicographical order, both algorithms compute the optimal solution for the courier large, courier med, kanban fail, kanban large, and msmq large models. The merge-based algorithm computes the optimal solution of only the N-model among the call center models. The refinement based algorithm computes the optimal solution for all call center models except the relatively complicated N-model. It is reasonable to use merge-based algorithm for relatively complicated problems. For all the models, the merge-based algorithm requires less time and memory than the refinement based algorithm. Table 3. Experimental results for models from literature when states are processed in random order In Table 3, we present the results of experiments for the models from literature when the states are processed in random order. For both algorithms, we compute the Cartesian product partitioning by processing the states in 51 random orderings so as to provide mean values. The second and fifth columns of Table 3 give the mean number of partitions together with the confidence interval both rounded to the nearest integer for a confidence probability of 95% of the partitionings obtained by merge and refinement based algorithms, respectively. In "Time" and "Memory" columns, the mean values and the confidence intervals for a confidence probability of 95% of the experiments are reported. In all columns, the first value in parentheses is the mean and the other value is the confidence interval.
The partitioning size and the memory requirement remain the same for the refinement based algorithm, but the time requirement increases when the states are processed in random order. In all of the models, the number of separators is small, so the increase in time is not due to the refinement of the graph and updating of separators, but due to the graph construction. These results suggest that cache is more efficiently used while accessing the states when the states are ordered lexicographically since each state becomes a child of the last accessed state in the AVL tree. Hence, insertion to the tree becomes much more efficient for the lexicographic ordering of the states. The order of states is much more important for the merge-based algorithm. In this algorithm, two partitions are merged along dimension d if the subsets of their subsystems are the same in all dimensions except d. When the states are ordered lexicographically, a partition is merged with all possible partitions along a dimension before it is merged with a partition in another dimension. When the states are ordered randomly, partitions are merged along random dimensions depending on the order of the states. Hence, all possible partitions along a dimension are not considered. Therefore, the number of partitions for random ordering of the states increases by a factor between 174 (N-model ) and 483,000 (kanban large) on average with respect to the number of partitions for the lexicographical ordering. The time and memory requirements also increase substantially which agrees with the complexity analysis since the time and memory complexities of the merge-based algorithm depend on the number of partitions (see Section 3.1). The time taken by the merge-based algorithm becomes close to the time taken by the refinement based algorithm. However, the memory requirement of the merge-based algorithm is still better than the memory requirement of the refinement based algorithm. for all k = 1, . . . , K do 15: R ← R ∪ R (k) 16: end for 17: Rearrange the dimensions of the states in R with a new random ordering 18: end function

A Class of Random Test Problems
Cartesian product partitioning of a two-dimensional reachable state space is equivalent to the hyper-rectangular partitioning of the two-dimensional polytope that is represented by the reachable state space. Hence, minimum Cartesian product partitioning of a twodimensional reachable state space can be obtained by using a modified version of the minimum rectangular partitioning algorithm in [12]. Consider the next lemma that specifies a condition for increasing the dimension of the state space in Cartesian product partitioning without changing the minimum number of partitions.
Lemma 4.2 states that when the minimum Cartesian product partitioning of a multidimensional state space is known, it is possible to add states and increase the dimension without changing the size of the minimum Cartesian product partitioning.
Using Lemma 4.2, Algorithm 3 presented next generates a random multi-dimensional state space whose minimum Cartesian product partitioning is known. The algorithm starts with a random two-dimensional state space over {0, . . . , M − 1} × {0, . . . , M − 1} that is generated by assigning each state a reachability probability p (lines 3-4). Then the minimum Cartesian product partitioning of this random set is computed (lines 6-6). Next, (D − 2) dimensions are added to the state space one at a time (lines 7-13). For each additional dimension, a uniformly distributed random integer that determines the range of consecutive integers is generated (line 8). Then the Cartesian product of each partition with the set of consecutive integers is computed and the corresponding integer is updated to continue with the next dimension (lines 10-11). Finally, dimensions of the states in R are rearranged so that the initial two dimensions are not always the first two dimensions (line 17). Table 4 reports the properties of the randomly generated state spaces. The first three columns provide the parameters used in generating the test problems. The first two columns give the inputs of Algorithm 3, p, and D, respectively. The third column gives the size of the product state space, K D , when each subsystem state space size is K. The remaining columns have the same meaning as in Table 4, where mean values of 51 random test problems are reported for each set of parameters. Observe that the properties of the reachable state space depend on the initial two-dimensional state space. As p and K increase, the number of separators and the number of intersecting pairs increase. As these numbers increase, the problems become more complicated and it tends to be more difficult to find separators leading to a better solution. Observe that the size of the partitioning, K, depends on R (line 6 of Algorithm 3). When p is small, there are less reachable states to be merged. When p is large, there are less conflicting edges in the unit distance graph of R . Therefore, the size of the partitioning does not increase as p increases.
In Table 5, we present the results of experiments with the randomly generated state spaces of Table 4. The first three columns have the same meaning as in Table 4 and the remaining columns have the same meaning as in Table 3. When p is 0.25 and 0.50, the sizes of the partitionings obtained by the refinement based algorithm are close to their minimum values. However, when p is 0.75, the number of partitions become larger as the size of the product state space increases when number of separators and intersecting separator pairs increase. As for the refinement based algorithm, the number of partitions obtained by the merge-based algorithm is closer to the optimal value for smaller p. For all test problems, the merge-based algorithm is better than the refinement based algorithm in terms of time and memory requirements.

CONCLUSION
In this paper, we define Cartesian product partitioning of a D-dimensional reachable state space R and show that the problem of finding the partitioning with the minimum number of partitions is NP-complete when the dimension D is larger than 2. In order to obtain a Cartesian product partitioning, two algorithms are presented. The first algorithm starts with a partitioning, where each partition is a singleton. In this algorithm, each partition is merged with the first possible partition until it is not possible to merge any two partitions. This algorithm has O(D|R|lg(|R|)) time and O(D|R|) space complexities. The second algorithm starts with a partitioning that includes only one partition. Then the unit distance graph of the reachable state space is constructed. This is followed by the refinement of the graph by removing edges, until the vertex set of each connected component becomes a partition in the Cartesian product partitioning of the reachable state space. The time and space complexities of this algorithm is O(D 3 |R| 2 ) and O(D|R|), respectively. We consider two groups of test problems, which are from the literature and are randomly generated. The merge-based algorithm fails to compute the optimal partitioning in almost all problems. Furthermore, the size of the partitioning increases substantially when the states in the reachable state space are processed in random order instead of lexicographical order. The time and memory requirements of the merge-based algorithm are larger when the states are processed in random order. However, even when the states are processed in random order, the merge-based algorithm is still faster and requires less space than the refinement based algorithm. In many problems, the refinement based algorithm computes a partitioning that is either optimal or close to the optimal solution. Although it may be more time and memory consuming, the refinement based algorithm almost always computes partitionings with a smaller number of partitions than the merge-based algorithm.