Before revision:    Our first result achieves near-linear space and optimal query time  , and our second result achieves linear space and near optimal query time .
After revision:  Let n be the length of S, m the length of P, and \epsilon\in(0,1 Our first result achieves near-linear space and optimal query time , and our second result achieves linear space and near optimal query time .