In pervasive computing environments, personal information is expressed in digital forms to a great extent. Daily activities and personal preferences may be easily associated with personal identities. Privacy protection is a serious challenge. The fundamental problem is the lack of a mechanism to help people expose appropriate amounts of their identity information. We propose the Hierarchical Identity model. It expresses one's identity information from precise to general. We model privacy exposure as an extensive game. By finding the subgame perfect equilibria in the games, our approach achieves optimal exposure. It finds the most general identity information that a user wants to expose and a service provider accepts. Keywords-identity management; game theory; pervasive computing; privacy