420 points · by kentricon · 3y ago · 107 comments
A related toy example that comes to mind is the puzzle where you're given 12 metal balls and told that one of them is either heavier or lighter than the rest. You're then given a balance/scale and instructed to figure out which ball is different and whether it is heavier or lighter using the balance a maximum of three times to weigh different combinations of balls.
Part of the reason this is solvable is because there are 12x2=24 different possibilities (or log2(24) = 4.58 bits) for the ball ID/weight and 27=3x3x3 possible outcomes (or log2(27) = 4.75 bits) for the weighing process (left heavier, right heavier, or equal in each use). Thus, there's a chance the weighing sequence could convey the ball ID/weight. If there were 14 balls, however, then you would require log(28) = 4.81 bits of information to specify the ball ID/weight, so the puzzle would be unsolvable, since there wouldn't be enough information available in the weighing sequence to specify the ball ID/weight.
The usual solution uses the fact there are 3 places to put items: left scale, off scale, and right scale. Then those solutions do if/then cases to juggle items around to find the mis-weighted ball.
My solution numbered the balls in base 3, then did four weighings with no if/thens,. The weightings each gave a base 3 result: left, balance, right. This formed the digits of the mis-weighted ball.
The idea is to make an error correcting code in base 3, and use the "weighings" as the correction matrix to isolate the bad "bit".
This idea generalizes to solve a massive range of find the odd item(s) problems.
Number the balls 7 8 9 10 11 12 14 15 16 17 18 19
Then do three weighings according to rows like this:
0 1 -1 0 1 -1 1 -1 0 1 -1 0
1 1 -1 -1 -1 0 0 1 1 1 -1 -1
-1 -1 0 0 0 0 0 0 0 0 1 1
Where -1 means index on left side of of balance, 0 means not on balance, 1 means on right side of balance. Note each row has the same number of -1 and 1.If left is heavy, record 0, else if balanced, record 1, else if right heavy, record 2.
Then the base 3 value gives the coin label above (in absolute value) and is >0 if heavier, else is -1 if lighter.
Also note there is no if/then. You simply follow these three and record the numbers which spit out the answer.
The idea is the matrix represents an error correction code in base 3. You need each column distinct, and coin j being out of whack selects column j from the matrix.
For example, say ball 7 is heavier. From top to bottom, the weightings would result in: 120. However, if ball 19 was lighter you would obtain the same weighing sequence 120.
I believe that there is another condition that must be imposed on the matrix - namely, the column must be unique, but also -1*column must not be another column.
I created the following matrix, which can identify the ball and if it is heavier or lighter. However, this does not line up neatly, and would require a table to decode the output of the weighings.
-1 -1 -1 -1 1 1 1 1 0 0 0 0 -1 -1 0 1 0 -1 -1 0 1 1 0 1 0 1 -1 0 -1 1 -1 0 1 0 1 -1
For example, the sequence 001 means the first ball is heavier. The sequence 221 means the first ball is lighter. Etc.
If you like cool problems, here is one I have not found a simple solution for, but I once saw it in a place where a simple solution should exist.
You have an odd number >=3 of items with the property that any time you remove one, there is a way to split the remaining items into two equal count piles of equal weight. Show all items have the same weight.
It's easy for 3 items, A,B,C. Remove C, A balances B, then do A,C, now all equal.
It's easy to check by hand for a few small cases.
I proved it using more advanced stuff from lin alg. But I've never found a simple solution yet.
EDIT: corrected with "equal count piles"
The puzzle is related to the game 20 questions. If you can ask only 20 yes/no questions, you can differentiate 2^20 items. For example, with 20 yes/no questions, you can determine an integer in 1 to 1,000,000 (technically, up to 2^20).
Now consider you need to figure out what integer between 1 and 1,000,000 I am think of, but I am allowed to lie at most once. Now how many questions will you need to ensure you get the answer?
Doing this by hand and creating more and more convoluted tricks is possible, but in reality this is another error correction problem: The original problem is a binary message of length 20 bits, from which you get the 20 bit message.
With at most one lie, there is a 20 bit message, me (the noisy channel) can add at most one error, so you need the minimal length binary code that takes a message of length 20 and a max error of 1 bit.
To find the number needed, use a coding table like http://www.codetables.de/.
So you need to find how many more bits you need. To fix d bits, you need 2d+1 'distance' in your code to make sure d errors do not move one valid point within Hamming distance d of another answer, so we need d = 3.
So you need a binary code, d = 3, and encoding a message of length k=20. Click on Linear Codes, then the GF2 button, and you see the big table of best codes. Find the column with k = 20 (our message length), scroll down over increasing n (number of questions needed), until the first d=3 entry. There n = 25, so 25 questions will do it. This is the result http://www.codetables.de/BKLC/BKLC.php?q=2&n=25&k=20
This is provably best, otherwise the table would have a range if there were not proof (look around the table, notice some are ranges).
To design the questions, most places with tables have code constructions. So click the entry, and they describe the construction (unfortunately in error correction code terms), but that can be reversed into English and actual questions to get your answer.
This technique would let you answer any problem along the line of "How many questions, each with b options, would it take to determine between N items, if there are at most d lies told?"
This type of solution requires choices and branching. Mine was nicer I think since it requires no branches, and the weighings themselves spit out the bad coin number in base 3.
The solution is: Take one coin from the first bag, two coins from the second bag, three coins from the third bag, etc. Weigh all of the selected coins at the same time to get a total weight. Subtract from the total weight the triangular number of the number of bags[1], in ounces. The remainder, divided by 0.1, will be the number of the bag with the fake coins.
[1] eg, for three bags, 1 + 2 + 3 = 6
The only requirement is to have a unique number of coins from the fake coin pouch. Since we don't know which one that is, every pouch gets a different number of coins, and not necessarily a sequence starting from 1. Then, you weigh them all assuming they're all real, but wait, they're not! So you take the excess weight, divide it by the excess weight per fake coin, and the bag from which you took out that many coins is the bag with the fake coins.
One of the Die Hard movies had the "extract 1 gallon from a 3 gallon and a 5 gallon jug" puzzle in it.
It’s also fun to scale the problem from 3 balls up to see how the solution evolves.
> The 12-ball problem is a fun one and IMO the key revelation is that you do not need to determine whether the ball is lighter or heavier (which isn’t possible anyway).
Huh?
Weigh 1: 9 vs 9 (18 on balance), 9 off
Weigh 2: 3 vs 3 (6 on balance ), 3 off
Weigh 3: 1 vs 1 (2 on balance ), 1 off
....and now I understand, you would only initially know there is a difference in weight, not which side had the heavier or lighter ball.
This is a very relatable feeling. I often find myself getting trapped into thinking about problems I am unlikely to solve.
There's a portion of my brain that's immediately hijacked and starts thinking about the problem whether I'm actively working on it or not.
Happens to me for work problems outside of work, too. I'll just be chilling in the shower or something and suddenly I'm thinking about a work problem.
Maybe one day I'll retire from programming and do something less theoretical e.g. driving a semi.
I have this problem as well. The most disturbing thing is retracing old paths to dead ends without realizing it. Here I mean internal mental models, but also applies to previously known results I just wasn't familiar with, and don't turn up unless specific phrases are known.
Abstract:
We show that for any union-closed family F\subseeq 2^[n],F≠{∅}, there exists an i∈[n] which is contained in a 0.01 fraction of the sets in F. This is the first known constant lower bound, and improves upon the Ω(log_2(|F|)^{−1}) bounds of Knill and Wójick. Our result follows from an information theoretic strengthening of the conjecture. Specifically, we show that if A,B are independent samples from a distribution over subsets of [n] such that Pr[i∈A]<0.01 for all i and H(A)>0, then H(A∪B)>H(A).
Impressive result however.
It is possible for someone who is not a full-time mathematician by still working on mathematics in their spare time or in a mathy-field in their day job but very very few real examples of that can be found.
So I don't find the title clickbaity. It is really really hard to come up with results like this without working on mathematics research (not AI research) 10 hours a day!
Always enjoy seeing this sentiment reaffirmed. Funny that Gilmer states it in a somewhat self surprised tone.
Rings of the Einstein quote:
“[I do not] carry such information in my mind since it is readily available in books. He also said, “…The value of a … education is not the learning of many facts but the training of the mind to think.”
While anyone with a (good) STEM education knows this to be obviously true, its frightening how many people go through 16+ years of formal schooling where they mostly do rote memorization and regurgitation.
We measure students with tests, but all we get are people good at taking tests and rote memorization.
Maybe if we had a better way to access actual learning but are teachers even paid enough to truly care?
There's no incentive to pay teachers more; system is working as designed. Those students aren't giving short-term quarterly gains.
That's how most education is structure, though. Unless your point is simply that, though it reads as if you're blaming the student.
Of course any non-STEM field has geniuses, but our impressions—like the parent’s—are formed from averages, and STEM majors are smarter on avg.
I think it's the first place I ever saw the "Information Diagram" (https://en.wikipedia.org/wiki/Information_diagram) which is a Venn-like diagram that really helps to remember all these relationships.
Especially in poorer public schools, learning is modeled as recitation. It's awfully sad. Most students are lucky if they get one or two teachers that break that mold.
It depends...good luck doing math if you don't have a good grasp of arithmetic . Having to look up everything would be a major chore.
> “I was a bit rusty, and to be honest, I was stuck,” Gilmer said. “But I was eager to see where the community would take it.”
> Yet Gilmer thinks the same circumstances that left him out of practice probably made his proof possible in the first place.
This reminds me of the principle of Shoshin: https://en.wikipedia.org/wiki/Shoshin
The idea that the mindset of a beginner can sometimes find insight where the mind of an expert cannot, and that experts should cultivate thinking like a beginner in some instances.
Edit: From the paper, the family F is defined as "F ⊆ (subset or equal) 2^n". I think that means for n elements there are at most 2^n subsets? In other words, no duplicated subsets. Which still doesn't clear up my confusion--5 subsets is < 2^4.
Edit: Duh, thanks for correcting my thinko.
"A collection, or family, of sets is considered “union-closed” if the union of any two sets in the family equals any existing set in the family."
EDIT: In your hypothetical collection of sets, the union of "2" and "3" would produce the set "2,3" which is not an enumerated set in your list.
Should the title of this HN entry be updated accordingly?
As for using AIs as mathematical proof helpers, I threw it the following softball and can't say that mathematicians should be too worried just yet:
>> Please prove that the first decimal digit of pi is 3.
> The value of pi is an irrational number, which means that it has an infinite number of decimal digits that do not repeat in a pattern. It is not possible to prove that any particular decimal digit is the first decimal digit of pi, because the decimal representation of pi is infinite and does not repeat. However, the first few decimal digits of pi are widely accepted to be 3.14, so the first decimal digit of pi is generally assumed to be 3.
It is not clickbait just because you interpreted it wrongly. The AI in the title only aims to demonstrate his state of out-group in regards to math.
He's more "in" that problem space than a professional differential topologist.