发表机构
University of California, Berkeley(加州大学伯克利分校)
机构由 AI 辅助整理,请以论文原文为准。AI 中文总结
提出回溯候选消除(BCE)算法,以单遍扫描和栈结构解决芯片测试问题,使用不超过 n-1 次测试,并揭示其与 Boyer-Moore 多数投票算法的联系。
AI 中文摘要
在芯片测试问题中,给定 $n$ 个芯片,其中严格多于一半是好的。芯片可以成对互相测试;好的芯片总是正确报告另一个芯片的状态,而坏的芯片可能任意且对抗性地报告。目标是识别出一个保证是好的芯片。该问题源于系统级故障诊断,并与“骑士与间谍”谜题密切相关。标准的教科书解决方案是一种减半递归,它轮流测试不相交的对,并从每个一致的对中保留一个芯片。\n我们提出回溯候选消除(BCE)算法,这是一种顺序替代方案,它扫描芯片一次,同时维护一个当前候选和一个保留芯片的栈。每个芯片作为进入芯片最多被测试一次;当测试结果不确定时,候选和进入芯片被一起丢弃,算法回溯到最近保留的芯片。BCE 最多使用 $n-1$ 次测试和 $O(n)$ 时间,不需要奇偶性案例分析,并且可以在线工作。其正确性由两个不变量保证:保留的芯片都具有相同的类型,并且每个被丢弃的对至少包含一个坏芯片。我们解释了如何将 BCE 视为 Boyer-Moore 多数投票算法,其计数器被替换为物理见证栈,以及为什么需要这种替换。我们还给出了一个提前终止规则和一个适用于单向测试较弱模型的变体。
英文摘要
In the chip testing problem, we are given $n$ chips, strictly more than half of which are good. Chips can test one another in pairs; a good chip always reports the status of the other chip correctly, whereas a bad chip may report arbitrarily and adversarially. The goal is to identify a single chip that is guaranteed to be good. The problem originates in system-level fault diagnosis and is closely related to the "knights and spies" puzzle. The standard textbook solution is a halving recursion that tests disjoint pairs in rounds and keeps one chip from each consistent pair. We present the Backtracking Candidate Elimination (BCE) algorithm, a sequential alternative that scans the chips once while maintaining a current candidate and a stack of retained chips. Every chip is tested at most once as the incoming chip; when a test is inconclusive the candidate and the incoming chip are discarded together, and the algorithm backtracks to the most recently retained chip. BCE uses at most $n-1$ tests and $O(n)$ time, needs no parity case analysis, and works online. Its correctness follows from two invariants: the retained chips all have the same type, and every discarded pair contains at least one bad chip. We explain how BCE can be viewed as the Boyer-Moore majority vote algorithm with its counter replaced by a stack of physical witnesses, and why that replacement is needed. We also give an early termination rule and a variant for the weaker model of one-directional tests.