Inferring deterministic causal relations