Added utility functions for computing origin sets.