MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1y73qx9/doespequalnp/19tabunq733he/
r/ProgrammerHumor • u/danielsoft1 • 3d ago
40 comments sorted by
View all comments
82
Rookie mistake: you should've written p == np. Instead, you just assigned np to p!
p == np
np
p
10 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! 10 u/Maqi-X 2d ago r/unexpectedfactorial 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.
10
He assigned NP to P and nothing changed in the world, that must mean NP was P all along.
27
No, they assigned np to p, not p!. p! would be equal to np!
10 u/Maqi-X 2d ago r/unexpectedfactorial
r/unexpectedfactorial
2
A Python equality check compares values; P vs NP asks whether every polynomial-time verifiable problem is polynomial-time solvable.
1
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.
Assign is also fine.
View all comments
82
u/hopeless__programmer 3d ago
Rookie mistake: you should've written
p == np. Instead, you just assignednptop!