Live data from Hacker News

Cheating on a string theory exam

daemonology.net

31–40 of 76 posts

Re: Cheating on a string theory exam

#31
Unless I am misunderstanding something, all the answers here seem to assume that the friend is either able finish instantly, or to leave before he is done. That isn't stated in the question, so I don't think it's valid to assume you can use all of 90 minutes * 60 seconds to transmit information.

"a fraction of the time" isn't a very clear problem statement, as 9999999/1000000 is a fraction, but that's certainly not what is meant by the common sense understanding of this phrase.

I am wondering what we can do without clarifying the statement further.

We can still encode 90*60 23-bit vectors and have the friend pick the one, in the remaining time after he finishes, that minimizes the distance to the true answer, but without knowing how early he finishes. That is probably still the way you can get the best score on average, but I don't think it does better for the guaranteed number of correct answers than just transmitting 1 bit of information (which guarantees at least 12 correct answers).

Would it help to use odd vs even seconds to indicate whether the fiend finished early enough to use the clock to indicate an arbitrary time vs the time at which he should have left was already gone when he finished his exam? I can't think of how to use this (or a similar) signaling to improve the worse case odds.

On the other hand, while I cannot think of a way to improve your worse case situation, you should be able to improve average score by sorting your 5400 23-bit vectors so that the distances between the last ones are as large as possible.

Re: Cheating on a string theory exam

#33
Here's my writeup, spoilers:

We're looking for a lossy compression function that maps strings of length 23 (answers) to strings of length 12 (bits of information in 5400 min). We seek to minimize the number of errors, aka the Hamming distance. Under the Hamming distance metric, the space of strings forms a hypercube where two strings are adjacent if they are related by a bit flip (one error).[1]

This gives an elegant visual interpretation: we're searching for a way to partition the hypercube of 23-bit strings into 2^12 balls[2] containing 2^11 elements each.

What is the minimum radius of the balls? There is 1 element in the center of the ball, 23C1=23 elements at distance 1, 23C2=253 elements at distance 2, and 23C3=1771 at distance 3, which sums to precisely 2^11. This combinatorial coincidence makes it possible to build a beautifully symmetric 23->12 compression function!

In order to avoid overlap, the centers of any two balls must be 7 bits apart. One idea to evenly space the centers: write all possible first 12 bits (1 bit distance), then distribute the remaining bits 6 bits apart.

We can also see that inverting the compression function gives an error-correcting code going 12->23, mapping 12-bit inputs to optimally-spaced 23-bit strings. There is a duality between lossy compression (aka rate-distortion theory[3]) and error correction.

As it turns out, the optimal 12->23 error-correcting code is the perfect binary Golay code discovered in 1949.[4] The inverse of the Golay code is the compression function we're looking for.

A bit of historical trivia: Golay's 1949 paper was reviewed by Berlekamp, who in 1974 called it the "best single published page" in coding theory. At the time, Berlekamp was working as a code breaker with Jim Simons at the Institute for Defense Analyses. Later, Berlekamp would help Simons found Renaissance Technologies, which remains today the most successful quant hedge fund in history.[6] Renaissance was famous, of course, for hiring many of the best minds in string theory.

[1] https://en.wikipedia.org/wiki/Hamming_distance

[2] https://en.wikipedia.org/wiki/Ball_(mathematics)

[3] https://en.wikipedia.org/wiki/Rate%E2%80%93distortion_theory

[4] https://en.wikipedia.org/wiki/Binary_Golay_code

[5] https://en.wikipedia.org/wiki/Hamming_bound

[6] https://en.wikipedia.org/wiki/More_Money_Than_God

Re: Cheating on a string theory exam

#34
post #18

Pick 5400 23-bit vectors (the answers you will write) and your friend picks the one that minimizes its Hamming distance to the true answer. 5400*23 + 5400*23*22/2 so answering 21 questions with certainty is impossible. (Pick the true answers so as to maximize the Hamming distance between it and whatever answer you decide to write, regardless of the scheme used.) And there is a size 4096 [1] see n = 23, R = 3 here htt…

If someone could ELI5 this, that'd be great!

I just posted my solution: https://news.ycombinator.com/item?id=13694535

It's not quite ELI5, but I'd be happy to answer any questions.

Re: Cheating on a string theory exam

#35
post #18

Pick 5400 23-bit vectors (the answers you will write) and your friend picks the one that minimizes its Hamming distance to the true answer. 5400*23 + 5400*23*22/2 so answering 21 questions with certainty is impossible. (Pick the true answers so as to maximize the Hamming distance between it and whatever answer you decide to write, regardless of the scheme used.) And there is a size 4096 [1] see n = 23, R = 3 here htt…

If someone could ELI5 this, that'd be great!

5400 = 90 min * 60 seconds

The test is a list of 23 true/false questions, so you can think of each question as a bit.

You've prearranged a list of 5400 unique 23-bit vectors, so he determines the bit vector with the most correct answers (ie. smallest Hamming distance) and leaves at whatever time offset corresponds to that bit pattern.

It's not a perfect scheme since you only have 5400 possible bit vectors, and 2^23 > 5400.

Re: Cheating on a string theory exam

#36
post #18

Pick 5400 23-bit vectors (the answers you will write) and your friend picks the one that minimizes its Hamming distance to the true answer. 5400*23 + 5400*23*22/2 so answering 21 questions with certainty is impossible. (Pick the true answers so as to maximize the Hamming distance between it and whatever answer you decide to write, regardless of the scheme used.) And there is a size 4096 [1] see n = 23, R = 3 here htt…

Correct! You're the second person to find the answer (the first was not on HN). Now for the extra credit part: What's the connection between this solution and string theory?

> What's the connection between this solution and string theory?

Which string theory? The one in physics or the one in computer science?

Re: Cheating on a string theory exam

#37
This is really cool, since I'm currently working on a way to transmit extremely small amounts of data (~30 bits) in a situation where you cannot use any RF waves.

Of course, it's banned here but the simplest thing (for the person taking the test) would be to take a short amount of time - or a long amount of time - to fill in each bubble. A short scribble = false, a long scribble = true. To thwart the proctors you could swap the keys every other question, such that for question 1 short=false, long=true; question 2 short=true, long=false, etc etc.

Of course, for any of these answers the proctors could trivially catch you cheating. The best way to prevent this would be applying a simple one-time pad to them - exchange a small number beforehand and use that.

Re: Cheating on a string theory exam

#38
post #18

Pick 5400 23-bit vectors (the answers you will write) and your friend picks the one that minimizes its Hamming distance to the true answer. 5400*23 + 5400*23*22/2 so answering 21 questions with certainty is impossible. (Pick the true answers so as to maximize the Hamming distance between it and whatever answer you decide to write, regardless of the scheme used.) And there is a size 4096 [1] see n = 23, R = 3 here htt…

If someone could ELI5 this, that'd be great!

The table basically says it's possible to pick a set of 4096 (2^12) different vectors of T/F combinations in a way that you only need flip up to 3 (R=3) of the T/F answers to cover all 2^23 (n=23) possible solutions to the quiz. Thus you only need 68 minutes and 16 seconds (4096 seconds) in order to guarantee you get at least 20 answers correct.

You can use the remaining 1304 seconds to encode some more vectors to increase the possibility of getting more answers correct, but you cannot guarantee 21 or more correct answers in the allotted time. The lower & upper bound (not sure what this part means) for n=23,R=2 is 30686-32768 about 9 hours!

Very simple example with n=3. I have listed all the vectors with Hamming distance of 1 or less (R=1). Looking at the table, we see that for n=3, R=1, we can cover all the vectors with 2 different codes. Heads and tails for example. It's easy to see which combinations we can pick to guarantee coverage, a&h, b&g, c&f, d&e. Using any of those combinations and some way to signal to the other person 'heads' or 'tails' will guarantee they get at least 2 answers correct.

  a TTT 

Re: Cheating on a string theory exam

#39
post #13

I would say that the lower bound is 18. Because we want to represent a 23 bits string by 12 bits codewords, the max distance between 2 codewords is 11 bits. So the protocol would be to agree on a dictionary of 12 bits codewords and send the closest codeword to the actual answer. The max hamming distance between any answers and a codeword would be floor(11/2) = 5. Which corresponds to 18 correctly answered questions.

I'm not sure I understand the max hamming distance part.

From what I understand, the hamming distance would only be relevant for expectations with a certain probability, but worst case will still be 12.

Re: Cheating on a string theory exam

#40
post #18

Pick 5400 23-bit vectors (the answers you will write) and your friend picks the one that minimizes its Hamming distance to the true answer. 5400*23 + 5400*23*22/2 so answering 21 questions with certainty is impossible. (Pick the true answers so as to maximize the Hamming distance between it and whatever answer you decide to write, regardless of the scheme used.) And there is a size 4096 [1] see n = 23, R = 3 here htt…

Also worth noting that this allows you to allocate the first 21 minutes for your friend to finish the exam.
Post reply on HN