Algebraic framework for efficient simulation of SWN