 He would later graduate with a B.S.in chemistry from University of Illinois at Urbana–Champaign in 1986.In 1987, Gray left a PhD program in theoretical chemistry at the University of California at Berkeley to work with Stephen Wolfram.