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.


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.


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.

  • \$\begingroup\$ Just for clarity, each of the programs should be in the same language, correct? \$\endgroup\$ – FryAmTheEggman Jan 22 '18 at 20:44
  • \$\begingroup\$ @FryAmTheEggman yes \$\endgroup\$ – Sriotchilism O'Zaic Jan 22 '18 at 20:45
  • 3
    \$\begingroup\$ Possible duplicate of Cyclic Levenquine \$\endgroup\$ – pppery Apr 17 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 Aug 5 at 21:27
  • 1
    \$\begingroup\$ There is now a place to discuss this on meta: codegolf.meta.stackexchange.com/questions/17939/… \$\endgroup\$ – Sriotchilism O'Zaic Aug 6 at 19:33

><>, Score: 41


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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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