llirrikk / binary-relations

checking by definition

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Checking Binary Relations by Definition

What is Binary Relation

Binary relation over sets X and Y is a new set of ordered pairs (x, y) consisting of elements x in X and y in Y.

Let

Сhecking of belonging to:

Example

If and

----------M-------------------------------------------------------------------------------
(1, 2, 3, 4)

----------M * M---------------------------------------------------------------------------
(1,1)   (1,2)   (1,3)   (1,4)
(2,1)   (2,2)   (2,3)   (2,4)
(3,1)   (3,2)   (3,3)   (3,4)
(4,1)   (4,2)   (4,3)   (4,4)

----------M * M (with tau)----------------------------------------------------------------
(1,1)   -       (1,3)   -
-       (2,2)   -       (2,4)
(3,1)   -       (3,3)   -
-       (4,2)   -       (4,4)

----------properties of binary relations--------------------------------------------------
reflexive_relation      +
symmetric_relation      +
antisymmetric_relation  -       (4,2) in taus, and (2,4) in taus, but 4 != 2
transitive_relation     +

----------types of binary relations-------------------------------------------------------
equivalence relation    +
order relation          -

About

checking by definition


Languages

Language:Python 100.0%