Dear Morten

Please refer to the 'Table Generator Tutorial' in the HUGIN GUI Help pages for a good introduction to the expressions, distributions and operators (Open the Hugin Help pages and browse Tutorials -> Table Generator).

Attached is a few simple expression examples using discrete nodes, arithemetic operator (+) and if-then-else:

**Example 1**

Three numbered nodes C1, C2 and C3. C3 has parents C1 and C2.

C1 has some distribution over state values 1 and 2

C2 has some distribution over state values 10 and 20

We wish to represent C1 and C2 as a single node C3. For C3 to represent the combined distribution of C1 + C2 it has four state values:

11: representing C1=1, C2=10

12: representing C1=2, C2=10

21: representing C1=1, C2=20

22: representing C1=2, C2=20

Instead of manually specifying P(C3=11|C1=1,C2=10)=1, P(C3=11|C1=2,C2=10)=0 etc. etc. for C3 - we specify the expression 'C1 + C2' and the table is automatically generated.

**Example 2**

One boolean node C4, three nodes C5, C6, C7 with identical states. P(C5) and P(C6) differ. C7 has C4-6 as parents.

We want the distribution for C7 to be that of C5 or C6, depending on the state of C4.

Instead of manually specifying P(C7="state 1"|C4=true,C5="state 1",C6="state 2)=1, P(C7="state 1"|C4=false,C5="state 1",C6="state 2)=0 etc. etc. for C7 - we specify the expression 'if (C4 == true, C5, C6)' and the table is automatically generated.