$R_B(x,y)= {(x,y) \in U^2 | \forall a \in B, a(x) = a(y)}$
If $(x,y) \in R_B(x,y)$, then $x$ and $y$ are indiscernible by attributes from $B$. The equivalence classes of the $B$-indiscernibility relation are denoted $[x]_{B}$. The indiscernibility relation will be further used to define basic concepts of rough set theory which are lower and upper approximations.
Let $B \subseteq A$ and $X \subseteq U$, $X$ can be approximated using the information contained within $B$ by constructing the $B$-lower and $B$-upper approximations of $X$:
$R_B \downarrow X = { x \in U | [x]_{B} \subseteq X }$
$R_B \uparrow X = { x \in U | [x]_{B} \cap X \not= \emptyset }$
The tuple $\langle R_B \downarrow X, R_B \uparrow X \rangle$ is called a rough set. The objects in $R_B \downarrow X$ mean that they can be with certainty classified as members of $X$ on the basis of knowledge in $B$, while the objects in $R_B \uparrow X$ can be only classified as possible members of $X$ on the basis of knowledge in $B$.
In a decision system, for $X$ we use decision concepts (equivalence classes of decision attribute) $[x]_d$. We can define $B$-lower and $B$-upper approximations as follows.
$R_B \downarrow [x]_d = { x \in U | [x]_{B} \subseteq [x]_d }$
$R_B \uparrow [x]_d = { x \in U | [x]_{B} \cap [x]_d \not= \emptyset }$
The positive, negative and boundary of $B$ regions can be defined as:
$POS_{B} = \bigcup_{x \in U } R_B \downarrow [x]_d$
The boundary region, $BND_{B}$, is the set of objects that can possibly, but not certainly, be classified.
$BND_{B} = \bigcup_{x \in U} R_B \uparrow [x]_d - \bigcup_{x \in U} R_B \downarrow [x]_d$
Furthermore, we can calculate the degree of dependency of the decision on a set of attributes. The decision attribute $d$ depends totally on a set of attributes $B$, denoted $B \Rightarrow d$, if all attribute values from $d$ are uniquely determined by values of attributes from $B$. It can be defined as follows. For $B \subseteq A$, it is said that $d$ depends on $B$ in a degree of dependency $\gamma_{B} = \frac{|POS_{B}|}{|U|}$.
A decision reduct is a set $B \subseteq A$ such that $\gamma_{B} = \gamma_{A}$ and $\gamma_{B'} < \gamma_{B}$ for every $B' \subset B$. One algorithm to determine all reducts is by constructing the decision-relative discernibility matrix. The discernibility matrix $M(\mathcal{A})$ is an $n \times n$ matrix $(c_{ij})$ where
$c_{ij} = {a \in A: a(x_i) \neq a(x_j) }$ if $d(x_i) \neq d(x_j)$ and
$c_{ij} = \oslash$ otherwise
The discernibility function $f_{\mathcal{A}}$ for a decision system $\mathcal{A}$ is a boolean function of $m$ boolean variables $\bar{a}_1, \ldots, \bar{a}_m$ corresponding to the attributes $a_1, \ldots, a_m$ respectively, and defined by
$f_{\mathcal{A}}(\bar{a_1}, \ldots, \bar{a_m}) = \wedge {\vee \bar{c}_{ij}: 1 \le j < i \le n, c_{ij} \neq \oslash }$
where $\bar{c}_{ij}= { \bar{a}: a \in c_{ij}}$. The decision reducts of $A$ are then the prime implicants of the function $f_{\mathcal{A}}$. The complete explanation of the algorithm can be seen in (Skowron and Rauszer, 1992).
The implementations of the RST concepts can be seen in BC.IND.relation.RST,
Z. Pawlak, "Rough Sets", International Journal of Computer and Information System, vol. 11, no.5, p. 341 - 356 (1982).
Z. Pawlak, "Rough Sets: Theoretical Aspects of Reasoning about Data, System Theory, Knowledge Engineering and Problem Solving", vol. 9, Kluwer Academic Publishers, Dordrecht, Netherlands (1991).