Happy Birthday, Alokananda!

Today is Alokananda's birthday .

As a tribute, Agnishom plans to generate a BF program that outputs the string Happy Birthday!

He sees that the following program would be the simplest for him to understand: link .

But then after playing around a bit, he discovers that is too profuse and can be done with a simpler code:

1
-[------->+<]>-.[--->++++<]>+.-[++>-----<]>..+++++++++.-[---->+<]>++.+[->++<]>.-[--->+<]>--.+++++++++.++.------------.----.---.+[--->+<]>+++.-[---->+<]>+++.

This inspires him to find the shortest BF program that prints Happy Birthday! .

In general, he is willing to write a (Python) program that outputs the shortest BF program that prints a given string.

Will he succeed?

Assume we are running BF on an infinite cell memory and furthermore, our brains are not super-turing.

No, he is attempting the impossible. Yes, but it will take exponential time anyway. Yes, but it will take exponential time unless P=NP. No, BF cannot output all computable strings.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

What Agnishom is attempting to do is to determine the Kolmogorov Complexity of a string relative to bf.

This is not computable by a Turing Machine.

(Proof coming soon)

Waiting for the proof desperately!

Lokesh Sharma - 6 years ago

Log in to reply

@Lokesh Sharma , See the Kolmogorov Complexity wiki

I am writing an wiki on Kolmogorov Complexity. I'll post the proof there soon.

For now, please see: Wikipedia

This is actually a more formal form for Berry's Paradox

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...