We consider optimal group testing of individuals with heterogeneous risks for an infectious disease. Our algorithm significantly reduces the number of tests needed compared to Dorfman (Ann Math Stat 14(4):436-440, 1943). When both low-risk and high-risk sample... ...