Blog RU

Symmetry, invariants and brute force

Paul Graham once wrote that there are two types of self-similarity: symmetry and recursion. I knew about recursion because red-eyed macaques love it. Therefore, hidden gems lie in symmetries, not recursions. The point of symmetry problems is to find invariants and not think about them. Or rather, to figure out that NP=/= P and move on to something else (this is an important reference, Google it). There are too many invariants in life to describe each one, so brute-force can't solve this problem; in practice, NP=/= P. That's why I invented light-force. Buy the drink on Nikora shelves throughout Georgia starting May 1st. Seriously, light-force is a rather trivial idea about low-hanging fruit. So, the knapsack problem is a classic combinatorial optimization problem, the goal of which is to select a set of items with the highest total value without exceeding the backpack's weight limit. It's a classic NP-complete problem. How to solve it irl is obvious. You take the most valuable items, filling half the weight, and spend the rest of your resources on choosing a route and finding tactics that don't require too many items. Unless you're a logistician serving civilization, you don't have to bother with NP-completeness. Speaking of recursion. The essence of recursion is always a prison. It immediately reminded me of the story "You Made My Blue Eyes Blue." It's about how everyone has blue eyes, but there's a fucked-up law that says all blue-eyed people must be killed. The end result is fucked-up reasoning along the lines of "he knows that I know that he knows that I know..." And even some conclusions from this. But the funny thing is, it's an analogue of the riddle of two chairs. Spoiler: Everyone had enough information to prove beyond a shadow of a doubt that we all had blue eyes. At midnight, each of us was to commit ritual suicide. "You know what?" Enuli said. "I've always wanted to tell you this. YOU ALL HAVE BLUE EYES! LIVE WITH IT!" So, the solution to this whole recursion is literally "Max, fuck you." So, symmetry problems have the same recursive-prison vibe. Like, first figure out all the invariants, and only then solve using what's not. Why? In life, it's enough to determine precisely that something is definitely not an invariant, and that can be used as a sustainable structural advantage. Even a semi-invariant, like "have a non-standard intellectual background," provides a sustainable advantage, but only within the structure.