An algorithmic analysis of DNA structure