Smart spaces are physical environments equipped with sensors, actuators, and other computing devices to gather data and provide intelligent services to users. These spaces are made possible by ubiquitous computing, particularly context-aware computing. Although these systems are mainly implemented on mobile and other resource-constrained wearable devices, different techniques have been adopted for their implementation. Rule-based reasoning is a relatively easyto-implement approach that can solve real-world problems. Rule-based systems rely on a set of assertions that constitute the working memory and a set of rules that govern what should be done with the set of assertions. Despite its relative simplicity, the working memory size is a critical factor in developing these systems, particularly for resource-constrained devices. In this paper, we propose techniques for efficiently calculating the working memory size. Our results show that all three techniques, DWM, APS, and SAPS, performed well in different ways. However, APS and SAPS consumed from 25% to 100% less memory than existing techniques.