- or download this
# perl code.pl data
# ___data____
...
print "\nTriplet induced by subgraph ", pp( $one => { MATCHES =>
+ \@matches } ), "\n\n";
}
}
- or download this
___INPUT(set of triplets)____
b c a
a c d
d e b
- or download this
b c
a c
d e
- or download this
TreeConstruct(S)
1. Let L be the set of species appear in S. Build G(L)
2. Let C1 , C2 , . . . , Cq be the set of connected components in G(L)
...
• Let T be a tree formed by connecting all Ti with the same parent nod
+e.
Return T.
4. If q=1 and C1 contains exactly one leaf, return the leaf; else retu
+rn fail.
- or download this
1. Initially we have q=2 (a-c-b & d-e). So introduce an internal verte
+x (u) and make these connected components child of u.
u=> a-c-b;
d-e;
2. Select component 1 = a-c-b. Check all lines from INPUT which are a
+subset of this component1.First line of INPUT i.e. "b c a" is a subse
+t of component1.
3."b c a" now becomes the INPUT for the program and it is recursed aga
+in with this INPUT(Now for input "b c a" the auxiliary graph will be
+"b-c" & "a",i.e. two connected components,thus q=2 ...)
- or download this
u => u => d
=> e
...
=> u => b
=> c