<<Vilcretas`

GrafoString["Bienvenidos"]

A={71,75,68,74,32,37,65,48};
R1={{71,32},{75,48},{68,68},{65,75},{48,32},{37,37},{75,37},{75,71},{65,48},{68,71}};

MR=MatrizRelBin[R1,A,A]

ClasificacionRelBin[R1,A]

?ClasificacionRelBin

TipoRelacion[R1,A]

A={41,75,76,78,98};
MR=(({{1, 0, 1, 0, 0}, {1, 0, 0, 0, 1}, {0, 0, 1, 1, 1}, {1, 0, 1, 0, 1}, {1, 1, 1, 1, 1}}));

R=RelBinMatriz[MR,A,A]

R4={{41,41},{41,76},{75,41},{75,98},{76,76},{76,78},{76,98},{78,41},{78,76},{78,98},{98,41},{98,75},{98,76},{98,78},{98,98}};
 R3={{41,48},{41,76},{75,41},{75,98},{76,76},{76,78},{76,98},{78,41},{78,76},{78,98},{98,41},{98,75},{98,76},{98,78},{98,98}};
R2={{41,41},{41,76},{75,41},{75,98},{76,76},{76,78},{76,98},{78,41},{78,76}, ,{98,41},{98,75},{98,76},{98,78},{98,98}};
R1={{41,41},{41,74},{75,41},{75,98},{76,76},{76,78},{76,98},{78,41},{78,76},{78,98},{98,41},{98,75},{98,76},{98,78},{98,98}};

Table[ElementRelBinQ[R,i],{i,R4}]

Table[ElementRelBinQ[R,i],{i,R3}]

Table[ElementRelBinQ[R,i],{i,R2}]

Table[ElementRelBinQ[R,i],{i,R1}]

ClasificacionRelBin[R,A]

A=Range[-801,1204,5];
B=Range[-3012,1,23];

PC[A,B]//Length

A={12,96,32,36,93,16,43,33};
R={{16,96},{43,93},{93,32},{96,96},{36,36},{93,93},{36,32},{12,12},{43,33},{43,32}};

MatrizRelBin[R,A,A]

ClasificacionRelBin[R,A]

A=Range[-672547,51365,3892];
B=Range[-64273,-264,2783];

Length[DominioRelBin[PC[A,B]]]

A={89,6,24,81,31};
R1={{81,6},{6,31},{31,31},{24,81},{6,89},{24,24},{89,89},{6,24},{89,24},{6,6},{31,81},{89,31},{31,89},{24,31},{81,31}};
R2={{24,31},{81,81},{81,31},{89,31},{6,31},{31,31},{89,89},{24,24},{81,6},{24,81},{6,24},{81,24},{31,24},{81,89},{6,89}};

RelacionComposicion[R1_,R2_]:=Module[{Composicion={},i,j},For[i=1,i<=Length[R2],For[j=1,j<=Length[R1],If[R2[[i,2]]==R1[[j,1]],Composicion=Append[Composicion,{R2[[i,1]],R1[[j,2]]}]];j++];
i++];DeleteDuplicates[Composicion]]

R=Union[Intersection[Complement[PC[A,A],R1],R2],RelacionComposicion[R1,R2]]

MatrizRelBin[R,A,A]

MR1=MatrizRelBin[R1,A,A];
MR2=MatrizRelBin[R2,A,A];
MR1=MR1[[1]];
MR2=MR2[[1]];
MR=UnionBooleana[InterseccionBooleana[ComplementoBooleano[MR1][[1]],MR2][[1]],ProductoBooleano[MR2,MR1][[1]]]
MR=UnionBooleana[InterseccionBooleana[ComplementoBooleano[MR1,lista->True],MR2,lista->True],ProductoBooleano[MR2,MR1,lista->True]]

Intersection[Complement[PC[A,A],R1],R2]

R1={{28,28},{28,38},{28,44},{28,91},{38,28},{38,38},{38,74},{38,91},{44,28},{44,38},{44,74},{44,91},{74,28},{74,38},{74,44},{74,91},{91,28},{91,38},{91,74}};
R2={{28,28},{28,38},{28,44},{28,91},{38,28},{38,38},{38,74},{38,91},{44,28},{44,38},{44,74},{44,91},{74,28},{74,38},{74,44},{74,91},{91,28},{91,38},{91,74},{92,91}};
R3={{21,28},{28,38},{28,44},{28,91},{38,28},{38,38},{38,74},{38,91},{44,28},{44,38},{44,74},{44,91},{74,28},{74,38},{74,44},{74,91},{91,28},{91,38},{91,74},{91,91}};
R4={{28,28},{28,38},{28,44},{28,91},{38,28},{38,38},{38,74},{38,91},{44,28},{44,38},{44,74},{44,91},{74,28},{74,38},{74,44},{74,91},{91,28},{91,38},{91,74},{91,91}};
R5={{28,28},{28,39},{28,44},{28,91},{38,28},{38,38},{38,74},{38,91},{44,28},{44,38},{44,74},{44,91},{74,28},{74,38},{74,44},{74,91},{91,28},{91,38},{91,74},{91,91}};

respuestas={R1,R2,R3,R4,R5};
R =Intersection[RelacionComposicion[R2,Reverse/@R1],Union[Complement[PC[A,A],R2],R1]]

Table[Table[ElementRelBinQ[R,i],{i,j}],{j,respuestas}]

Length[R1]==Length[R]

Table[ElementRelBinQ[R,i],{i,R1}]

Table[ElementRelBinQ[R,i],{i,R2}]

Table[ElementRelBinQ[R,i],{i,R3}]

Table[ElementRelBinQ[R,i],{i,R4}]

Table[ElementRelBinQ[R,i],{i,R5}]