<<VilCretas`

GrafoString["Bienvenidos"]

A={75,3,29,60,9,11,91};
MR=(({{0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 1, 0, 0, 0}, {1, 1, 1, 0, 1, 1, 1}, {0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 1, 0, 0, 0}}));

R=RelBinMatriz[MR, A,A]
ClasificacionRelBin[R,A]

?ClasificacionRelBin

A=Range[20];
R=RelBin["a^3-b^3>=96&&Mod[a+b,11]==0",A,A]

DominioRelBin[R]

{DominioRelBin[R]//Length, Length[DominioRelBin[R]]}

A={48,13,4,32,14,45,41,10,31,21,9,16,12,24,26,29,35,19,27,43};
B={34,12,3,10,6,2,40,36,15,50,17,8,30,19,49,32,28,41,26,43};

R=RelBin["GCD[a,b]>=5",A,B]

?MatrizRelBin

MatrizRelBin[R,A,B, encabezados->True]

ElementRelBinQ[R,{35,28}]

Length[R]

opciones={{1,2},{35,28}};
Table[i->ElementRelBinQ[R,i],{i,opciones}]

GCD[a,b]>=5

(CanvasOverlay[(CanvasFrame), ])

A={93,90,5,54,55,25};
R={{90,5},{54,90},{54,54},{54,25},{54,93},{54,5},{5,5},{5,54},{5,55},{5,25},{55,55},{55,25},{93,25},{25,90},{54,93},{25,5}};
R//Length

Grafo[R,dirigido->True](*OPCIONAL*)

MatrizRelBin[R,A,A]

MatrizRelBin[R,A,A,encabezados->True]

R={{99,99},{99,55},{99,74},{85,74},{85,13},{85,100},{22,100},{100,100},{100,45},{100,80}};
Grafo[R,dirigido->True](*Opcional*)

opcion1={{99,55},{85,13},{99,74},{85,100},{22,100},{100,45},{85,74},{99,99},{100,100},{100,80}};
Table[i->ElementRelBinQ[opcion1,i],{i,R}]
Length[R]==Length[opcion1]
Table[i->ElementRelBinQ[R,i],{i, opcion1}]

opcion2={{99,55},{13,85},{99,74},{85,100},{22,100},{100,45},{85,74},{99,99},{100,100},{100,80}};
Table[i->ElementRelBinQ[opcion2,i],{i,R}]
Length[R]==Length[opcion2]
Table[i->ElementRelBinQ[R, i],{i,opcion2}]

opcion3={{99,55},{13,13},{99,74},{85,100},{22,100},{100,45},{85,74},{99,99},{100,100},{100,80}};
Table[i->ElementRelBinQ[opcion3,i],{i,R}]
Length[R]==Length[opcion3]
Table[i->ElementRelBinQ[R, i],{i,opcion3}]

opcion4={{99,55},{85,13},{99,74},{85,100},{22,100},{100,45},{85,74},{99,99},{100,100},{80,80}};
Table[i->ElementRelBinQ[opcion4,i],{i,R}]
Length[R]==Length[opcion4]
Table[i->ElementRelBinQ[R, i],{i,opcion4}]

A=Range[-5,1000,3];
B=Range[5,998,3];

PC[A,B]//Length

Si solicitan el dominio A x B

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

A=Range[20];
R=RelBin["Mod[a^2+b^2,2]!=0&&a^3-b^3<=41",A,A]
Length[R]
DominioRelBin[R]
Length[DominioRelBin[R]]

OddQ[3]

A={0,4,5,7,9,10,12,13,16,19};
B={0,1,2,3,5,12,15,16};
H={1,4,9,13,14,17,18,19,21,22,23,24};
R1={{0,0},{5,5},{5,12},{12,0},{16,16}};
R2={{0,18},{0,24},{5,17},{12,19},{16,23}};
MR1=MatrizRelBin[R1,A,B][[1]];
MR2=MatrizRelBin[R2,B,H][[1]];

R=RelBinMatriz[ProductoBooleano[MR1, MR2][[1]],A,H]

R=RelacionComposicion[R2,R1]

opciones={{4,21},{10,24},{0,24},{7,21},{0,18},{5,17}};
Table[i->ElementRelBinQ[R,i],{i, opciones}]

A={44,62,24,98,85,43,68,35,69,77};
R=RelBin["Mod[a^2-b^2,5]==0",A,A]

ClasesEquivalencia[R,A]

A={29,18,1,65,68,69,12,17,59,23,32,21,49,38,2};
R=RelBin["Mod[a^2-1,b^2-1]==0",A,A]

ClasificacionRelBin[R,A]

?ClasificacionRelBin

ClasesEquivalencia[R,A]