• I need help determining the algorithm for converting the input (question) to the desired output (solution).


  • Solved so far is the equals placement i.e. A---> converts to A=-->


  • I need to figure out how the dashes become arrows.

Input/Desired output

    question: [ 'A--->', 'B>---', 'C---<', 'D---=' ],
    solution: [ 'A=<>>', 'B>=>>', 'C<<=<', 'D<<>=' ]
    question: [ 'A--->', 'B---<', 'C>---', 'D---=' ],
    solution: [ 'A=><>', 'B<=<<', 'C>>=>', 'D<><=' ]
    question: [ 'A--->', 'B-=--', 'C-<--', 'D->--' ],
    solution: [ 'A=>>>', 'B<=><', 'C<<=<', 'D<>>=' ]
    question: [ 'A->--', 'B-=--', 'C>---', 'D-<--' ],
    solution: [ 'A=><>', 'B<=<>', 'C>>=>', 'D<<<=' ]
    question: [ 'A-->-', 'B-=--', 'C->--', 'D-<--' ],
    solution: [ 'A=>>>', 'B<=<>', 'C<>=>', 'D<<<=' ]
    question: [ 'A-->-', 'B---<', 'C--->', 'D---=' ],
    solution: [ 'A=>>>', 'B<=<<', 'C<>=>', 'D<><=' ]
    question: [ 'A--<-', 'B--->', 'C--=-', 'D-->-' ],
    solution: [ 'A=<<<', 'B>=>>', 'C><=<', 'D><>=' ]
    question: [ 'A---<', 'B-->-', 'C--->', 'D---=' ],
    solution: [ 'A=<<<', 'B>=>>', 'C><=>', 'D><<=' ]

Any help or guidance will be appreciated.


closed as off-topic by Jaap Scherphuis, JMP, Glorfindel, Peregrine Rook, QuantumTwinkie Oct 19 '18 at 20:39

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This looks like a puzzle you found elsewhere. For content you did not create yourself, proper attribution is required. If you have permission to repost this, please edit to include (at minimum) where it came from, then vote to reopen. Posts which use someone else's content without attribution are generally deleted." – Jaap Scherphuis, Glorfindel, QuantumTwinkie
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    $\begingroup$ Welcome to Puzzling SE! Is this question form an outside source? If so please ensure that you have permission to post the question here. If you are allowed to share this question on this site please include the source in the question. $\endgroup$ – gabbo1092 Oct 19 '18 at 16:19

I haven't gone through all, but it seems, these are

literally greater-than and less-than relations between the four variables A, B, C, and D, just as noted usually.

For example, the first question of

[ 'A--->', 'B>---', 'C---<', 'D---=' ]

should be read as

A is greater than D (D is the 4th variable, and the relation sign is in the 4th column)
B is greater than A
C is less than D
D equals D

Using these we know


so we can

fill out the rest accordingly,

and that gives you exactly

[ 'A=<>>', 'B>=>>', 'C<<=<', 'D<<>=' ]
  • $\begingroup$ A quick glance over all the others and your answer seems to be correct and works for them also. $\endgroup$ – 5202456 Oct 19 '18 at 20:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.