My open-source tool hit #1 on Hacker News last night.
One command turns off Apple Intelligence on macOS 27, deletes its models and stops macOS from downloading them again, with SIP left on.
800+ GitHub stars so far.
https://t.co/WE3Tx9qjVU
Since P and NP problems are all the rage on the timeline, let me attempt to define both and present an example.
P, or Polynomial Time, is a class of problems for which we have algorithms that can efficiently solve them - meaning their running time can be expressed as a polynomial function of the size of the input.
NP, or Nondeterministic Polynomial Time, is a class of decision problems for which, given a proposed solution (a "certificate"), we can efficiently verify whether that solution is correct using a deterministic algorithm.
In other words:
P: We can efficiently find a solution.
NP: Given a solution, we can efficiently verify it.
An example of an NP-complete problem that I came across while reading *Introduction to Algorithms* is the Traveling-Salesman Problem (TSP).
Consider a delivery company with a central depot. Each day, it loads up its delivery truck at the depot and sends it around to deliver goods to several addresses. At the end of the day, the truck must return to the depot so that it is ready to be loaded for the next day.
The company wants to find an order of delivery stops that minimizes the total distance traveled. The optimization version of this problem is NP-hard. Its decision version, however, is NP-complete:
> Given a maximum allowed distance (K), does there exist a tour that visits every address exactly once, returns to the depot, and has a total distance of at most (K)?
There is no known polynomial-time algorithm for solving TSP exactly.
However, under certain assumptions, there are efficient algorithms that can find solutions whose total distance is guaranteed to be reasonably close to the optimal solution.
And, of course, this brings us to the famous question:
P = NP?