******************************************************************** *These notes contain NDSU...

14
******************************************************************** *These notes contain NDSU confidential and proprietary material. * *Patents are pending on the concepts and applications of bSQ * *organization and P-tree technology, etc. * ******************************************************************** RELATION on {N 1 ,..N n } is a subset of i=1..n N i FUNCTION,f:DR is a relation on {D,R} : {d,r 1 },{d,r 2 }f r 1 =r 2 . Thus we can safely use the notation, r=f(d). Relation, R, on (N,N) (or just a relation on N) is: reflexive if (n,n)R nN symmetric if (n 1 ,n 2 )R (n 2 ,n 1 )R transitive if (n 1 ,n 2 ),(n 2 ,n 1 )R (n 1 ,n 3 )R irreflexive if nN (n,n)R anti-symmetric if (n 1 ,n 2 ),(n 2 ,n 1 )R n 1 =n 2 Order relation on N is a relation on N which is: irreflexive, anti-symmetric and transitive e.g. or in the real numbers, R

Transcript of ******************************************************************** *These notes contain NDSU...

Page 1: ******************************************************************** *These notes contain NDSU confidential and proprietary material. * *Patents are pending.

*********************************************************************These notes contain NDSU confidential and proprietary material. **Patents are pending on the concepts and applications of bSQ **organization and P-tree technology, etc. * ********************************************************************

RELATION on {N1,..Nn} is a subset of i=1..nNi

FUNCTION,f:DR is a relation on {D,R} : {d,r1},{d,r2}f r1=r2.

Thus we can safely use the notation, r=f(d).

Relation, R, on (N,N) (or just a relation on N) is:

reflexive if (n,n)R nNsymmetric if (n1,n2)R (n2,n1)Rtransitive if (n1,n2),(n2,n1)R (n1,n3)Rirreflexive if nN (n,n)Ranti-symmetric if (n1,n2),(n2,n1)R n1=n2

Order relation on N is a relation on N which is:irreflexive,anti-symmetric andtransitive

e.g. or in the real numbers, RRnote that is just

Page 2: ******************************************************************** *These notes contain NDSU confidential and proprietary material. * *Patents are pending.

Equivalence Relation (ER), , on N is a relation on N which is: reflexive

symmetrictransitive

An Equiv Relation induces a canonical partition into equivalence classes.

Partition {N1,…,Nn}, of a set N, is a collection of subset of N (2N) ofmutually exclusive ( N1N2= N1N2{N1,…,Nn} ) andcollectively exhaustive ( {N1,…,Nn}=N ) ( together, the conditions are !{N1,…,Nn}=N ).

A partition induces a canonical equivalence relation: xy iff x and y are in the same partition component.

A function y=f(x) induces a canonical equivalence relation, f, on its domain Df, (and a partition on Df) by x1 f x2 iff f(x1)=f(x2)

A labeled partition of N is a partition, {N1,…,Nn} together with a label function, f:{N1,…,Nn}L (L is the label space).

A function induces a canonical labeled partition on its domain.

A labeled partition, f:{N1,…,Nn}L induces a canonical function f:NL by f(x)=y xf-1(y).

Undirected graph is just a relation on N (unipartite graph).

Page 3: ******************************************************************** *These notes contain NDSU confidential and proprietary material. * *Patents are pending.

UNDIRECTED GRAPH G=(N,E):N={x1,…,xn} (set of nodes)E { {x1,x2}| x1,x2N } (set of edges; set of sets; denoted x1--x2 )

SUBGRAPH, G'=(N',E') of G is a graph : N'N and E'E

GRAPH-PARTITION of a graph G is a set of subgraphs, {G1,…,Gn} : {E1,…,En} is a set partition of E. Each Gi is called a COMPONENT.

PATH (length=k-1) in G is a subgraph, P=(N',E‘) : an ordering of N', (x1,x2,…,xk) : {{x1,x2},…,{xk-1,xk}}=E‘

PATH-CONNECTED GRAPH is : {xi,xj}E’, a path in G from xi to xj.

PATH-CONNECTED GRAPH-PARTITION of a graph is the partition into its path-connected components.

Examples: N={a,b,c,d,e,f,g} E={{a,b},{a,f},{a,g},{b,c},{b,d},{c,d},{d,g},{e,g},{e,f}} Connected Unconnected a b

cdef

g

a b

cdef

g

Page 4: ******************************************************************** *These notes contain NDSU confidential and proprietary material. * *Patents are pending.

DIRECTED GRAPH (digraph): G=(N,E) is a graph : each edge is an ordered pair. I.e., E = set of ordered pairs of nodes. Edges denoted x1x2

DIRECTED SUBGRAPH G'=(N',E') is : N'N and E'E.

PATH in a Directed Graph, G is a subgraph, P=(N',E') : ordering of N', (x1,x2,…,xk) : {(x1,x2),…,(xk-1,xk)}=E’

A Path, (x1,x2,…,xk), is:

TRIVIAL if |N|=1 and |E|=0.

SIMPLE if all xi are distinct except possibly x1 and/or nk.

CYCLIC if it is simple and nontrivial with x1=xk (simple closed path).

MINIMAL if it is cyclic and xi, xj, (xi,xj)E’.

DIRECTED ACYCLIC GRAPH (DAG) is a digraph with no cycles.

SOURCE = node with outgoing but no incoming edges.

SINK = node with incoming but no outgoing edges.

ROOTED DAG = dag with a unique source. 

Page 5: ******************************************************************** *These notes contain NDSU confidential and proprietary material. * *Patents are pending.

If (a,b)E (ab), a is called a PARENT and b is called a CHILD of b.

In a path from a to b, a is an ANCESTOR of b; b is a DESCENDANT of a.

ba, a is a PROPER ANCESTOR of b and b is a PROPER DESCENDANT of a.

ba and neither is ancestor of the other then they are UNRELATED.

TOPOLOGICAL SORT of digraph G is a sequence of all of the nodes of G : if a appears before b in the sequence,then there is no path from b to a.

Proposition: A digraph can be topologically sorted iff it is a dag.

TRANSITIVE CLOSURE: if G=(N,E) is a digraph and G+=(N,E') is : (a,b)E' iff a nontrivial path from a to b in G then G+ is the transitive closure of G. (Proposition below proves that there is just one)

Proposition: G there is 1 and only 1 transitive closure (GG+ a fctn).

The transitive closure is obtained by including in E', (xi,xj) non-trivial path in G from xi to xj.

Proposition: G+ is a dag iff G is a dag.

A dag is TRANSITIVELY CLOSED or just CLOSED iff G=G+.

Page 6: ******************************************************************** *These notes contain NDSU confidential and proprietary material. * *Patents are pending.

TREE = rooted dag with a unique path from the root to each node.

PARTIAL ORDER (POSET): (S,) isirreflexive: a atransitive: if ab and bc then ac

Partial Order L'=(S',') is a RESTRICTION of L=(S,) on domain L‘ if S' S and a,b in S' a ' b iff a b .

L' is a PREFIX of L if L' is restriction and if aS' all S-predecessors of a are also in S'. (Prefix is closed under "predecessorship" operation)

A POSET L=(S,) can be viewed as a dag G=(S,E) where N=S,(a,b)E iff ab

A dag G, can be viewed as PO L, where S=N and ab iff ab and (a,b)C(E)

Note: Given a POSET, L, we often diagram it as a DAG using the duality just described.  However, since a diagram is intended to help visualize, and therefore should not be cluttered, we generally do not include all edges (don't display the closure - in fact usually display the minimal dag that corresponds to the POSET.

QUESTION: Is it correct to say THE mininmal dag here? Is this theorem true?  Given a dag, G=(S,E) there exists a unique subdag G'=(S,E') such that C(G') = C(G) and if G''=(S,E'') is a subdag of G' such that C(G'') = C(G) then G'' = G'.

Page 7: ******************************************************************** *These notes contain NDSU confidential and proprietary material. * *Patents are pending.

Many-to-Many relationships are graphs.

They are bipartite when they involve 2 different entity types(e.g., CustomerPurchaseTransaction-to-Item relationship).

They are unipartite when they involve the same entity type on both sides of the relationship (e.g., protein-protein interactions).

A Graph G=(N,E) is implemented in the relational (tabular) modelwhere N = {n1,n2,...,nm} as:

n1______n2______n3___________nm_____ n1|E(1,1) E(1,2) E(1,3) . . . E(1,m) | n2|E(2,1) E(2,2) E(2,3) . . . E(2,m) | n1|E(3,1) E(3,2) E(3,3) . . . E(3,m) | . | | . | | . | | nm|E(m,1) E(m,2) E(m,3) . . . E(m,m) | `------------------------------------‘ where E(i,j)=1 iff (ni,nj)E.

For undirected graphs, this will be triangular (symmetric), E(i,j)=E(j,i)

For directed graphs, it will not.

Page 8: ******************************************************************** *These notes contain NDSU confidential and proprietary material. * *Patents are pending.

For a bipartite graph, G=(N1!N2, E), where N1={x1,…,xr} and N2={xr+1,…,xm} it will be quadrangular and symmetric:

n1_.._nr_nr+1..nm n1|0 0 0 | 0| . |0 0 0 | 1| . |. . . | ..| nr|0_0___0_|_______1|nr+1| | 0 0 0| . | | 0 0 0| . | | . . . .| nm|0 1...1 | 0 0 0| So it is often simplified to:

nr+1..nm n1| 0| . | 1| . | ...| nr|0 1 ...1| `--------'

Only change for a labeled graph, is E(i,j), will be a value from L{null}

Note the label space, L, can be a relation of feature attributes (L can be a tuple or vector of feature values, one from each feature domain)

Page 9: ******************************************************************** *These notes contain NDSU confidential and proprietary material. * *Patents are pending.

LATTICE is a POSET in which every subset has a supremum.

UPPER BOUND of a subset, X’, of a POSET is an element, z, : xz xX.

SUPREMUM of a subset, X’, of a POSET is an upper bound, z’, : other upper bound, z of X’, z’z .

A partially ordered set, (X,), is LINEARLY ORDERED if x,yX either xy or yx. mX is a MAXIMAL ELEMENT of X if yX : my, m=y.

Zorn’s Lemma:(X,) a non-empty POSET : linearly ordered subset, Y, there is an upper bound, then Y contains at least one maximal element.

LATTICE ORDER, R, on S is a partial Order on S (and (S,R) is a LATTICE) if for every s1 not equal to s2 in S there is a s3 in S such that (s1,s3) is in S and (s2,s3) is in S (every pair has upper bound)

PARTITION LATTICE of S is lattice ordering of all Partitions of S under the ordering of sub-partitions, where a sub-partition, Q, of a partition, P, is such that every component of Q is a subset of a component of P (and of course only one).

CONCEPT HIERARCHY of an attribute is Partition Lattice of that attribute (the Mother of all concept hierarchies for that attribute since any user defined concept hierarchy based on some domain knowledge, is a sub-Lattice of this Mother Lattice).

Page 10: ******************************************************************** *These notes contain NDSU confidential and proprietary material. * *Patents are pending.

ISA graph for the concepts:

4-way DUALITY on a set S: PARTITION FUNCTION EQUIVALENCE RELATION CLOSED UNDIRECTED

GRAPH LABELED_EQUIVALENCE_RELATION induces the canonical LABELED_PARTITION of equivalence components (a,b belong to same component iff they're equivalent).

LABELED_PARTITION, P={C1,…,Cn} induces the canonical FUNCTION, g:S{C1,…,Cn} by g(s)=Ci iff sCi (letting Ci be both the partition component and label (name) assigned to that component).

FUNCTION, g:SL induces the canonical CLOSED UNDIRECTED GRAPH on S with edge set = {(s1,s2) | g(s1)=g(s2)}.

CLOSED UNIDRECTED GRAPH induces the canonical LABELED EQUIVALENCE RELATION by s1,s2 are equivalent iff there is a path connecting them.

relation

Equivalencerelation

function

ClosedUndirected

graph

partition

Partial orderrelation

Acyclicdirected graph

Page 11: ******************************************************************** *These notes contain NDSU confidential and proprietary material. * *Patents are pending.

E g

Page 12: ******************************************************************** *These notes contain NDSU confidential and proprietary material. * *Patents are pending.

E g

Page 13: ******************************************************************** *These notes contain NDSU confidential and proprietary material. * *Patents are pending.

E g

Page 14: ******************************************************************** *These notes contain NDSU confidential and proprietary material. * *Patents are pending.

E g