Algorithmic Diagnosis of Symptoms and Signs: A Cost-Effective Approach