Optimally robust redundancy relations for failure detection in uncertain systems