On some optimization problems in molecular biology