# Clarification of variable values in Arithmetic Coding algorithm

I have been trying to follow this video to implement my own Arithmetic Coding algorithm in Java. I am having a bit of trouble figuring out what some of the variables in the video should be.

For example if I have:

An Input alphabet - { 1,  2  , 3 , 4}
Probabilities     - {0.1,0.1,0.1,0.7}
An Input of       - [12312]


Would my values for the following be correct?

P1 = 1/4
P2 = 1/4
P3 = 1/4
P4 = 1/4

C1 = 0
C2 = 1
C3 = 2
C4 = 3

D1 = 1
D2 = 2
D3 = 3
D4 = 4


I am pretty confused by some definitions in the linked video, any advice would be appreciated !

-