8
\$\begingroup\$

This question asking us to make a "Cyclic Levenquine" has gone unanswered. So today we will ask a slightly simpler version. In this challenge we will define a K-Levenquine to be a program whose output is Levenshtein distance K from its source.

Task

Your goal in this challenge is to write a program with some output different from its own source; running that output as a program should also do the same. Eventually, the sequence of repeatedly running the outputs of each successive program (in the same language) must eventually output the original program.

As with the last challenge there must be two distinct programs in this cycle such that they do not share any two bytes (i.e. their byte sets are disjoint).

As with most challenges, reading your own source code is forbidden.

Scoring

Each program in your cycle will be a K-Levenquine for some K. The largest K of any of the programs in your cycle will be your score. Your goal should be to minimize this score, with 1 being the optimal score.

\$\endgroup\$
23
  • 5
    \$\begingroup\$ Possible duplicate of Cyclic Levenquine \$\endgroup\$ Commented Apr 17, 2019 at 17:35
  • 1
    \$\begingroup\$ I'm voting to keep this, because this challenge is easier, and the linked potential duplicate has only one answer. \$\endgroup\$
    – mbomb007
    Commented Aug 5, 2019 at 21:27
  • 2
    \$\begingroup\$ There is now a place to discuss this on meta: codegolf.meta.stackexchange.com/questions/17939/… \$\endgroup\$
    – Wheat Wizard
    Commented Aug 6, 2019 at 19:33
  • 1
    \$\begingroup\$ So, over one month after the applicable meta post was posted, there still has been no change to the duplicate policy to permit generalizations of existing challenges like this one. Even the asker of this challenge has agreed that it is a duplicate under the policy as currently worded. The policy must be enforced, and that means closing this challenge. \$\endgroup\$ Commented Sep 19, 2019 at 1:24
  • 1
    \$\begingroup\$ I disagree. Consensus hasn't been shown in either direction, and it's due to a lack of activity on the meta question. Post it in 19th byte to get activity. It's not going to hurt anything to leave this challenge open. \$\endgroup\$
    – mbomb007
    Commented Sep 19, 2019 at 14:09

1 Answer 1

3
\$\begingroup\$

><>, Score: 41

'd3*}>a!o-!<<8:5@lI55>@z:5ll55>>q:>|q::|,

and the disjoint program

"r00gr40g44++bb+0p64++?b6+0.22#eW4s )Z

Try it online!

A copy of my answer to the Mutually Exclusive Quine question. A mutually exclusive quine is made of two programs, A and B sharing no common characters, where A outputs B and B outputs A. This means it is a 2-cycle Levenquine and also qualifies for this question. This can act as a baseline for other more inventive answers (though I'm not very confidant this won't go the way of the original Levenquine question).

A more detailed explanation can be found here.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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