Efficient algorithms for ideal operations (extended abstract)