Fix more typos
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Anthony Wang 2023-11-09 17:51:04 +00:00
parent 3578324239
commit 5bc9617dbb
Signed by: a
SSH key fingerprint: SHA256:B5ADfMCqd2M7d/jtXDoihAV/yfXOAbWWri9+GdCN4hQ

View file

@ -74,7 +74,7 @@ d d
D d D d
``` ```
If the solution maps each phonetic letter to the uppercase or lowercase version, then the edit distance sum will be 4. Otherwise, if they try something bad, their sum will be even worse. If the solution maps each phonetic letter to the uppercase or lowercase version, then the edit distance sum will be 4. Otherwise, if they try something else, their sum will be even worse.
For the clauses, we would like a clause to be true if any one of the three variables inside is true since that's how `||` works, so we'd like a word to have a low edit distance if the letters of it are "true". I thought about this for a long time last night while trying to fall asleep and here's what I came up with: For the clauses, we would like a clause to be true if any one of the three variables inside is true since that's how `||` works, so we'd like a word to have a low edit distance if the letters of it are "true". I thought about this for a long time last night while trying to fall asleep and here's what I came up with:
@ -147,7 +147,7 @@ By the way, I haven't spent a lot of time verifying that this proof sketch is 10
Alright, so we just proved that spelling reform is NP-hard. So what? Alright, so we just proved that spelling reform is NP-hard. So what?
There's a famous open problem in computer science called the P versus NP problem (with a one million dollar prize!). We haven't defined *P* yet, but it's simply the class of all decision problems that can be solved in polynomial time. Easy as that. The question is whether or not P is the same class as NP. Obviously, P is inside NP, because we can easily check a solution by ignoring the solution that's being offered to us and just finding a solution ourselves. However, no one knows yet if problems that are easy to check are also easy to solve. If this is true and P equals NP, then a ton of hard problems are actually easy and solvable in polynomial time. This is pretty crazy, since NP contains some famous hard problems like the Traveling Salesman Problem and factoring that people have spent mounds of effort trying and failing to come up with polynomial time algorithms for. But it would take finding a polynomial time algorithm to just one NP-complete problem to prove that P equals NP, since if one of the hardest problems in NP is solvable in polynomial time, then they all are. Most people believe that P does not equal NP because of the crazy consequences of P equals NP, but there are some [notable people who disagree](/posts/ainion#donald-knuth-proving-p-equals-np-by-executing-all-computer-scientists-who-disagree). There's a famous open problem in computer science called the P versus NP problem (with a one million dollar prize!). We haven't defined **P** yet, but it's simply the class of all decision problems that can be solved in polynomial time. Easy as that. The question is whether or not P is the same class as NP. Obviously, P is inside NP, because we can easily check a solution by ignoring the solution that's being offered to us and just finding a solution ourselves. However, no one knows yet if problems that are easy to check are also easy to solve. If this is true and P equals NP, then a ton of hard problems are actually easy and solvable in polynomial time. This is pretty crazy, since NP contains some famous hard problems like the Traveling Salesman Problem and factoring that people have spent mounds of effort trying and failing to come up with polynomial time algorithms for. But it would take finding a polynomial time algorithm to just one NP-complete problem to prove that P equals NP, since if one of the hardest problems in NP is solvable in polynomial time, then they all are. Most people believe that P does not equal NP because of the crazy consequences of P equals NP, but there are some [notable people who disagree](/posts/ainion#donald-knuth-proving-p-equals-np-by-executing-all-computer-scientists-who-disagree).
OK, that's some fascinating theoretical CS, but why should we care? Well, taking the common view that P does not equal NP, that means that NP-hard problems do not have fast, polynomial time algorithms. We can't possibly solve them efficiently. Once we prove a problem is NP-hard, then we can shift from searching for efficient exact algorithms to finding heuristics, or approximation algorithms, or algorithms that perform well for typical or random inputs but struggle with some specific contrived inputs that you'll never see in practice. Or maybe it's even a sign that we should change or simplify the problem that we're trying to solve! Also, if you spend all day thinking about finding algorithms for solving a problem quickly, then pondering how to prove a problem hard can give you an interesting new perspective on the problem. OK, that's some fascinating theoretical CS, but why should we care? Well, taking the common view that P does not equal NP, that means that NP-hard problems do not have fast, polynomial time algorithms. We can't possibly solve them efficiently. Once we prove a problem is NP-hard, then we can shift from searching for efficient exact algorithms to finding heuristics, or approximation algorithms, or algorithms that perform well for typical or random inputs but struggle with some specific contrived inputs that you'll never see in practice. Or maybe it's even a sign that we should change or simplify the problem that we're trying to solve! Also, if you spend all day thinking about finding algorithms for solving a problem quickly, then pondering how to prove a problem hard can give you an interesting new perspective on the problem.