Reducing the huge number of bio-molecules used for building molecular computers is one of the most crucial and imperative tasks in the molecular computing field. Inspired by biological signaling pathways in cells, a formal-system-based algorithm for spatially efficient molecular computing by pathways is proposed in this paper. Its space complexity is O(mxn) and its time complexity is O(m) when the algorithm is applied to solving 3-SAT problems, where in is the number of clauses and m is the number of variables. The experimental result obtained from the corresponding software implementation of the algorithm shows that the algorithm is efficient from the aspect of cost of computing and practical in its biological faithfulness.