One of my friends asked me this.. What does this represent? Some string?
A B C D
A = > < >
B < = < <
C > > = >
D < > < =
the only thing I have been able to get till now is C>A>D>B
|
One of my friends asked me this.. What does this represent? Some string?
the only thing I have been able to get till now is C>A>D>B |
||||
|
|
Questions on Programming Puzzles & Code Golf Stack Exchange are expected to relate to programming puzzle or code golf within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.
|
It represents a strict linear order on the set whose elements are A,B,C,D. A simple program can extract the order in "linear form" from such a matrix, e.g. by coding <,=,> as 1,0,-1 respectively, and A,B,C,D,... as 0,1,2,3,... respectively. Here's the program from the link, applied to your question:
This produces the output
which represents
NB: The given matrix is interpreted such that the symbols in the first row |
||||
|
|