Skip to main content

Representasi Relasi

Using Matrix

A relation between finite sets cam be represented using a zero-one matrix. Suppose that RR is a relation from A=a1,a2,,am to B=b1,b2,,bnA = {a_1, a_2, \dots, a_m} \text{ to } B = {b_1, b_2, \dots, b_n}. (Here the elements of sets AA and BB have been listed in a particular, but arbitary, order. Furthermore, when A=BA = B we use the same ordering for AA and BB.) The relation RR can be represented by the matrix MR=[mij]M_R = [m_{ij}], where
Sebuah relasi antara himpunan yang terbatas dapat direpresentasikan menggunakan matriks nol-satu. Misalkan RR adalah relasi dari A=a1,a2,,am ke B=b1,b2,,bnA = {a_1, a_2, \dots, a_m} \text{ ke } B = {b_1, b_2, \dots, b_n}. (Di sini elemen-elemen himpunan AA dan BB telah dicantumkan dalam urutan tertentu, tetapi sembarangan. Selanjutnya, ketika A=BA = B kita menggunakan urutan yang sama untuk AA dan BB.) Relasi RR dapat direpresentasikan oleh matriks MR=[mij]M_R = [m_{ij}], dimana
mij={1if (ai,bj)R0if (ai,bj)Rm_{ij} = \begin{cases} 1 & \text{if } (a_i, b_j) \in R \\ 0 & \text{if } (a_i, b_j) \notin R \end{cases}
In other words, the zero-one matrix representing RR has a 1 as its (i,j)(i, j) entry when (ai)isrelatedto(a_i) is related to b_j,anda0inthispositionif, and a 0 in this position if (a_i)isnotrelatedtois not related tob_j$. (Such a representation depends on the ordering used for A and B.)