# How to rule bactrack research on alphametric puzzles?

I have a funny aphametic problem:

  I A
+ I A
-----
P B


I have to find which are the values of the letters. I know I can try backtrack with forward research, MRV heuristic and degree heuristic. Yet I'm not sure how to apply them on cryptarithms/alphametrisms.

# My attempt

I tried to find the letters values with backtrack research.

## Domains

• $$D(A) = D(I) = \{1,..., 9\}$$
• $$D(P) = D(B) = \{0,..., 9\}$$

## Constraints

• $$10(I + I) + (A + A) = 10P + B$$

So I did iterated step by step by hand on the values:

1. $$A= \{I = 1\} \rightarrow$$ consistant
2. $$A = \{I = 1, A = 0\} \rightarrow$$ consistant
3. $$A = \{I = 1, A = 0, P = 0\} \rightarrow$$ inconsistant
4. $$A = \{I = 1, A = 0, P = 1\} \rightarrow$$ inconsistant
5. $$A = \{I = 1, A = 0, P = 2\} \rightarrow$$ consistant
6. $$A = \{I = 1, A = 0, P = 2, B = 0\} \rightarrow$$ inconsistant
7. $$A = \{I = 1, A = 0, P = 2, B = 1\} \rightarrow$$ inconsistant
8. $$A = \{I = 1, A = 0, P = 2, B = 2\} \rightarrow$$ inconsistant
9. $$A = \{I = 1, A = 0, P = 2, B = 3\} \rightarrow$$ inconsistant car $$A+A = 0 \neq 3$$

... until we change the value from A to 2 (because I already equal to 1) so far I don't know the answer.

It seems it's going to take ages. Am I doing it right ?

Maybe the following graph might be of any help ?