Comments
On Zlobober → Anti-hash test., 11 years ago
0

Hmm, eigenvalues interpretation is interesting.

On Zlobober → Anti-hash test., 11 years ago
+15

Thank you for your example, but I guess you didn't quite understand the idea. I'll try to explain in more details. The matrix notation (0, 1; b, 1) means two by two matrix:

0 1
b 1

a_0 (0; 1) + a_1 (0, 1; b, 1) (0; 1) + a_2 (0, 1; b, 1) ^ 2 (0; 1) = a_0 (0; 1) + a_1 (1; 1) + a_2 (1; b + 1)

We can assume that char 'a' code is zero and char 'b' code is one. Then hash("aab") = (1, b + 1) and hash("bba") = (1, 2). These hash codes are obviously unequal. I guess you thought that b = 1 because of the name 'Fibonacci'. But I meant extended Fibonacci sequence when x_n = x_(n-1) * b + x_(n-2)

On Zlobober → Anti-hash test., 11 years ago
+16

The same in English: I came up with a workaround. Can someone break a Fibonacci hash modulo 2^32? Zlobober?

a_0 (0; 1) + a_1 (0, 1; b, 1) (0; 1) + a_2 (0, 1; b, 1) ^ 2 (0; 1) + …

Where a_i — letters in a string, b — random odd constant, ';' — delimiter in a matrix. The resulting hash is a vector of two int32's. You can compute it for substrings analogically, but you need to work with two int32's instead of one int64. Why is it a Fibonacci hash? Because one can simplify matrixes multiplication: (0, 1; b, 1) (x; y) = (y; bx + y) — this trick is used for computing Fibonacci numbers and analogical sequences.

Thanks to everyone who will try to break it!

On xander7b → ACPC 2012 Gym content error, 13 years ago
0

The issue is fixed.

On xander7b → ACPC 2012 Gym content error, 13 years ago
0

I've just written a message to Mike Mirzayanov. Let's wait for his answer...

On xander7b → ACPC 2012 Gym content error, 13 years ago
0

There's something wront with the gym. I started receiving many Judgement failed verdicts with java stacktraces saying: ... Probably not a zip file or a corrupted zip file ...

http://codeforces.me/gym/100065/status

It seems that the hard disk was corrupted.