Shares of Time Warner Cable rose noticeably in early trading Tuesday in the wake of an announcement that the New York company had agreed to be purchased by Charter Communications in a deal that makes the smaller company, controlled by media executive John Malone, a more substantial rival to Comcast Corp.