0

Let f : {0, 1}ⁿ → {0, 1}ⁿ be a 4-to-1 function, such that there exist distinct and non-zero a, b ∈ {0, 1}ⁿ such that for all x ∈ {0, 1}ⁿ: f(x) = f(x ⊕ a) = f(x ⊕ b) = f(x ⊕ a ⊕ b). Note that ⊕ is a bit-wise xor, and that for all y ∉ {x, x ⊕ a, x ⊕ b, x ⊕ a ⊕ b}, f(y) ≠ f(x). Find a quantum algorithm that with high probability reports the set {a, b, a ⊕ b}.

Mariia Mykhailova
  • 1,987
  • 1
  • 9
  • 18
Rachel Bernouli
  • 225
  • 2
  • 9

1 Answers1

0

Well, choosing x to be 0 gives f(0) = f(a) = f(b) = f(a xor b). And there are no other inputs that match f(0). So we're just looking for v satisfying v != 0, f(v) = f(0). So make a circuit that takes a v and inverts phase when it satisfies else does nothing otherwise. Then apply grover's algorithm. The running time would be O(sqrt(N)) to find the first value. Then you repeat with it conditioned out as well.

On the other hand, just classically sampling at random until you find a collision also has expected time O(sqrt(N)) so there's probably something even more clever you can do.

Craig Gidney
  • 17,763
  • 5
  • 68
  • 136