The PM was Senior Wrangler, so at least as much of a mathmo as a computer scientist. Moreover he is odd in two ways: first, he is the product of the scholar-army-politician pipeline in Singapore, which is quite unparalleled; second, he is the son of Lee Kuan Yew.
(Though that might not be his primary qualification.)