In the last few years we have witnessed the emergence, primarily in on-linecommunities, of new types of social networks that require for theirrepresentation more complex graph structures than have been employed in thepast. One example is the folksonomy, a tripartite structure of users,resources, and tags -- labels collaboratively applied by the users to theresources in order to impart meaningful structure on an otherwiseundifferentiated database. Here we propose a mathematical model of suchtripartite structures which represents them as random hypergraphs. We show thatit is possible to calculate many properties of this model exactly in the limitof large network size and we compare the results against observations of a realfolksonomy, that of the on-line photography web site Flickr. We show that insome cases the model matches the properties of the observed network well, whilein others there are significant differences, which we find to be attributableto the practice of multiple tagging, i.e., the application by a single user ofmany tags to one resource, or one tag to many resources.