Max and closed patterns