Partition Refinement (in writing ...)

Recently, i am studying the data structure of Partition Refinement. It is an useful technique to partition set. The main application of the technique is as follows:

Q\textbf{Q}: Given two sets SS and XX, how to find SXS \cap X and SXS \setminus X?

A general idea is that itemize each element xXx \in X and test whether xSx \in S. Obviously, the running time is O(SX)O(|S| \cdot |X|). But the running time is not good. Is there a beautiful algorithm which has better complexity? Fortunately, we can solve the problem in O(X)O(|X|) using Partition Refinement technique. In the following, i will describe the data structure of Partition Refinement and design an algorithm to solve the above problem. There are other applications, e.g., LBFS, the connected components of G\overline{G} and so on.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章