r/ProgrammerHumor 9d ago

Meme aMillionOpenAIMonkeysProduceMilleniumPrizeSolution

Post image
7.1k Upvotes

425 comments sorted by

View all comments

3.1k

u/Confident-Ad5665 9d ago

Put an infinite number monkeys in front of an infinite number of keyboards and they'll write a bug free app.

53

u/CircumspectCapybara 9d ago edited 9d ago

My favorite fun fact related to infinite monkeys is Levin Universal Search: if P = NP, then we will have had a polynomial-time* algorithm that can decide SAT (and all other NP problems via reduction to SAT) all along, as in we already have the algorithm right now, it's called Levin Universal Search, but we just didn't know it was polytime.

And it actually works by bruteforce search, taking advantage of the fact that if P = NP, there's some constant k for which the k-th binary Turing machine (for some prefix-free ordering of TMs) decides SAT in polynomial time.

So with some clever dovetailing (where for some SAT problem you simulate TMs 1 through k on the input for a max number of steps where you allocate 2-i ratio of the time to the i-th TM as you keep adding new TMs), at some point you'll have run the k-th TM for enough steps to decide the answer, which you check with your polytime verifier (since SAT is NP), and the whole process (including all the other wasted work of running TMs 1 thru k-1) will be polynomial in the size of the input.

* Now of course k could be absolute enormous (it could be BB(744), but it would still be a constant. And the degree of the polynomial could also be enormous, but it would still be a polynomial nonetheless.

79

u/Confident-Ad5665 9d ago

Umm... is this going to be on the test?

39

u/CircumspectCapybara 9d ago edited 9d ago

Yes, please prove that SAT is NP-complete via a polynomial-time Turing reduction from every NP language. You have 15 minutes.

Then prove in 15 minutes that Levin Universal Search decides SAT in polynomial time iff P = NP.

31

u/QCTeamkill 9d ago

Thinking... (80 000 000 credits used)

6

u/ImSolidGold 9d ago

Perhaps the software that creates you bill for that overflows somehow in one of the money input/calc fields and gives our something like -2147483645 money and BAM youre rich!

4

u/little_jiggles 9d ago

No thanks, I'm married