# complexity theory

Published articles for complexity theory.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## NP-hard does not mean hard

DevFeed: [NP-hard does not mean hard](<https://devfeed.tech/articles/np-hard-does-not-mean-hard-40418.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2017/12/29/np-hard-does-not-mean-hard/>)

Published: 2017-12-29T13:30:23Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Algorithms, Complexity](<https://devfeed.tech/topics/algorithms-complexity.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [algorithms](<https://devfeed.tech/tags/algorithms.md>), [boolean](<https://devfeed.tech/tags/boolean.md>), [completeness](<https://devfeed.tech/tags/completeness.md>), [complexity-theory](<https://devfeed.tech/tags/complexity-theory.md>), [logic](<https://devfeed.tech/tags/logic.md>), [mario](<https://devfeed.tech/tags/mario.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [np-completeness](<https://devfeed.tech/tags/np-completeness.md>), [np-hard](<https://devfeed.tech/tags/np-hard.md>), [problems](<https://devfeed.tech/tags/problems.md>), [real-world](<https://devfeed.tech/tags/real-world.md>), [regular-languages](<https://devfeed.tech/tags/regular-languages.md>), [solve](<https://devfeed.tech/tags/solve.md>), [time](<https://devfeed.tech/tags/time.md>)

### AI overview

This article explains that NP-hardness is a worst-case mathematical property, not a claim that a problem is always difficult for humans or algorithms. Using Super Mario as an example, it shows how game levels can encode boolean logic and why solving the game in full generality would encompass hard computational problems, while ordinary real-world levels may still be solvable efficiently.

### Source excerpt

When NP-hardness pops up on the internet, say because some silly blogger wants to write about video games, it's often tempting to conclude that the problem being proved NP-hard is actually very hard! "Scientists proved Super Mario is NP-hard? I always knew there was a reason I wasn't very good at it!" Sorry, these two are unrelated. NP-hardness means hard in a narrow sense this post should hopefully make clear. After that, we'll explore what "hard" means in a mathematical sense that you can apply beyond NP-hardness to inform your work as a programmer.

## Zero Knowledge Proofs -- A Primer

DevFeed: [Zero Knowledge Proofs -- A Primer](<https://devfeed.tech/articles/zero-knowledge-proofs-a-primer-40400.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2016/07/05/zero-knowledge-proofs-a-primer/>)

Published: 2016-07-05T08:00:29Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Zero-knowledge proof](<https://devfeed.tech/topics/zkp.md>), [zero-knowledge](<https://devfeed.tech/topics/zero-knowledge.md>), [Graphs](<https://devfeed.tech/topics/graphs.md>), [Algorithm](<https://devfeed.tech/topics/algorithm.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [complexity-theory](<https://devfeed.tech/tags/complexity-theory.md>), [cryptography](<https://devfeed.tech/tags/cryptography.md>), [graph](<https://devfeed.tech/tags/graph.md>), [graph-isomorphism](<https://devfeed.tech/tags/graph-isomorphism.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [programming](<https://devfeed.tech/tags/programming.md>), [python](<https://devfeed.tech/tags/python.md>), [simulator](<https://devfeed.tech/tags/simulator.md>), [zero-knowledge](<https://devfeed.tech/tags/zero-knowledge.md>)

### AI overview

This primer explains zero-knowledge proofs through the graph isomorphism problem. It introduces the roles of the prover, verifier, and simulator, and describes graph isomorphism using vertex-label permutations.

### Source excerpt

In this post we'll get a strong taste for zero knowledge proofs by exploring the graph isomorphism problem in detail. In the next post, we'll see how this relates to cryptography and the bigger picture. The goal of this post is to get a strong understanding of the terms "prover," "verifier," and "simulator," and "zero knowledge" in the context of a specific zero-knowledge proof. Then next time we'll see how the same concepts (though not the same proof) generalizes to a cryptographically interesting setting.

## Parameterizing the Vertex Cover Problem

DevFeed: [Parameterizing the Vertex Cover Problem](<https://devfeed.tech/articles/parameterizing-the-vertex-cover-problem-40363.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2014/08/25/parameterizing-the-vertex-cover-problem/>)

Published: 2014-08-25T06:50:11Z

Content type: article

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Algorithms, Complexity](<https://devfeed.tech/topics/algorithms-complexity.md>), [Graphs](<https://devfeed.tech/topics/graphs.md>), [Math and Logic](<https://devfeed.tech/topics/math-and-logic.md>)

Tags: [algorithms](<https://devfeed.tech/tags/algorithms.md>), [complexity](<https://devfeed.tech/tags/complexity.md>), [complexity-theory](<https://devfeed.tech/tags/complexity-theory.md>), [computational-complexity](<https://devfeed.tech/tags/computational-complexity.md>), [conferences](<https://devfeed.tech/tags/conferences.md>), [fixed-parameter-tractability](<https://devfeed.tech/tags/fixed-parameter-tractability.md>), [graph](<https://devfeed.tech/tags/graph.md>), [kernel](<https://devfeed.tech/tags/kernel.md>), [kernelization](<https://devfeed.tech/tags/kernelization.md>), [np-hard](<https://devfeed.tech/tags/np-hard.md>), [vertex-cover](<https://devfeed.tech/tags/vertex-cover.md>)

### AI overview

This article introduces fixed-parameter complexity and explains how fixing a small parameter can make some hard problems tractable. It focuses on kernelization and uses the vertex cover problem as a canonical example, though the supplied text ends before the kernelization method is presented.

### Source excerpt

I'm presenting a paper later this week at the Matheamtical Foundations of Computer Science 2014 in Budapest, Hungary. This conference is an interesting mix of logic and algorithms that aims to bring together researchers from these areas to discuss their work. And right away the first session on the first day focused on an area I know is important but have little experience with: fixed parameter complexity. From what I understand it's not that popular of a topic at major theory conferences in the US (there appears to be only one paper on it at this year's FOCS conference), but the basic ideas are worth knowing.

## Miller-Rabin Primality Test

DevFeed: [Miller-Rabin Primality Test](<https://devfeed.tech/articles/miller-rabin-primality-test-40323.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2013/06/16/miller-rabin-primality-test/>)

Published: 2013-06-16T18:55:40Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [Algorithms, Complexity](<https://devfeed.tech/topics/algorithms-complexity.md>), [Cryptography](<https://devfeed.tech/topics/cryptography.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [algorithms](<https://devfeed.tech/tags/algorithms.md>), [complexity-theory](<https://devfeed.tech/tags/complexity-theory.md>), [computational-complexity](<https://devfeed.tech/tags/computational-complexity.md>), [cryptography](<https://devfeed.tech/tags/cryptography.md>), [miller-rabin](<https://devfeed.tech/tags/miller-rabin.md>), [primes](<https://devfeed.tech/tags/primes.md>), [probabilistic](<https://devfeed.tech/tags/probabilistic.md>), [programming](<https://devfeed.tech/tags/programming.md>), [python](<https://devfeed.tech/tags/python.md>), [random-number-generators](<https://devfeed.tech/tags/random-number-generators.md>), [randomized-algorithm](<https://devfeed.tech/tags/randomized-algorithm.md>), [rsa](<https://devfeed.tech/tags/rsa.md>)

### AI overview

This tutorial explains the Miller-Rabin primality test, including its probabilistic error bound, Python implementation, and role in testing whether numbers are prime. It also discusses the algorithm's relevance to cryptography and complexity theory.

### Source excerpt

Problem: Determine if a number is prime, with an acceptably small error rate. Solution: (in Python) import random def decompose(n): exponentOfTwo = 0 while n % 2 == 0: n = n/2 exponentOfTwo += 1 return exponentOfTwo, n def isWitness(possibleWitness, p, exponent, remainder): possibleWitness = pow(possibleWitness, remainder, p) if possibleWitness == 1 or possibleWitness == p - 1: return False for _ in range(exponent): possibleWitness = pow(possibleWitness, 2, p) if possibleWitness == p - 1: return False return True def probablyPrime(p, accuracy=100): if p == 2 or p == 3: return True if p < 2: return False exponent, remainder = decompose(p - 1) for _ in range(accuracy): possibleWitness = random.

## Kolmogorov Complexity--A Primer

DevFeed: [Kolmogorov Complexity--A Primer](<https://devfeed.tech/articles/kolmogorov-complexity-a-primer-40270.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2012/04/21/kolmogorov-complexity-a-primer/>)

Published: 2012-04-21T18:23:41Z

Content type: article

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Algorithms, Complexity](<https://devfeed.tech/topics/algorithms-complexity.md>), [Math and Logic](<https://devfeed.tech/topics/math-and-logic.md>)

Tags: [complexity-theory](<https://devfeed.tech/tags/complexity-theory.md>), [computability-theory](<https://devfeed.tech/tags/computability-theory.md>), [computational-complexity](<https://devfeed.tech/tags/computational-complexity.md>), [kolmogorov-complexity](<https://devfeed.tech/tags/kolmogorov-complexity.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [primer](<https://devfeed.tech/tags/primer.md>)

### AI overview

This primer introduces Kolmogorov complexity as a way to formalize how random or complex a string is. It defines the concept using the length of the shortest program that outputs a string, then begins developing a more rigorous formulation using binary programs and Turing-machine concepts.

### Source excerpt

The Complexity of Things Previously on this blog (quite a while ago), we've investigated some simple ideas of using randomness in artistic design (psychedelic art, and earlier randomized css designs). Here we intend to give a more thorough and rigorous introduction to the study of the complexity of strings. This naturally falls into the realm of computability theory and complexity theory, and so we refer the novice reader to our other primers on the subject (Determinism and Finite Automata, Turing Machines, and Complexity Classes; but Turing machines will be the most critical to this discussion).