摘要:Distribution and dynamics are the main characteristics of resource allocation problem. Despite the variety of approaches and models proposed for the problem, a systematic formalization and a general solution strategy are missing. This paper takes a step towards this goal by proposing a categorical formalization of resource allocation, which not only represents both distributed and dynamic features, but also formally prove the properties of symmetry, safety(non-deadlock), liveness(non-starvation) and concurrency. The application to the wireless sensor networks demonstrates the practicability of our formal model and emphasizes the strengths of category theory -- its simple theory, abstract mechanism, diagrammatical representation and its expressive power in representing and reasoning many concepts of computer science.