An efficient algorithm for exact computation of system and survival signatures using binary decision diagrams