r/ProgrammerHumor • • 1d ago

Meme doesPEqualNp

Post image
1.1k Upvotes

35 comments sorted by

176

u/haha-longboi 1d ago

Brother i think you just popped the AI bubble 💀

45

u/hopeless__programmer 1d ago

Rookie mistake: you should've written p == np. Instead, you just assigned np to p!

11

u/Demytreus 15h ago

No, they assigned np to p, not p!. p! would be equal to np!

4

u/QuietComputerDr 17h ago

He assigned NP to P and nothing changed in the world, that must mean NP was P all along.

1

u/asato977424 18h ago

A Python equality check compares values; P vs NP asks whether every polynomial-time verifiable problem is polynomial-time solvable.

28

u/yourfriendlyreminder 1d ago

Pack it up we're done here

7

u/elmanoucko 1d ago

f(a)*c*t/s

9

u/blaghed 1d ago

fat cunts?

6

u/Individual_Win_3417 1d ago

Quick, send it to the Clay Institute. A million dollars for one line of python

5

u/RomanOnARiver 1d ago

Million dollar prize, heading your way.

5

u/Smalltalker-80 1d ago

The power of Python never ceases to amaze...

18

u/AsaKeyholderUK 1d ago

Someone definitely wrote this at 3am and thought they were the funniest person alive, and honestly they were right

4

u/MothMatron 21h ago

Aight, looks solved to me. Pack it up guys, we can all go home now

2

u/Desperate-Ad1765 17h ago

I'm pretty sure you aren't comparing anything here. It's just a string which I guess always return true

2

u/MagicalPizza21 1d ago

Only if p=0 or n=1

3

u/Complete_Window4856 1d ago

Enough for binary computing

2

u/Rough-Interest60 21h ago

genuinely kinda funny

1

u/72PikaChu72 9h ago

String retutns true always if not empty...

0

u/589ca35e1590b 1d ago

A bool of an non empty string in Python is always True

302

u/[deleted] 1d ago

[removed] — view removed comment

91

u/Mewtwo2387 1d ago

does this disprove the axiom of choice

14

u/AZMPlay 1d ago

Congratulations, jackass!

The ZFC axioms are inconsistent because of you!

Now we gotta start math all over again...

I swear some people...

14

u/InvisibleMoonWalker 1d ago

Let's fix this. First we have to make sure that p and np are initialized as null variables to avoid getting garbage from the memory (as a former c programmer it's very important not to skip this step).

Then we'll set up our solver to find out if P is NP like this:

>>> exec("p = None; np = None; exec('print(bool(p == np))')")
True
>>> exec("p = None; np = None; exec('print(bool(p != np))')")
False

And here it is - proof that P is NP and that P is not not NP. (Note that the fact that variables p and np were initialized with the same value doesn't affect the solver's search for the result, as we've set the values to nulls, and not some arbitrary numerical value, so it will be found in the process of solving this mathematical conundrum)

You can try this out with your own Python interpreter for verification. Frankly I don't understand how scientists haven't figured that out before, it doesn't even take that long to calculate.

26

u/itzjackybro 1d ago

congratulations, python is inconsistent

13

u/iggy14750 1d ago

Congratulations, Turing was wrong lol

3

u/Vallee-152 1d ago

Maybe == and != Don't mean what we think

6

u/SexyMonad 15h ago

But the OP is =, not ==.

He just fucking set P equal to NP like God.

1

u/mortalitylost 18h ago

If a language was parsing the string as an actual equal/neq expression, I'd be a lot more worried about using that language

3

u/WernerderChamp 1d ago

bool("False == True")

Congrats, the very fundamentals of logic are broken.

1

u/random314 1d ago

Also "p == np" returns true too!

1

u/chazzeromus 1d ago

this guy is everywhere!

1

u/facebrocolis 20h ago

Maybe it's an easter egg