Strength of Stones by Greg Bear
In a theocratic world far into the future, cities control their own movements and organization. Constantly moving, growing and decaying, taking care of every need their inhabitants might think of, the cities have decided that humans are no longer a necessary part of their architecture, casting them out to wander in the wilderness and eke out a meager subsistence. To the exiled humans, the cities represent a paradisiacal Eden, a reminder of all they cannot attain due to their sinful and unworthy natures. But things are beginning to change. People are no longer willing to allow the cities to keep them out, choosing instead to force an entry and plunder at will. The cities are starting to crumble and die because they have no purpose or reason to continue living without citizens. One woman, called mad by some and wise by others, is the only human allowed to inhabit a city. From her lonely and precarious position at the heart of one of the greatest cities ever, she must decide the fate of the relationship between human society and the ancient strongholds of knowledge, while making one last desperate attempt to save the living cities.