Homelessness is not caused by a lack of housing
First, its is well established that it is mental illness (or other pathologies rather than lack of affordable housing) that causes most of the homeless encampments that we see on the street. Some people that prefer that situation to the more structured environment they would have to endure at a shelter. Many have drug problems or other issues that they would not be compatible with programs that provide shelter. Likewise it does seem plausible that regulations that effectively eliminate substandard single room occupancy hotels and the like probably force some people onto the street even thought they might prefer such shelter without the strings of a public program. As a result, having less expensive housing is extremely unlikely to make any serious dent in a city’s homeless population.
Further that last way to get affordable housing is to have the government build it. John Cochrane mentioned on his Grumpy Economist podcast recently the insight that the most affordable housing is really just older housing that is reaching the end of its current (pre-remodel) life. If the government sets out to build affordable housing the very newness of it makes it unaffordable without an extreme subsidy that results in those least in need of it being the ones that will successfully play the game to get it. It is by allowing new housing to be built to free up old housing that they old housing becomes affordable. If you can’t build new housing, people will simply improve the old housing making it unaffordable. Other thoughts form John on affordable housing can be found here.