Backtracking Candidate Elimination: A One-Pass Algorithm for the Chip Testing Problem
Abstract
In the chip testing problem, we are given 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 tests and 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.
Create a lesson
Metadata
- Categories
- cs.DS, cs.DM
Related papers
A Better Approximation Algorithm for k-Delivery Traveling Salesman Problem
Shared title terminologycs.DSJiajun He, Guochuan Zhang
Approximation algorithms for balanced spanning forest problem
Shared title terminologycs.DSZixin Qiao, Yong Chen, Guohui Lin et al.
The Complexity of Submodular Matching in One-Pass Streams
Shared title terminologycs.DSMohammadTaghi Hajiaghayi, Morteza Monemizadeh, Xinchen Yang
Improved Exact Algorithms and Parameterized Results for Monopolar Graph Problems
Shared title terminologycs.DSSoumen Mandal, Ashutosh Rai
How to Round Spiky Balls into Submission -- And Faster Algorithms For The Closest Vector Problem
Shared title terminologycs.DSDivesh Aggarwal, Aditya Morolia
Auction-Based Algorithms for Matroid Intersection: Near-Linear Query Complexity and Constant-Pass Semi-Streaming
Shared title terminologycs.DSChien-Chung Huang, Yusuke Kobayashi