New answers tagged

1 vote

How can I construct an equivalence relation in the form of a 0-1 matrix from a set partition?

The code ...
Mariano Suárez-Álvarez's user avatar
4 votes
Accepted

How can I construct an equivalence relation in the form of a 0-1 matrix from a set partition?

You can first create all pairs of elements in each of the equivalence classes by Tuples, then feed these indices to a SparseArray...
Domen's user avatar
  • 21.8k
0 votes

How can I construct an equivalence relation in the form of a 0-1 matrix from a set partition?

Should your example not read: {{1,0,0,1},{0,1,1,0},{0,1,1,0},{0,0,0,1}} If yes, you may write: ...
Daniel Huber's user avatar
  • 49.9k
1 vote

Tuples of elements from list excluding anything with repeated values

list = Tuples[{a, b, s, t}, 3]; Using Select and CountDistinct: ...
E. Chan-López's user avatar
1 vote

Tuples of elements from list excluding anything with repeated values

list = Tuples[{a, b, s, t}, 3]; Using SequenceSplit (new in 11.3) with ...
eldo's user avatar
  • 60.4k

Top 50 recent answers are included