0
$\begingroup$

Problem

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

Known

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

Unknown

  • 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.

$\endgroup$
  • 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
2
$\begingroup$

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

B>A>D>C,

so we can

fill out the rest accordingly,

and that gives you exactly

[ 'A=<>>', 'B>=>>', 'C<<=<', 'D<<>=' ]
$\endgroup$
  • $\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.