In a recent paper, Wang [34] introduced the cain, a universal algebraic structure designed for studying probabilistic conditional independence (PCI) relations. In the cain algebra, PCI relations are represented in equational forms. The cain algebra is different from other well-known axiomatic systems for PCI relations, such as the graphoid and the separoid, in that the later systems are built on some principal properties of PCI relations regarded useful for general probabilistic reasoning. In this paper, we study algorithms for deriving PCI relations from other PCI relations. This problem is solved through two steps. First, we introduce a new type of polynomials, called cain polynomials, which are isomorphic to some PCI relations. Second, we express objective cain polynomials as linear combinations of the cain polynomials isomorphic to the given set of PCI relations.