I have the following puzzle for which I would like to create a quantum algorithm.
- There are 2 players that need to complete 3 tasks as fast as possible.
- There are 3 different types of tasks (
A, B, C)
- There are 3 different types of tools (
a, b, c)
- Each player will only get 2 tools (they might get the same tool twice)
- Tool a will make that the player can finish task
A10 minutes faster than without tool
bwill make that the player can finish task
B10 minutes faster than without tool
cwill make that the player can finish task
C10 minutes faster than without tool
- The output of the quantum algorithm must be (a) a random combination of the 3 tasks (the same task might appear multiple times) and (b) a random assignment of 2 tools to each of the 2 players but it should also remain a fair competition (in other words one player will not gain more time in total thanks to the set of tools he got).
So a possible outcome of the quantum algorithm:
A, A, C(note that same task can appear multiple times) and
- Player one gets tools
- Player two gets tools
a,a(although he gets 2
atools - he can only use one tool at a time - so the 2nd
atool would not give any benefits)
So, in this case, both players will equally benefit (= 20 minutes) thanks to tool
a and the 2 tasks
So how would you implement such a problem in a quantum algorithm?
Of course this puzzle can be further generalized as:
- each player has to complete
ntasks (and not 3)
- instead of 3 different types of tasks (
A, B, C) and 3 corresponding different types of tools (
a, b, c), there are
tdifferent types of tasks with corresponding tools giving them a 10 minute performance benefit.
- each player gets
ktools instead of 2.
I don't need an answer on this generalized puzzle ! I am more than happy to get an answer on the simple puzzle.