[MINI] Sudoku \in NP
Data Skeptic10 Marras 2017

[MINI] Sudoku \in NP

Algorithms with similar runtimes are said to be in the same complexity class. That runtime is measured in the how many steps an algorithm takes relative to the input size.

The class P contains all algorithms which run in polynomial time (basically, a nested for loop iterating over the input). NP are algorithms which seem to require brute force. Brute force search cannot be done in polynomial time, so it seems that problems in NP are more difficult than problems in P. I say it "seems" this way because, while most people believe it to be true, it has not been proven. This is the famous P vs. NP conjecture. It will be discussed in more detail in a future episode.

Given a solution to a particular problem, if it can be verified/checked in polynomial time, that problem might be in NP. If someone hands you a completed Sudoku puzzle, it's not difficult to see if they made any mistakes. The effort of developing the solution to the Sudoku game seems to be intrinsically more difficult. In fact, as far as anyone knows, in the general case of all possible examples of the game, it seems no strategy can do better on average than just random guessing.

This notion of random guessing the solution is where the N in NP comes from: Non-deterministic. Imagine a machine with a random input already written in its memory. Given enough such machines, one of them will have the right answer. If they all ran in parallel, one of them could verify it's input in polynomial time. This guess / provided input is often called a witness string.

NP is an important concept for many reasons. To me, the most reason to know about NP is a practical one. Depending on your goals or the goals of your employer, there are many challenging problems you may attempt to solve. If a problem you are trying to solve happens to be in NP, then you should consider the implications very carefully. Perhaps you'll be lucky and discover that your particular instance of the problem is easy. Sudoku is pretty easy if only 2 remaining squares need to be filled in. The traveling salesman problem is easy to solve if you live in a country where all roads for a ring with exactly one road in and out.

If the problem you wish to solve is not trivial, or if you will face many instances of the problem and expect some will not be trivial, then it's unlikely you'll be able to find the exact solution. Sure, maybe you can grab a bunch of commodity servers and try to scale the heck out of your attempt. Depending on the problem you're solving, that might just work. If you can out-purchase your problem in computing power, then problems in NP will surrender to you. But if your input size ever grows, it's unlikely you'll be able to keep up.

If your problem is intractable in this way, all is not lost. You might be able to find an approximate solution to your problem. Good enough is better than no solution at all, right? Most of the time, probably. However, some tremendous work has also been done studying topics like this. Are there problems which are not even approximable in polynomial time? What approximation techniques work best? Alas, those answers lie elsewhere.

This episode avoids a discussion of a few key points in order to keep the material accessible. If you find this interesting, you should next familiarize yourself with the notions of NP-Complete, NP-Hard, and co-NP. These are topics we won't necessarily get to in future episodes. Michael Sipser's Introduction to the Theory of Computation is a good resource.

Tämä jakso on lisätty Podme-palveluun avoimen RSS-syötteen kautta eikä se ole Podmen omaa tuotantoa. Siksi jakso saattaa sisältää mainontaa.

Jaksot(601)

ML Ops in Production

ML Ops in Production

Moses Guttman from Clear ML joins us to share insights about how organizations leveraging machine learning keep their programs on track.  While many parallels exist between the software development li...

6 Loka 202241min

Ad Network Tomography

Ad Network Tomography

Data sharing in the ad tech space has largely been a black box system. While it is obvious the data is being collected, the data sharing process is obscure to users. On the show today, Maaz Bin Musa a...

3 Loka 202235min

First Party Tracking Cookies

First Party Tracking Cookies

When you accept cookies on a website, you cannot tell whether the cookies are used for tracking your personal data or not. Shaoor Munir's machine learning model does that. On the show today, the Ph.D ...

26 Syys 202235min

The Harms of Targeted Weight Loss Ads

The Harms of Targeted Weight Loss Ads

Liza Gak, a Ph.D. student at UC Berkeley, joins us to discuss her research on harmful weight loss advertising. She discussed how weight loss ads are not fact-checked, and how they typically target the...

19 Syys 202234min

Podcast Advertising

Podcast Advertising

Growing your podcast to the point of monetization is not a walk in the park. Today, Rob Walch, the VP of Podcast Relations at Libsyn talks about podcast advertising. He discussed how advertising works...

12 Syys 202235min

Fairness in e-Commerce Search

Fairness in e-Commerce Search

When we search for products in e-commerce stores, we do not care what goes on under the hood to generate the results. However, there may be an intentional algorithmic effort to gravitate us toward a p...

5 Syys 202240min

Fraudulent Amazon Reviewers

Fraudulent Amazon Reviewers

Chances are that you have bought a product online majorly because of the reviews you saw. Unfortunately, not all reviews are genuine. Today, Rajvardhan Oak shares some insight from his research on fra...

29 Elo 202241min

Ad Targeting in Amazon Smart Speakers

Ad Targeting in Amazon Smart Speakers

While we give attention to textual data on the web, many do not know the unique power of echo interactions with smart devices for ad targeting. Today, our guest, Umar Iqbal joins us to discuss his stu...

22 Elo 202232min

Suosittua kategoriassa Tiede

rss-poliisin-mieli
tiedekulma-podcast
rss-mita-tulisi-tietaa
docemilia
filocast-filosofian-perusteet
rss-tiedetta-vai-tarinaa
rss-lapsuuden-rakentajat-podcast
sotataidon-ytimessa
menologeja-tutkimusmatka-vaihdevuosiin
rss-duodecim-lehti
rss-lihavuudesta-podcast
radio-antro
rss-bios-podcast
rss-metsantuntijat-podcast
rss-luontopodi-samuel-glassar-tutkii-luonnon-ihmeita