4
$\begingroup$

Imagine we have a set of distinct natural numbers which we divide into two unsorted lists $A$ and $B$. Then, there is a third list $E$ containing pairs of (pairwise) distinct natural numbers. We would like to see if $E$ contains a pair of natural numbers $(c,d)$ such that $c \in A$ and $d \in B$ or $c \in B$ and $d \in A$. How could we apply Grover's algorithm to solve this task?

To give a concrete example, take $A = \{ 2,83,6,11\}$ and $B =\{ 34,12,41,89,5,90\}$ and $E = \{ (11,83), (12,5),(83,6),(11,41),(90,41)\}$. In this case, $(11,41)$ is the desired element since $11\in A$ and $41\in B$. All other elements in $E$ consist of p[airs of numbers both of which are either in $A$ or in $B$. In general, $E$ can contain elements $(c,d)$ such that $c\notin A,B$ and $d\notin A,B$, but we can exclude this possibility for simplicity.

I am guessing that this is a fairly simple and well-studied application of Grover's algorithm but I have trouble figuring out how this would work. In particular, how would many times would we need to apply the search oracle to solve this problem, given the numbers of elements in $A$, $B$, and $E$?

Any help is much appreciated.

$\endgroup$
2
  • $\begingroup$ What level of access is available of the elements of all three relevant lists? $\endgroup$ Commented May 11, 2023 at 4:04
  • $\begingroup$ Apologies for the late response. I am not sure I understand your question correctly, but my answer would be that one has complete access to the lists. $\endgroup$ Commented Jun 5, 2023 at 12:37

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.