填字谜很难
Filling Crosswords is Very Hard
摘要:
我们重新审视一个经典的填字游戏,它已经出现在Garey\&Jonhson的书中。我们给出了一个具有$n$垂直和水平槽的网格和一个具有$m$单词的字典,并被要求将字典中的单词放置在槽中,以便共享单元格一致。我们试图查明这个问题的棘手性的来源,考虑到网格图的结构,其中包含一个顶点为每个插槽和一个边缘,如果两个插槽相交。我们的主要方法是考虑这种图具有树状结构的情况。不幸的是,如果我们强加的共同规则,字不能被重用,我们表明,即使在非常严格的结构限制的问题仍然是NP难的。如果允许字重用,这个问题变得稍微容易处理一些,因为我们在这种情况下得到了一个$m^{tw}$算法,其中$tw$是网格图的树宽。然而,即使在这种情况下,我们表明,我们的算法不能得到改进。更强烈的是,我们表明,在ETH的问题不能解决的时间$m^{o(k)}$,其中$k$是水平插槽的实例的数量。出于这些主要是负面的结果,我们认为更受限制的情况下,该问题是由插槽数$n$参数化。在这里,我们表明,该问题成为FPT,但参数的依赖性是指数在$n^2$。我们证明了这种依赖性也是合理的:运行时间为$2^{o(n^2)}$的算法的存在将与随机ETH相矛盾。最后,我们考虑一个优化版本的问题,我们试图在网格上放置尽可能多的单词。这里很容易得到一个$\frac{1}{2}$ -近似,甚至在加权的情况下。我们表明,该算法也可能是最佳的,因为在多项式时间内获得更好的近似比将与唯一博弈猜想相矛盾。
英文摘要:
We revisit a classical crossword filling puzzle which already appeared in Garey\&Jonhson's book. We are given a grid with $n$ vertical and horizontal slots and a dictionary with $m$ words and are asked to place words from the dictionary in the slots so that shared cells are consistent. We attempt to pinpoint the source of intractability of this problem by taking into account the structure of the grid graph, which contains a vertex for each slot and an edge if two slots intersect. Our main approach is to consider the case where this graph has a tree-like structure. Unfortunately, if we impose the common rule that words cannot be reused, we show that the problem remains NP-hard even under very severe structural restrictions. The problem becomes slightly more tractable if word reuse is allowed, as we obtain an $m^{tw}$ algorithm in this case, where $tw$ is the treewidth of the grid graph. However, even in this case, we show that our algorithm cannot be improved. More strongly, we show that under the ETH the problem cannot be solved in time $m^{o(k)}$, where $k$ is the number of horizontal slots of the instance. Motivated by these mostly negative results, we consider the much more restricted case where the problem is parameterized by the number of slots $n$. Here, we show that the problem becomes FPT, but the parameter dependence is exponential in $n^2$. We show that this dependence is also justified: the existence of an algorithm with running time $2^{o(n^2)}$ would contradict the randomized ETH. Finally, we consider an optimization version of the problem, where we seek to place as many words on the grid as possible. Here it is easy to obtain a $\frac{1}{2}$-approximation, even on weighted instances. We show that this algorithm is also likely to be optimal, as obtaining a better approximation ratio in polynomial time would contradict the Unique Games Conjecture.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。