WOLFRAM NOTEBOOK

WOLFRAM|DEMONSTRATIONS PROJECT

Relations and Graphs

size of the set
1
2
3
size of the relation
any
amount needed
5
choose a type of relation
reflexive
any
no
yes
symmetric
any
no
yes
transitive
any
no
yes
antisymmetric
any
no
yes
total order
any
no
yes
function
any
no
yes
permutation
any
no
yes
connected
any
no
yes
acyclic
any
no
yes
simple
any
no
yes
There are 16 relations of this type.
A relation on a set
A
can be described by a 0-1 square matrix where a 1 at row
i
and column
j
means that
i
is related to
j
. If the size of
A
is
n
, the total number of relations is
2
n
2
. There are several types of relations and this Demonstration allows you to combine choices from the ten most common ones. You can choose
n=1,2,3
, the size of the relation (i.e., the number of 1's in the matrix) and the amount of relations you want to see using the slide viewer. The Demonstration then presents a slide view containing each matrix (if there are any) and its graph (two vertices
i
and
j
being connected if there is a 1 at position
i
,
j
in the matrix).
Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.