60
10
NOTICE - This challenge is now closed. Any new answers will be ignored and the accepted answer will not change
Challenge
Write a valid program which, when just two characters in the program are changed, removed or added, completely changes the output.
The changed output must have a Levenshtein Distance of 15 or more from your original output.
The output must be non empty and finite. Your program therefore must terminate within 1 minute.
Your output must be deterministic, outputting the same thing each time you run the program. It also must not be platform dependent.
Any hash functions are disallowed, as are built in PRNGs. Similarly, seeding an RNG is not allowed.
After a period of three days, an uncracked submission will become safe. In order to claim this safety, you should edit your answer to show the correct answer. (Clarification: Until you reveal the answer, you are not safe and can still be cracked.)
Formatting
Your answer should be in the following format:
# <Language name>, <Program length>
## Code
<code goes here>
## Original Output
<output goes here>
## Changed output
<changed output goes here>
Robbers
The robbers' challenge is to find out which two characters you have changed. If a robber has cracked your solution, they will leave a comment on your answer.
You can find the robbers' thread here.
Winning
The person with the shortest uncracked solution wins.
Leaderboard
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><script>site = 'meta.codegolf';postID = 5686;isAnswer = false;QUESTION_ID = 54464;var safe_list=[];var uncracked_list=[];var n=0;var bycreation=function(x,y){return (x[0][0]<y[0][0])-(x[0][0]>y[0][0]);};var bylength=function(x,y){return (x[0][1]>y[0][1])-(x[0][1]<y[0][1]);};function u(l,o){ jQuery(l[1]).empty(); l[0].sort(o); for(var i=0;i<l[0].length;i++) l[0][i][1].appendTo(l[1]); if(l[0].length==0) jQuery('<tr><td colspan="3" class="message">none yet.</td></tr>').appendTo(l[1]);}function g(p) { jQuery.getJSON('//api.stackexchange.com/2.2/questions/' + QUESTION_ID + '/answers?page=' + p + '&pagesize=100&order=desc&sort=creation&site=codegolf&filter=!.Fjs-H6J36w0DtV5A_ZMzR7bRqt1e', function(s) { s.items.map(function(a) { var he = jQuery('<div/>').html(a.body).children().first(); he.find('strike').text(''); var h = he.text(); if (!/cracked/i.test(h) && (typeof a.comments == 'undefined' || a.comments.filter(function(b) { var c = jQuery('<div/>').html(b.body); return /^cracked/i.test(c.text()) || c.find('a').filter(function() { return /cracked/i.test(jQuery(this).text()) }).length > 0 }).length == 0)) { var m = /^\s*((?:[^,;(\s]|\s+[^-,;(\s])+)\s*(?:[,;(]|\s-).*?([0-9]+)/.exec(h); var e = [[n++, m ? parseInt(m[2]) : null], jQuery('<tr/>').append( jQuery('<td/>').append( jQuery('<a/>').text(m ? m[1] : h).attr('href', a.link)), jQuery('<td class="score"/>').text(m ? m[2] : '?'), jQuery('<td/>').append( jQuery('<a/>').text(a.owner.display_name).attr('href', a.owner.link)) )]; if(/safe/i.test(h)) safe_list.push(e); else uncracked_list.push(e); } }); if (s.length == 100) g(p + 1); else { var s=[[uncracked_list, '#uncracked'], [safe_list, '#safe']]; for(var p=0;p<2;p++) u(s[p],bylength); jQuery('#uncracked_by_length').bind('click',function(){u(s[0],bylength);return false}); jQuery('#uncracked_by_creation').bind('click',function(){u(s[0],bycreation);return false}); } });}g(1);</script><link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b"><style>table th,table td { padding: 5px;}th { text-align: left;}.score { text-align: right;}table a { display: block;}.main { float: left; margin-right: 30px;}.main h3,.main div { margin: 5px;}.message { font-style: italic;}</style><div class="main"><h3>Uncracked submissions</h3><table> <tr> <th>Language</th> <th class="score">Length</th> <th>User</th> </tr> <tbody id="uncracked"></tbody></table><div>Sort by: <a href="#" id="uncracked_by_length">length</a> <a href="#" id="uncracked_by_creation">creation</a></div></div><div class="main"><h3>Safe submissions</h3><table> <tr> <th>Language</th> <th class="score">Length</th> <th>User</th> </tr> <tbody id="safe"></tbody></table></div>
@BetaDecay How do you define a hash function? – isaacg – 2015-08-11T08:47:08.947
Can't one brute force every possible change? – xnor – 2015-08-11T08:47:26.917
1@xnor Theoretically, but the number of possibilities increases hugely as the program length increases and so may take a long time – Beta Decay – 2015-08-11T08:48:46.443
@isaacg A function which finds the hash value of an object
– Beta Decay – 2015-08-11T08:54:31.023@BetaDecay I think the problem might be that the shortest uncracked solution is the winner but the shortest solutions are also the easiest to brute force – Fatalize – 2015-08-11T09:28:28.923
I so want to do a very long brainfuck one just to laugh while people get crazy.. – RedPanda – 2015-08-11T10:19:05.290
@RedPanda Go for it ;) – Beta Decay – 2015-08-11T10:19:34.617
I guess changing the place of a character counts as one removed + one added? – RedPanda – 2015-08-11T10:27:12.250
1@RedPanda Yes, I would think so – Beta Decay – 2015-08-11T10:34:23.970
Just to clarify, must the program always have the same output if any two characters are changed other than the chosen two? Or just that the desired new output is only achieved by changing those two characters? – StephenTG – 2015-08-11T12:55:06.943
@StephenTG Not the OP, but I would assume that as long as you can get the same output, the crack is valid even if it's not the exact same changes as the poster. Or at least that's the case with most other cops and robbers. – Sp3000 – 2015-08-11T13:07:52.867
Do you have to change 2 characters? Can I only change 1 character if I want to? – Blue – 2015-08-11T13:17:19.177
@BetaDecay How long until submissions are safe? – Dennis – 2015-08-11T16:35:58.893
@Dennis One day – Beta Decay – 2015-08-11T18:34:46.780
@muddyfish No, it has to be 2 characters – Beta Decay – 2015-08-11T18:51:46.243
@BetaDecay So, If a submission goes uncracked for 24 hours, should the poster post the solution to make it safe? If so, can you add that to the OP? – isaacg – 2015-08-12T07:26:41.887
5@isaacg I decided to change the safe date to three days – Beta Decay – 2015-08-12T07:37:03.613
@StewieGriffin Nope – Beta Decay – 2015-08-12T13:37:00.333
@StewieGriffin Yes, of course :) have a look at isaacg's many answets – Beta Decay – 2015-08-12T14:25:38.853
4Would it be possible to put the leaderboard code on fewer lines so it takes up less visual room? – isaacg – 2015-08-13T00:49:53.850
The brainfuck code by kurousagi was cracked a long time ago... Someone should update it – AboveFire – 2015-08-13T11:44:01.233
@AboveFire Until Kurousagi acknowledges the crack, we can't make the snippet change unfortunately – Beta Decay – 2015-08-13T11:49:45.027
@AboveFire Was it cracked with the correct unprintables? Last we heard he was going to find a way to add the unprintables or something to that effect, then, radio silence. – Alex Van Liew – 2015-08-13T17:10:18.937
Brute forcing has complexity O(N^2), although the constant can admittedly be pretty large. – jcai – 2015-08-13T17:38:40.127
"No, it has to be 2 characters" In that case, would adding a single space plus one "real" change be allowed? In most programming languages whitespace is insignificant, so one can easily go from "2 characters" to "1 [effective] character" if this is allowed.
– mgibsonbr – 2015-08-13T18:13:48.013I want to do this in Marbelous. – Not that Charles – 2015-08-14T18:24:44.310
"No, it has to be 2 characters" - There's a woolly thing. One removal, and one adjacent insert effectively changes one char. One change and one adjacent removal effectively removes one char. One add and one adjacent replacement effectively adds one char. So, at least until rules are clarified to exclude this loophole, I'd argue that you can effectively affect only one character, so long as you CALL it two characters. – Dewi Morgan – 2015-08-15T06:33:51.787