A model of habitat use, or more generally of resource use in a coarse-grained environment, is presented. Competitors are assumed to respond to the combined competitive pressure of conspecifics and heterospecifics by an ideal distribution among (micro-)habitats-ideal in the sense that individuals are choosing only habitats where the negative effects of congestion are minimal and free in the sense that no direct interference and no travel costs are involved. It is shown that an ideal habitat distribution generically has the following graph-theoretic property: when competitors and habitats are represented by vertices and each competitor is connected with each of the habitats in which it occurs, the resulting (undirected) graph contains no cycles. This property has many implications. The fraction of (micro-)habitats occupied by an average competitor should vary inversely with the number of competing species. Pairwise overlap between competitors should be limited to a maximum of one habitat. Idea...