For a resistance random access memory whose insulating matrix is based on transition metal oxides, the underlying microscopic mechanism of its conductive filaments is crucial yet challenging to understand. In this paper, our first-principles calculations predict that titanium oxide prefers its anatase phase over rutile either with or without aluminum doping. We report that an oxygen vacancy in the anatase titanium oxide is stable in its neutral charge state when free of an external field, while it is unstable in the singly and doubly charged states. By calculating the dissociation energy of a single vacancy from a conductive filament, we also study the filament rupture that is modeled by an array of oxygen vacancies, with or without a nearby aluminum dopant. We find that for the dopants at a specific site, the conductive filaments tend to disconnect, which, in turn, enhances the endurance of a non-filamentary resistance random access memory.