Time-Space Tradeoffs for the Memory Game
A single-player Memory Game is played with n distinct pairs of cards, with the cards in each pair bearing identical pictures. The cards are laid face-down and a move consists of revealing two cards, chosen adaptively. If these cards match, i.e., they have the same picture, they are removed from play; otherwise they are turned back to face down. The object of the game is to clear all cards while minimizing the number of moves. Past works have thoroughly studied the expected number of moves required, assuming optimal play by a player has that has perfect memory. Here, we study the game in a space-bounded setting. Our main result is that an algorithm (strategy for the player) that clears all cards in T moves, while using at most S bits of memory, must obey the tradeoff ST^2 = Omega(n^3). We prove this by modeling strategies as branching programs and extending a counting argument of Borodin and Cook with a novel probabilistic argument. An easy upper bound is that ST = O(n^2 log n), assuming that each picture can be represented in O(log n) bits. We conjecture that this latter tradeoff is close to optimal.
READ FULL TEXT