Enumerating Unlabeled and Root Labeled Trees for Causal Model Acquisition

Similar documents
1 Minimum Cut Problem

(Upside-Down o Direct Rotation) β - Numbers

Higher order derivatives

Roadmap. XML Indexing. DataGuide example. DataGuides. Strong DataGuides. Multiple DataGuides for same data. CPS Topics in Database Systems

Week 3: Connected Subgraphs

CS 361 Meeting 12 10/3/18

cycle that does not cross any edges (including its own), then it has at least

EXST Regression Techniques Page 1

From Elimination to Belief Propagation

Propositional Logic. Combinatorial Problem Solving (CPS) Albert Oliveras Enric Rodríguez-Carbonell. May 17, 2018

Construction of asymmetric orthogonal arrays of strength three via a replacement method

1 Isoparametric Concept

Derangements and Applications

The Matrix Exponential

The Matrix Exponential

Strongly Connected Components

3 Finite Element Parametric Geometry

Searching Linked Lists. Perfect Skip List. Building a Skip List. Skip List Analysis (1) Assume the list is sorted, but is stored in a linked list.

Search sequence databases 3 10/25/2016

Exam 1. It is important that you clearly show your work and mark the final answer clearly, closed book, closed notes, no calculator.

Elements of Statistical Thermodynamics

Application of Vague Soft Sets in students evaluation

What are those βs anyway? Understanding Design Matrix & Odds ratios

Addition of angular momentum

The Equitable Dominating Graph

On spanning trees and cycles of multicolored point sets with few intersections

Abstract Interpretation: concrete and abstract semantics

CPSC 665 : An Algorithmist s Toolkit Lecture 4 : 21 Jan Linear Programming

That is, we start with a general matrix: And end with a simpler matrix:

Slide 1. Slide 2. Slide 3 DIGITAL SIGNAL PROCESSING CLASSIFICATION OF SIGNALS

Estimation of apparent fraction defective: A mathematical approach

Homework #3. 1 x. dx. It therefore follows that a sum of the

First derivative analysis

22/ Breakdown of the Born-Oppenheimer approximation. Selection rules for rotational-vibrational transitions. P, R branches.

GEOMETRICAL PHENOMENA IN THE PHYSICS OF SUBATOMIC PARTICLES. Eduard N. Klenov* Rostov-on-Don, Russia

Final Exam Solutions

Einstein Equations for Tetrad Fields

Category Theory Approach to Fusion of Wavelet-Based Features

Where k is either given or determined from the data and c is an arbitrary constant.

COMPUTER GENERATED HOLOGRAMS Optical Sciences 627 W.J. Dallas (Monday, April 04, 2005, 8:35 AM) PART I: CHAPTER TWO COMB MATH.

General Notes About 2007 AP Physics Scoring Guidelines

Estimation of odds ratios in Logistic Regression models under different parameterizations and Design matrices

Aim To manage files and directories using Linux commands. 1. file Examines the type of the given file or directory

Approximation and Inapproximation for The Influence Maximization Problem in Social Networks under Deterministic Linear Threshold Model

Addition of angular momentum

Data Assimilation 1. Alan O Neill National Centre for Earth Observation UK

Basic Polyhedral theory

MATH 319, WEEK 15: The Fundamental Matrix, Non-Homogeneous Systems of Differential Equations

BINOMIAL COEFFICIENTS INVOLVING INFINITE POWERS OF PRIMES

Middle East Technical University Department of Mechanical Engineering ME 413 Introduction to Finite Element Analysis

Recall that by Theorems 10.3 and 10.4 together provide us the estimate o(n2 ), S(q) q 9, q=1

Hydrogen Atom and One Electron Ions

Evaluating Reliability Systems by Using Weibull & New Weibull Extension Distributions Mushtak A.K. Shiker

Thus, because if either [G : H] or [H : K] is infinite, then [G : K] is infinite, then [G : K] = [G : H][H : K] for all infinite cases.

Abstract Interpretation. Lecture 5. Profs. Aiken, Barrett & Dill CS 357 Lecture 5 1

Section 6.1. Question: 2. Let H be a subgroup of a group G. Then H operates on G by left multiplication. Describe the orbits for this operation.

Symmetric centrosymmetric matrix vector multiplication

A Propagating Wave Packet Group Velocity Dispersion

Supplementary Materials

Function Spaces. a x 3. (Letting x = 1 =)) a(0) + b + c (1) = 0. Row reducing the matrix. b 1. e 4 3. e 9. >: (x = 1 =)) a(0) + b + c (1) = 0

Introduction to Arithmetic Geometry Fall 2013 Lecture #20 11/14/2013

SCHUR S THEOREM REU SUMMER 2005

COUNTING TAMELY RAMIFIED EXTENSIONS OF LOCAL FIELDS UP TO ISOMORPHISM

Fourier Transforms and the Wave Equation. Key Mathematics: More Fourier transform theory, especially as applied to solving the wave equation.

u x v x dx u x v x v x u x dx d u x v x u x v x dx u x v x dx Integration by Parts Formula

Square of Hamilton cycle in a random graph

SOME PARAMETERS ON EQUITABLE COLORING OF PRISM AND CIRCULANT GRAPH.

VII. Quantum Entanglement

Homotopy perturbation technique

Finding low cost TSP and 2-matching solutions using certain half integer subtour vertices

UNTYPED LAMBDA CALCULUS (II)

ME 321 Kinematics and Dynamics of Machines S. Lambert Winter 2002

Types of Transfer Functions. Types of Transfer Functions. Types of Transfer Functions. Ideal Filters. Ideal Filters

Linear-Phase FIR Transfer Functions. Functions. Functions. Functions. Functions. Functions. Let

u r du = ur+1 r + 1 du = ln u + C u sin u du = cos u + C cos u du = sin u + C sec u tan u du = sec u + C e u du = e u + C

CS 6353 Compiler Construction, Homework #1. 1. Write regular expressions for the following informally described languages:

DIFFERENTIAL EQUATION

ANALYSIS IN THE FREQUENCY DOMAIN

MCB137: Physical Biology of the Cell Spring 2017 Homework 6: Ligand binding and the MWC model of allostery (Due 3/23/17)

A. Limits and Horizontal Asymptotes ( ) f x f x. f x. x "±# ( ).

EEO 401 Digital Signal Processing Prof. Mark Fowler

There is an arbitrary overall complex phase that could be added to A, but since this makes no difference we set it to zero and choose A real.

2.3 Matrix Formulation

Full Waveform Inversion Using an Energy-Based Objective Function with Efficient Calculation of the Gradient

Background: We have discussed the PIB, HO, and the energy of the RR model. In this chapter, the H-atom, and atomic orbitals.

CE 530 Molecular Simulation

COHORT MBA. Exponential function. MATH review (part2) by Lucian Mitroiu. The LOG and EXP functions. Properties: e e. lim.

First order differential equation Linear equation; Method of integrating factors

Mutually Independent Hamiltonian Cycles of Pancake Networks

NEW APPLICATIONS OF THE ABEL-LIOUVILLE FORMULA

Sliding Mode Flow Rate Observer Design

Solution of Assignment #2

Recursive Estimation of Dynamic Time-Varying Demand Models

Learning Spherical Convolution for Fast Features from 360 Imagery

Text: WMM, Chapter 5. Sections , ,

Analysis of Algorithms - Elementary graphs algorithms -

Quasi-Classical States of the Simple Harmonic Oscillator

Examples and applications on SSSP and MST

Analysis of Algorithms - Elementary graphs algorithms -

On the irreducibility of some polynomials in two variables

Transcription:

Enumrating Unlabld and Root Labld Trs for Causal Modl Acquisition Yang Xiang, Zo Jingyu Zhu, and Yu Li Univrsity of Gulph, Canada Abstract. To spcify a Bays nt (BN), a conditional probability tabl (CPT), oftn of an ffct conditiond on its n causs, nds to b assssd for ach nod. It gnrally has th complxity xponntial on n. Th non-impding noisy-and (NIN-AND) tr is a rcntly dvlopd causal modl that rducs th complxity to linar, whil modling both rinforcing and undrmining intractions among causs. Acquisition of an NIN-AND tr modl involvs licitation of a linar numbr of probability paramtrs and a tr structur. Instad of asking th human xprt to dscrib th structur from scratch, in this work, w dvlop a two-stp mnu slction tchniqu that aids structur acquisition. 1 Introduction To spcify a BN, a CPT nds to b assssd for ach non-root nod. It is oftn advantagous to construct BNs along th causal dirction, in which cas a CPT is th distribution of an ffct conditiond on its n causs. In gnral, assssmnt of a CPT has th complxity xponntial on n. Noisy-OR [7] is th most wll known causal modl that rducs this complxity to linar. A numbr of xtnsions hav also bn proposd such as [4, 3, 5]. Howvr, noisy-or, as wll as rlatd causal modls, can only rprsnt rinforcing intractions among causs [9]. Th NIN- AND tr [9] is a rcntly proposd causal modl. As noisy-or, th numbr of probability paramtrs to b licitd is linar on n. Furthrmor, it allows modling of both rinforcing and undrmining intractions among causs. Th structur of causal intractions is ncodd as a tr of a linar numbr of nods which must b licitd in addition. An NIN-AND tr can b acquird by asking th xprt to dscrib th tr structur from scratch. Whn th numbr of causs is mor than 3, dscribing th targt NIN-AND tr accuratly may b challnging. In this work, w dvlop a mnu slction tchniqu that aids th structur acquisition. W propos a compact rprsntation through which an NIN-AND tr structur is dpictd as a partially labld tr of multipl roots and a singl laf, calld a root-labld tr. As thr ar too many root-labld trs for a givn numbr of causs, w divid th mnu slction into 2 stps. In th first stp, th human xprt is prsntd with an numration of unlabld trs for th givn numbr of causs, and is askd to slct on. In th scond stp, th xprt is prsntd with an numration of root-labld trs that ar isomorphic to th slctd unlabld tr. Th two-stp mnu slction rducs significantly th total numbr of altrnativs to b prsntd. It lowrs th ovrall cognitiv load to th xprt and is xpctd to improv th accuracy and fficincy of NIN-AND tr modl acquisition.

To implmnt th two-stp mnu slction, a propr st of tr structurs must b numratd at ach stp. For th first stp, w draw from a tchniqu from phylogntics [2] for counting volutionary tr shaps, which ar unlabld trs of a singl root and multipl lavs. W xtnd th tchniqu for counting to an algorithm for numration (gnration) of unlabld trs of multipl roots and a singl laf. For th scond stp, w dvlop a nw algorithm to numrat root-labld trs isomorphic to a givn unlabld tr. 2 Background This sction is mostly basd on [9]. An uncrtain caus is a caus that can produc an ffct but dos not always do so. Dnot a st of binary caus variabls as X = {c 1,..., c n } and thir ffct variabl (binary) as. For ach c i, dnot c i = tru by c i and c i = fals by c i. Similarly, dnot = tru by and = fals by. A causal vnt rfrs to an vnt that a caus c i causd an ffct to occur succssfully. Dnot this causal vnt by c i and its probability by P ( c i ). Th causal failur vnt, whr is fals whn c i is tru, is dnotd as c i. Dnot th causal vnt that a st X = {c 1,..., c n } of causs causd by c 1,..., c n or x. Dnot th st of all causs of by C. Th CPT P ( C) rlats to probabilitis of causal vnts as follows: If C = {c 1,c 2,c 3 }, thn P ( c 1,c 2,c 3 )=P( c 1,c 3 ). Causs rinforc ach othr if collctivly thy ar at last as ffctiv in causing th ffct as som acting by thmslvs. If collctivly thy ar lss ffctiv, thn thy undrmin ach othr. Th following dfins th 2 typs of causal intractions gnrally. Dfinition 1 Lt R = {W 1,W 2,...} b a partition of a st X of causs, R R, and Y = Wi R W i. Sts of causs in R rinforc ach othr, iff R P ( y ) P ( x ). Sts of causs in R undrmin ach othr, iff R P ( y ) >P( x ). Disjoint sts of causs W 1,..., W m satisfy failur conjunction iff ( w 1,..., w m )=( w 1 )... ( w m ). That is, collctiv failur is attributd to individual failurs. Thy also satisfy failur indpndnc iff P (( w 1 )... ( w m)) = P ( w 1 )... P ( w m ). Disjoint sts of causs W 1,..., W m satisfy succss conjunction iff w 1,..., w m =( w 1 )... ( w m ). That is, collctiv succss rquirs individual ffctivnss. Thy also satisfy succss indpndnc iff P (( w 1 )... ( w m)) = P ( w 1 )... P ( w m). It has bn shown that causs ar rinforcing whn thy satisfy failur conjunction and indpndnc, and thy ar undrmining whn thy satisfy succss conjunction and indpndnc. Hnc, undrmining can b modld by a dirct NIN-AND gat (Fig. 1, lft), and rinforcmnt by a dual NIN-AND gat (middl). 2

c1 cn... c1 cn... c 1, c 2, c3 c 1 c2 c3 c4 c 1,...,c n c 1,...,c n c 1, c 2, c 3, c4 Fig. 1. (Lft) Dirct NIN-AND gat. (Middl) Dual NIN-AND gat. (Right) Th structur of a NIN-AND tr causal modl. As pr Df. 1, a st of causs can b rinforcing (undrmining), but th st is undrmining (rinforcing) with anothr st. Such causal intraction can b modld by a NIN-AND tr. As shown in Fig. 1 (right), causs c 1 through c 3 ar undrmining, and thy ar collctivly rinforcing c 4. Th following dfins NIN-AND tr modls in gnral: Dfinition 2 Th structur of an NIN-AND tr is a dirctd tr for ffct and a st X = {c 1,..., c n } of occurring causs. 1. Thr ar 2 typs of nods. An vnt nod (a black oval) has an in-dgr 1 and an out-dgr 1. Agat nod (a NIN-AND gat) has an in-dgr 2 and an out-dgr 1. 2. Thr ar 2 typs of links, ach conncting an vnt and a gat along inputto-output dirction of gats. A forward link (a lin) is implicitly dirctd. A ngation link (with a whit oval at on nd) is xplicitly dirctd. 3. Each trminal nod is an vnt labld by a causal vnt y or y. Thr is a singl laf (no child) with y = x, and th gat it conncts to is th laf gat. For ach root (no parnt; indxd by i), y x, i y j y = for j k, and k i y = x. i 4. Inputs to a gat g ar in on of 2 cass: (a) Each is ithr connctd by a forward link to a nod labld y, or by a ngation link to a nod labld y. Th output of g is connctd by a forward link to a nod labld i y. i (b) Each is ithr connctd by a forward link to a nod labld y, or by a ngation link to a nod labld y. Th output of g is connctd by a forward link to a nod labld i y. i An NIN-AND tr modl for ffct and its causs C can b obtaind by liciting its structur (with C roots) and C singl-caus probabilitis P ( c i ) on for ach root vnt in th structur. Th CPT P ( C) can thn b drivd using th modl. By dfault, ach root vnt in a NIN-AND tr is a singl-caus vnt, and all causal intractions satisfy failur (or succss) conjunction and indpndnc. If a subst of causs do not satisfy ths assumptions, suitabl multi-caus probabilitis P ( x ), whr X C, can b dirctly licitd and incorporatd into th NIN-AND tr modl. Th dfault is assumd in this papr. 3

Som additional notations usd in th papr ar introducd blow. Th numbr of combinations of n objcts takn k at a tim without rptition is dnotd C(n, k). W assum that th n objcts ar intgrs 0 through n 1. Each combination is rfrrd to as a k-combination of n objcts. W assum n<10 and k-combinations can b stord in an array, say, cb. Thus w rfr to th i th k- combination by cb[i]. W dnot th numbr of k-combinations of n objcts with rptition by C (n, k). Not C (n, k) =C(n k 1,k). A partition of a positiv intgr n is a st of positiv intgrs which sum to n. Each intgr in th st is a part. Abas of m units is a tupl of m positiv intgrs s =(s m 1,..., s 0 ). A mixd bas numbr associatd with a bas s is a tupl x =(x m 1,..., x 0 ) whr 0 x i <s i. Each x i (i>0) has th wight w i = s i 1... s 0 and th wight of x 0 is 1. Each intgr k in th rang 0 through s m 1... s 0 1 can b rprsntd as a mixd bas numbr x such that k = m 1 i=0 x i w i. For bas b =(3, 2), intgrs 0 through 5 can b rprsntd in that ordr as (0, 0), (0, 1), (1, 0), (1, 1), (2, 0), (2, 1). W dnot an array z of k lmnts by z[0..k 1]. 3 Compact Rprsntation of NIN-AND Tr Structur NIN-AND tr modls allow a CPT of gnrally xponntial complxity to b obtaind by liciting a tr structur and a linar numbr of probabilitis of singl-caus vnts. [9] rlis on th human xprt to dscrib th tr topology. Whn th numbr of causs is mor than 3, accurat dscription may b cognitivly dmanding. As w will show, for 4 causs, thr ar 52 altrnativ NIN-AND tr structurs. A bttr altrnativ is to show th xprt a mnu of all possibl structurs from which on can b slctd. To construct th mnu, w nd to numrat altrnativ structurs. To facilitat th numration, w sk a compact rprsntation of NIN-AND tr structur. c 1 c2 c, c 1 2 c 1, c 2, c3 c3 c4 c 1, c 2, c 3, c4 Fig. 2. An NIN-AND tr structur corrsponding to th sam causal modl as that in Fig. 1 (right). First, w obsrv that th NIN-AND tr structur in Fig. 2 and that in Fig. 1 (right) corrspond to th sam causal modl. In both structurs, causs c 1 through c 3 ar undrmining, and thy ar collctivly rinforcing c 4. W rgard th structur in Fig. 2 as suprfluous and that in Fig. 1 (right) as minimal, 4

according to Df. 3 blow. Our first stp towards a compact structur rprsntation is to adopt minimal structurs. Dfinition 3 Lt τ b an NIN-AND tr structur. If τ contains a gat t that outputs to anothr gat g of th sam typ (dirct or dual), dlt t and connct its inputs to g. If such dltion is possibl, τ is suprfluous. Apply such dltions until no longr possibl. Th rsultant NIN-AND tr structur is minimal. In a minimal NIN-AND tr structur, if th laf gat g is a dirct gat, thn all gats outputting to g ar dual, and thir inputs ar all from dirct gats. That is, from th laf towards root nods, gats altrnat in typs. This altrnation implis that, for vry minimal NIN-AND tr structur τ with a dirct laf gat, thr xists a minimal NIN-AND tr τ rplacing ach gat in τ with its opposit typ, and vic vrsa. Thrfor, if w know how to numrat NIN-AND tr structurs for a givn numbr of causs and with a dirct laf gat, w also know how to numrat structurs with a dual laf gat. Hnc, our scond stp towards a compact structur rprsntation is to focus only on minimal structurs with dirct laf gats. In a minimal structur with a dirct laf gat, typs of all othr gats ar uniquly dtrmind. If all root vnts ar spcifid (i.., root nods labld), thn th causal vnt for vry non-root nod is uniquly dtrmind. Not, howvr, spcification of root vnts is partially constraind. For xampl, in Fig. 1 (right), sinc th laf gat is dual, vry root vnt connctd to th top gat must b a causal succss (rathr than failur). Hnc, our third stp towards a compact structur rprsntation is to omit labls for all non-root nods. In an NIN-AND tr structur, ach gat nod is connctd to its uniqu output vnt. Hnc, out final stp towards a compact structur rprsntation is to omit ach gat nod and connct its input vnt nods to its output nod. As th rsult, our compact rprsntation of th structur of ach NIN-AND tr modl is a minimal tr consisting of vnt nods with only root nods labld. Its (implicit) laf gat is a dirct gat. Fig. 3 (a) shows th rsultant rprsntation for th NIN-AND tr in Fig. 1 (right). Following th convntion in Df. 2, all links ar implicitly dirctd (downwards away from labld nods). W rfr to th graphical rprsntation as root-labld tr. Not that lft-right ordr of parnts maks no diffrnc. For instanc, Fig. 3 (b) is th sam rootlabld tr as (a), whras (c) is a diffrnt root-labld tr from (a). c 2 c 1 c 3 c 3 c1 c2 c 4 c 1 c 3 4 c 4 c (a) (b) (c) c 2 Fig. 3. Compact rprsntations of NIN-AND tr structurs. Thorm 1 stablishs th rlation btwn numration of root-labld trs and numration of NIN-AND tr modl structurs. 5

Thorm 1 Lt Ψ b th collction of NIN-AND tr modls for n causs and Ψ b th collction of root-labld trs with n roots. Th following hold: 1. Ψ =2 Ψ. 2. For ach NIN-AND tr modl in Ψ, a uniqu tr in Ψ can b obtaind by minimizing th structur of th modl, rmoving its gat nods, and rmoving labls of non-root nods. 3. For ach tr in Ψ, minimal structurs of 2 NIN-AND tr modls in Ψ can b obtaind by adding gat nods to th tr, labling th laf gat as dirct or dual, and labling othr non-root nods accordingly. 4 Enumration of Unlabld NIN-AND Tr Structurs Du to Thorm 1, w can numrat NIN-AND tr modl structurs for n causs by numrating root-labld trs with n roots. Th list of structurs can thn b prsntd to th xprt for mnu slction. Howvr, whn n>3, thr ar too many root-labld trs (and twic as many minimal modl structurs). With 4 roots, thr ar 26 root-labld trs corrsponding to 52 minimal NIN- AND tr modl structurs. With 5 roots, th numbrs ar 236 and 472. To rduc th cognitiv load to th xprt, w divid th mnu slction into 2 stps. In th first stp, only unlabld trs will b prsntd. With 4 roots, th mnu siz is 5. Aftr th xprt slcts an unlabld tr, ithr rootlabld trs or minimal NIN-AND tr structurs corrsponding to th choic will b prsntd for th scond slction. For instanc, if th unlabld tr corrsponding to Fig. 3 (a) is slctd in th first stp, a total of 4 root-labld trs (or 8 NIN-AND tr structurs) will b prsntd for scond slction: at most 58 = 13 itms (rathr than 52) prsntd in both stps. Th two-stp slction can b rpatd until th xprt is satisfid with th final slction. Th advantag is th much rducd total numbr of mnu itms prsntd. To raliz th two-stp mnu slction, w first nd to numrat unlabld trs (of a singl laf) givn th numbr of roots. Many mthods of tr numration in th litratur,.g., [1, 8, 6], do not addrss this problm. On xcption is a tchniqu from phylogntics [2] for counting volutionary tr shaps. Th tchniqu is closly rlatd to our task but nds to b xtndd bfor bing applicabl: First, [2] considrs unlabld dirctd trs with a singl root and multipl lavs (calld tips). Thos trs of a givn numbr of tips ar countd. What w nd to considr ar unlabld dirctd trs with a singl laf and multipl roots. This diffrnc can b asily dalt with, which amounts to rvrsal of dirctions for all links. Scond, [2] rprsnts ths trs with a format incompatibl with th standard notion of graph, whr som link is connctd to a singl nod instad of two (s, for xampl, Fig. 3.5 in [2]). Third, [2] considrs only counting of ths trs, whil w nd to numrat (gnrat) thm. Nvrthlss, th ida in [2] for counting so calld rootd multifurcating tr shaps is an lgant on. Algorithm EnumratUnlabldTr(n) xtnds it to numrat unlabld trs with a singl laf and a givn numbr n of roots. 6

Algorithm 1 EnumratUnlabldTr(n) Input: th numbr of roots n. 1 initializ list T 1 to includ a singl unlabld tr of on laf and on root; 2 for i =2to n, 3 numrat partitions of i with at last 2 parts; 4 for ach partition ptn of t distinct parts (p 0,..., p t 1 ), 5 crat arrays z[0..t 1], s[0..t 1] and cbr[0..t 1][][]; 6 for j =0to t 1, 7 z[j] =numbr of occurrncs of p j in ptn; 8 m = T pj ; 9 s[j] =C (m, z[j]); 10 cbr[j] stors z[j]-combinations of m objcts with rptition; 11 count =1; 12 for j =0to t 1, count = count s[j]; 13 for q =0to count 1, 14 convrt q to a mixd bas numbr b[0..t 1] using bas s[0..t 1]; 15 subtr st S = ; 16 for j =0to t 1, 17 if z[j] =1, add tr T pj [b[j]] to S; 18 ls gt combination cb = cbr[j][b[j]]; 19 for ach numbr x in cb, add tr T pj [x] to S; 20 T = MrgUnlabldT r(s); 21 add T to T i ; 22 rturn T n ; T [0] 1 T [0] 2 T [0] 3 T [1] 3 T [6] (a) (b) T 4 [2] 5 (c) (d) () (f) (g) T 5 [9] (h) T 6 [17] (i) T 6 [27] Fig. 4. (a), (b) Th only unlabld tr of on and 2 roots, rspctivly. (c), (d) Th only trs of 3 roots. () A tr of 4 roots. (f), (g) Trs of 5 roots. (h), (i) Trs of 6 roots. Links ar implicitly dirctd downwards. Lin 1 crats T 1 =(T 1 [0]) with T 1 [0] shown in Fig. 4 (a). Th first itration (i = 2) of for loop startd at lin 2 crats T 2 =(T 2 [0]) with T 2 [0] shown in Fig. 4 (b). Th nxt itration (i = 3) crats T 3 =(T 3 [0],T 3 [1]) shown in (c) and (d). Th loop continus to build ach tr list of an incrasing numbr of roots, until th list for i = n roots is obtaind. In lin 3, th st of partitions of i with 2 or mor parts is obtaind. For instanc, for i = 4, th st is {{3, 1}, {2, 2}, {2, 1, 1}, {1, 1, 1, 1}}.Fori = 5, th st is {{4, 1}, {3, 2}, {3, 1, 1}, {2, 2, 1}, {2, 1, 1, 1}, {1, 1, 1, 1, 1}}. Each partition signifis how a tr of 4 roots can b assmbld from subtrs. For xampl, {3, 2} mans that a tr of 5 roots can b assmbld by mrging a subtr of 3 roots (an lmnt of T 3 ) with a subtr of 2 root (an lmnt of T 2 ). Th for loop startd at lin 4 itrats through ach partition to numrat th corrsponding 7

trs. Lins 5 through 12 count th numbr of trs from th givn partition and spcify indxs of subtrs to b mrgd in cbr[]. For ach nw tr, lins 13 through 21 rtriv rlvant subtrs and mrg thm. If a part p appars in a partition onc (countd by z[j] in lin 7), thn list T p contributs on subtr to ach nw tr. This can b don in m = T p ways (lin 8). It is countd by s[j] in lin 9, whr C (m, 1) = C(m, 1) = m. Th cbr[j] in lin 10 will b (cbr[j][0],..., cbr[j][m 1]) whr ach cbr[j][k] =(k) is a 1-combination that indxs th m lmnts in T p. For xampl, considr th itration of th for loop startd at lin 4 with ptn = {3, 2} and hnc (p 0,p 1 )=(3, 2). Aftr lin 10, w hav occurrnc counting (z[0],z[1]) = (1, 1). It is usd to produc s[0] = C (2, 1) = 2, s[1] = C (1, 1) = 1, and combinations (cbr[0][0], cbr[0][1]) = ((0), (1)) and cbr[1][0] = (0). Th total numbr of distinct trs du to th partition is countd by th product of s[j]. For instanc, lin 12 producs count = 2, which says that thr ar 2 unlabld trs in T 5 du to partition {3, 2}. If a part p appars in a partition z[j] > 1 tims, thn list T p contributs z[j] subtrs to ach nw tr. This can b don in C (m, z[j]) ways (lin 8). It is countd by s[j] in lin 9. For xampl, considr th itration of th for loop startd at lin 4 with ptn = {3, 3} and hnc p 0 = 3 and z[0] = 2. Now s[0] = C (2, 2) = 3 and (cbr[0][0], cbr[0][1], cbr[0][2]) = ((0, 0), (1, 0), (1, 1)). Each itration of th for loop startd at lin 13 obtains a nw tr in T i. Th rlvant subtrs from arlir tr lists ar rtrivd and thn mrgd into a nw tr. Considr ptn = {3, 2}, (s[0],s[1]) = (2, 1), (cbr[0][0],cbr[0][1]) = ((0), (1)) and cbr[1][0] = (0) mntiond abov. For q = 1, lin 14 producs (b[0],b[1]) = (1, 0). Each itration of th for loop startd at lin 16 adds on or mor subtrs to S basd on th mixd bas numbr b[]. Sinc (z[0],z[1]) = (1, 1), th first itration adds T 3 [1] to S and th nxt itration adds T 2 [0]. Thy ar mrgd into unlabld tr T 5 [6] shown in Fig. 4 (f). Nxt, considr ptn = {3, 3}, s[0] = 3, and (cbr[0][0], cbr[0][1], cbr[0][2]) = ((0, 0), (1, 0), (1, 1)). Th loop startd at lin 13 itrats 3 tims. For q =2,w hav b[0] = 2. At lin 18, cb = cbr[0][2] = (1, 1). At lin 19, 2 copis of T 3 [1] (s Fig. 4) ar addd to S. Nxt, considr MrgUnlabldTr(). Two unlabld trs t and t of i and j i roots rspctivly may b mrgd in 3 ways to produc a tr of ij roots: M 1 Thir laf nods ar mrgd, which is how T 2 [0] is obtaind from 2 copis of T 1 [0] (s Fig. 4). M 2 Th laf of t bcom th parnt of th laf of t, which is how T 3 [0] is obtaind from T 1 [0] and T 2 [0]. Not that rols of t and t cannot b switchd. M 3 Both laf nods may bcom th parnts of a nw laf nod, which is how T 2 [0] and T 3 [1] ar mrgd to produc T 5 [6]. Whn k>2 subtrs ar mrgd into a nw tr, 2 subtrs ar mrgd first and th rmaining subtrs ar mrgd into th intrmdiat tr on by on. Which of th 3 ways of mrging is usd at ach stp is critical. Incorrct choic producs som trs multipl tims whil omitting othrs. Th rsultant T i will not b an numration. MrgUnlabldTr() is dtaild blow: 8

Algorithm 2 MrgUnlabldTr(S) Input: a st S of k 2 unlabld (sub)trs. 1 sort trs in S in ascnding ordr of numbr of roots as (t 0,..., t k 1 ); 2ift 0 has on root and t 1 has on root, mrg thm to t by M 1 ; 3 ls if t 0 has on root and t 1 has 2 or mor roots, mrg thm to t by M 2 ; 4 ls mrg thm to t by M 3 ; 5 for i =2to k 1, 6 if t i has on root, mrg t and t i to t by M 1 ; 7 ls mrg t and t i to t by M 2 ; 8 t = t ; 9 rturn t; EnumratUnlabldTr(n) corrctly numrats unlabld trs of n roots. A formal proof of corrctnss is byond th spac limit. Our implmntation gnrats list T n whos cardinality is shown in Tabl 1 for n 10: Tabl 1. Cardinality of T n for n 10. n 1 2 3 4 5 6 7 8 9 10 T n 1 1 2 5 12 33 90 261 766 2312 5 Enumrat Root-Labld Trs Givn Unlabld Tr To raliz th scond stp of mnu slction, w numrat root-labld trs for a givn unlabld tr of n roots. Sinc lft-right ordr of causal vnts into th sam NIN-AND gat dos not mattr, th numbr of root-labld trs is lss than n!. W propos th following algorithm basd on th ida of assigning labls to ach group of roots with mirror subtr (dfind blow) handling. It numrats root-labld trs corrctly, although a formal proof is byond spac limit. Th root-labld trs ar plottd as thy ar numratd. Algorithm 3 EnumratRootLabldTr(t) Input: an unlabld tr t of n roots. 1 if all root nods hav th sam child; 2 labl roots using n labls in arbitrary ordr; 3 plot th root-labld tr; 4 grp = grouping of roots with th sam child nods; 5 sarch for mirror subtrs using grp; 6 if no mirror subtrs ar found, EnumratNoMirrorRLT(t, grp); 7 ls EnumratMirrorRLT(t, grp); Lins 1 to 3 handl cass such as T 3 [1] (Fig. 4). Othrwis, roots of th sam child nods ar groupd in lin 4. For T 5 [6] (Fig. 4), w hav 2 groups of sizs 2 and 3. Two labls out of 5 can b assignd to th lft group of siz 2 in C(5, 2) = 10 ways and th right group can b labld using rmaining labls. Hnc, T 5 [6] has 10 root-labld trs. It contains no mirror subtrs (which w will xplain latr) and lin 6 is xcutd, as dtaild blow: 9

Algorithm 4 EnumratNoMirrorRLT(t, grp) Input: an unlabld tr t of r roots without mirror subtr; grouping grp of roots with common child nods. 1 n = r; 2 g = numbr of groups in grp; 3 for i =0to g 2, 4 k = numbr of roots in group i; 5 s[i] =C(n, k); 6 cb[i] stors k-combinations of n objcts without rptition; 7 n = n k; 8 count =1; 9 for i =0to g 2, count = count s[i]; 10 for i =0to count 1, 11 initializ lab[0..r 1] to r root labls; 12 convrt i to a mixd bas numbr b[0..g 2] using bas s[0..g 2]; 13 for j =0to g 2, 14 gt combination gcb = cb[j][b[j]]; 15 for ach numbr x in gcb, labl a root in group j by lab[gcb[x]]; 16 rmov labls indxd by gcb from lab[]; 17 labl roots in group g 1 using labls in lab[]; 18 plot th root labld tr; In EnumratNoMirrorRLT(), lins 3 to 7 procss roots group by group. For ach group (xcpt th last on) of siz k, th numbr of ways that k labls can b slctd from n is rcordd in s[i]. Hr, n is initializd to th numbr of roots (lin 1), and is rducd by k aftr ach group of siz k is procssd (lin 7). Th labls in ach slction ar indxd by cb[i]. Lins 8 and 9 count th total numbr of root labld trs isomorphic to t. Lins 10 and onwards numrat and plot ach root-labld tr. Tr indx i is convrtd to a mixd bas numbr b[]. Each b[j] is thn usd to rtriv th labl indxs in cb[i] (lin 14). Th labl list lab[] is initializd in lin 11, whos lmnts ar usd to labl a root group in lin 15, and th list is updatd in lin 16. Th first g 1 groups ar labld in th for loop of lins 13 to 16. Th last group is labld in lin 17. Nxt, w considr T 4 [2] in Fig. 4 (). It has 2 root groups of siz 2 and th lft group can b assignd 2 labls in C(4, 2) = 6 ways. Howvr, half of thm switch th labling btwn lft and right group in th othr half. Hnc, th numbr of root-labld trs for T 4 [2] is 3, not 6. Applying EnumratNoMirrorRLT() to T 4 [2] would b incorrct. W dfin mirror subtrs for such cass. Dfinition 4 A subtr s in an unlabld tr t is a subgraph consisting of a non-root, non-laf nod of t (as th laf of s) and all its ancstors in t. Two subtrs s and s ar mirror subtrs if thy ar isomorphic, ach has mor than on root nod, and th laf of s and th laf of s hav th sam path lngth from th laf of t in t. T 4 [2] in Fig. 4 () has 2 mirror subtrs, ach of which is a copy of T 2 [0], and so dos T 5 [9] in (g). T 6 [17] in (h) has 2 mirror subtrs, ach of which is a 10

copy of T 3 [0]. T 6 [27] in (i) has 3 mirror subtrs, ach of which is a copy of T 2 [0]. Non of th othr trs in Fig. 4 has mirror subtrs. In gnral, a tr of n 4 roots may hav mirror subtrs from T [n/2], whr [.] dnots th floor function. Tabl 2 shows th possibl numbr and typ of mirror subtrs for n 7. Tabl 2. Numbr of mirror subtrs that may b prsnt in a tr of n roots. n 1 2 3 4 5 6 7 T 2[0] 0 0 0 2 2 2or32or3 T 3[0] 0 0 0 0 0 2 2 T 3[1] 0 0 0 0 0 2 2 At lin 5 of EnumratRootLabldTr(), mirror subtrs ar sarchd. Most trs ar rjctd basd on thir grp. Othrwis, if th grp of a tr is compatibl with a pattrn in Tabl 2, its laf is rmovd, splitting it into subtrs rcursivly, and possibl mirror subtrs ar dtctd. If mirror subtrs ar found, at lin 7, EnumratMirrorRLT() is prformd. W prsnt its ida but not psudocod. Suppos an unlabld tr t with mirror subtrs and n roots hav k n roots in mirror subtrs. If n k>0, rmaining roots ar labld first in th sam way as EnumratNoMirrorRLT(). Thn, for ach partially root-labld tr, mirror subtrs ar root-labld. For xampl, for T 5 [9] in Fig. 4 (g), th lft-most root can b labld in 5 ways as usual, using up on labl. Th first mirror subtr is labld in C(4, 2)/2 = 3 ways, using up anothr 2 labls. Th scond mirror subtr is thn labld using th rmaining labls. For T 6 [27] in (i), th first mirror subtr is labld in C(6, 2)/3 = 5 ways, using up 2 labls. Th scond mirror subtr is labld in C(4, 2)/2 = 3 ways, using up anothr 2 labls. Th third mirror subtr is thn labld using th rmaining labls. Tabl 3 shows th numbr of root-labld trs givn som unlabld trs in Fig. 4 as numratd by our implmntation of EnumratRootLabldTr(). Tabl 3. Numbr of root-labld trs for som givn unlabld trs. Unlabld tr T 4[2] T 5[6] T 5[9] T 6[17] T 6[27] No. root-labld trs 3 10 15 90 15 Tabl 4 shows th total numbr of root-labld trs with n roots for n 7. Sinc T 7 contains 90 unlabld trs (Tabl 1), ach has on avrag 39208/90 435 root-labld trs. Its implication is discussd in th nxt sction. Tabl 4. Toal numbr of root-labld trs with n roots. n 1 2 3 4 5 6 7 No. root-labld trs 1 1 4 26 236 2752 39208 6 Rmarks As larning from data is limitd by missing valus, small sampls, and cost in data collction, licitation of CPT rmains an altrnativ in constructing BNs 11

whn th xprt is availabl. Du to conditional indpndnc ncodd in BNs, a CPT that involvs mor than 10 causs is normally not xpctd. Evn so, th task of liciting up to 2 10 paramtrs is daunting. NIN-AND trs provid a causal modl that rducs th numbr of paramtrs to b licitd to linar (10 for 10 binary causs), whil capturing both rinforcing and undrmining intractions among causs. A tr-shapd causal structur of a linar numbr of nods (lss than 20 for 10 causs), howvr, must b licitd in addition. This contribution proposs th two-stp mnu slction for causal structur licitation. Th tchniqu rducs th cognitiv load on th xprt, compard to structur licitation from scratch or th singl stp mnu slction. For th first stp, w xtnd an ida of counting from phylogntics into an algorithm to numrat NIN-AND tr structurs with unlabld root nods. For th scond stp, w dvlop an algorithm to numrat compltly labld NIN-AND tr structurs givn a structur slctd by th xprt from th first stp. Compard to off-lin numration, our onlin numration is intractiv. Evn though th choic from th first stp may b inaccurat, th two-stp slction can b rpatd asily (in sconds) until th xprt s satisfaction. As th avrag numbr of root-labld trs is byond 400 whn th numbr of causs is byond 7, w bliv that th two-stp mnu slction is practical for licitation of NIN-AND tr (and thus CPT) with up to 7 causs. For CPTs with 8 causs or byond, w hav dvlopd an altrnativ tchniqu to b prsntd lswhr. Empirical valuation of our proposd licitation tchniqus with human xprts is undrway. Acknowldgmnts Financial support from NSERC, Canada through Discovry Grant to th first author is acknowldgd. W thank rviwrs for thir commnts. Rfrncs 1. A. Cayly. A thorm on trs. Quartrly J. Mathmatics, pags 376 378, 1889. 2. J. Flsnstin. Infrring Phylognis. Sinaur Associats, Sundrland, Mass., 2004. 3. S.F. Galan and F.J. Diz. Modling dynamic causal intraction with Baysian ntworks: tmporal noisy gats. In Proc. 2nd Intr. Workshop on Causal Ntworks, pags 1 5, 2000. 4. D. Hckrman and J.S. Brs. Causal indpndnc for probabilistic assssmnt and infrnc using Baysian ntworks. IEEE Trans. on Systm, Man and Cybrntics, 26(6):826 831, 1996. 5. J.F. Lmmr and D.E. Gossink. Rcursiv noisy OR - a rul for stimating complx probabilistic intractions. IEEE Trans. on Systm, Man and Cybrntics, Part B, 34(6):2252 2261, 2004. 6. J.W Moon. Counting Labld Trs. William Clows and Sons, London, 1970. 7. J. Parl. Probabilistic Rasoning in Intllignt Systms: Ntworks of Plausibl Infrnc. Morgan Kaufmann, 1988. 8. J. Riordan. Th numration of trs by hight and diamtr. IBM J., pags 473 478, Nov. 1960. 9. Y. Xiang and N. Jia. Modling causal rinforcmnt and undrmining for fficint cpt licitation. IEEE Trans. Knowldg and Data Enginring, 19(12):1708 1718, 2007. 12