On a problem of Zariski on dimensions of linear systems