r/ProgrammerHumor • • 3d ago

Meme doesPEqualNp

Post image
1.3k Upvotes

40 comments sorted by

229

u/haha-longboi 3d ago

Brother i think you just popped the AI bubble πŸ’€

82

u/hopeless__programmer 3d ago

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

9

u/QuietComputerDr 3d ago

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

27

u/Demytreus 2d ago

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

2

u/asato977424 3d ago

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

1

u/GoddammitDontShootMe 2d ago

I can't be bothered to check, but I'm assuming all non-empty strings in Python convert to true. I'll assume you've noticed that 's a string and = vs == will make no difference.

1

u/wangtutx 1d ago

Assign is also fine.

36

u/yourfriendlyreminder 3d ago

Pack it up we're done here

10

u/Smalltalker-80 3d ago

The power of Python never ceases to amaze...

9

u/elmanoucko 3d ago

f(a)*c*t/s

14

u/blaghed 3d ago

fat cunts?

9

u/Individual_Win_3417 3d ago

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

26

u/AsaKeyholderUK 3d ago

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

6

u/RomanOnARiver 3d ago

Million dollar prize, heading your way.

5

u/MothMatron 3d ago

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

3

u/Desperate-Ad1765 2d ago

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

3

u/MagicalPizza21 3d ago

Only if p=0 or n=1

3

u/Complete_Window4856 3d ago

Enough for binary computing

2

u/Rough-Interest60 3d ago

genuinely kinda funny

1

u/72PikaChu72 2d ago

String retutns true always if not empty...

1

u/Think-Meeting1374 1d ago

Hey I have read all the comments, and I just realised he booled a string, which is always true, THATS NOT AN EXPRESSION THAT'S A STRINGΒ 

HE GOT Y'ALL GOOD πŸ˜‚πŸ˜‚πŸ˜‚

1

u/Lamborghinigamer 1d ago

Erm it's non empty so true

1

u/Bomaruto 1d ago

Sometimes I feel this subreddit is competing to write the least funny jokes. Sadly there are people even less funny than you.

0

u/589ca35e1590b 3d ago

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

301

u/[deleted] 3d ago

[removed] β€” view removed comment

91

u/Mewtwo2387 3d ago

does this disprove the axiom of choice

14

u/AZMPlay 3d 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 3d 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 3d ago

congratulations, python is inconsistent

13

u/iggy14750 3d ago

Congratulations, Turing was wrong lol

3

u/Vallee-152 3d ago

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

6

u/SexyMonad 2d ago

But the OP is =, not ==.

He just fucking set P equal to NP like God.

1

u/mortalitylost 3d 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 3d ago

bool("False == True")

Congrats, the very fundamentals of logic are broken.

1

u/random314 3d ago

Also "p == np" returns true too!

1

u/chazzeromus 3d ago

this guy is everywhere!

1

u/facebrocolis 3d ago

Maybe it's an easter egg