Mathematical Modeling of Intellectual Property Protection Using Partially-Mergeable Cores