But growth and affordability are not mutually exclusive. Houston is one of the nation’s biggest and fastest growing regions, as well as one of its most affordable. The difference between Houston and the Bay Area, of course, is that Houston continues to sprawl outward — as do Atlanta, Phoenix and every other growing, affordable city.

In a recent study, Issi Romem, chief economist at BuildZoom, a San Francisco company that helps people find contractors, looked at the growth of American cities over the past several decades, and found that cities that add a lot of housing do so by expanding outward, building suburbs and exurbs that are almost exclusively covered by single-family homes. Once cities stop spreading out, their rate of new housing production slows — and prices shoot upward.

As the population grows, Mr. Romem said, there are three choices for how to accommodate more people. One is the Houston method: Keep growing outward. The second is the Bay Area method: Slow down sprawl while leaving existing neighborhoods alone, raising prices and pushing lower-earning households out of state. (In other words, slow growth by forcing people to move to Houston.)

The third is what no U.S. city has yet accomplished: Grow upward and in place. This route is certainly possible, but, as my story on Berkeley shows, it requires a wholesale rethinking of how cities look. And those are brutal politics.