X := "xyzt";
Ordering := "LLEX";
Relations:=[];
F1 := [[1,"xx"], [-1,"yx"]];
F2 := [[1,"xy"], [-1,"ty"]];
F3 := [[1,"xt"], [-1, "tx"]];
F4 := [[1,"yt"], [-1, "ty"]];
G := [F1, F2,F3,F4];
NC.MRGB(X, Ordering, Relations, G);
[[[1, "yt"], [-1, "ty"]], [[1, "xt"], [-1, "tx"]], [[1, "xy"], [-1, "ty"]], [[1, "xx"], [-1, "yx"]],
[[1, "tyy"], [-1, "tty"]], [[1, "yyx"], [-1, "tyx"]]]
-------------------------------
X := "abc";
Ordering := "LLEX";
Relations := [["aa",""], ["bb",""], ["ab","c"], ["ac", "b"], ["cb", "a"]];
F1 := [[1,"a"], [1,"b"], [1,"c"]];
F2 := [[1,"b"]];
G := [F1, F2];
NC.MRGB(X, Ordering, Relations, G);
[[[1, "b"]], [[1, "a"], [1, "b"], [1, "c"]]]
-------------------------------
|