Sounds like a perfect job for community service for non-violent offenders. The state/city has no money to house prisoners or maintain services.

Let's use community service for non-violent offenders as a means to address both.