Sentiment Analysis Notes summarizes Satuday Notes involving Sentiment

  • Slides: 17
Download presentation
Sentiment Analysis Notes (summarizes Satuday Notes involving Sentiment Analysis and preliminaries) Vertical Graph Analytics

Sentiment Analysis Notes (summarizes Satuday Notes involving Sentiment Analysis and preliminaries) Vertical Graph Analytics Most complex data is modelled as a graph or hypergraph (a table is a graph without edges, so ALL data is modelled as a graph!). We strive for max speed and accuracy in our graph analytics by using vertical structure. We consider the following topics: 1. Vertical structuring of graph data (Edge p. Tree (E), Path. Ptree (PP), Shortest. Path. Trees…). 2. Connectivity Component Partitioning. 3. Community Mining (k-plexes, which include cliques as 0 -plexes; k-cores, Density-communities, Degree-communities, 4. Community existence theorems (determine if a given Induced Sub. Graph is a community) and community mining algorithms (find all communities) include: Vertex Count based Existence Thms. Inheritance (downward or upward closure based existence thms). Density Difference. Degree Difference. 5. Graph and Hyper. Graph Clustering (Community based, Vertex betweenness, Edge betweenness Clustering). 6. Multi. PART graphs, Hyper. Graphs, Multi. PART Hypergraphs nnd the Clique Tree construct (c. Tree) for Multi. PART graphs and hypergraphs. PP(G), the Path Ptree of graph, G, is a vertical representation of all paths in G and is used to find diameter, shortest paths, communities, motifs. . . By modifying data structures (from horizontal to vertical) the analytics fit hardware strengths and allow do NP-hard/complete problems. A Path is a sequence of edges connecting a sequence of vertices, distinct except for end-vertices. A Simple Path (assumed) excludes loops, (v, v). We’ll always program using the pop-count (produces 1 -counts during ANDs/ORs for free, timewise). C is a clique iff all C level 1 counts are |VC|-1. COMMUNITIES (=~ a subgraph with more edges than expected): A k-plex is a [max] subgraph in which each vertex is adjacent to all subgraph vertices except at most k of them. A 0 -plex is called a clique. A k-core is a [max] subgraph in which each vertex is adjacent to at least k subgraph vertices. An n-clique is a [max] subgraph s. t. the geodesic distance between any vertex pair is n. An n-clan is a [max] n-clique with diameter n. An n-club is [max] subgraph of diam=n. v C, kvint =#edges v to C; kvext=#edges v to C’. Int. Deg(C) k. Cint = v C kvint Ext. Deg(C), k. Cext = v C kvext Internal. Density of C δint(C)=|edges(C, C)|/(nc(nc− 1)/2) External Density of C δext(C)= edges(C, C’)|/(nc(n-nc)). Ext. Den. C*n(n-n. C)/2=Ext. Deg. C Int. Den. C<<Int. Deg. C k-plex existence: C = k-plex iff v C|Cv| |VC|2–k 2 k-plex inheritance: An induced subgraph of a k-plex is a k-plex. k-core existence: C = k-core iff v C, |VC| k. k-core inheritance: If cover by induced k-cores, G is k-core. Clique Existence: When is an induced SG a clique? Edge Count existence thm (EC): |EC| |PUC|=COMB(|VC|, 2) |VC|!/((|VC|-2)!2!) Sub. Graph existence theorem (SG): (VC, EC) is a k-clique iff every induced k-1 subgraph, (VD, ED) is a (k-1)-clique. A Clique Mining alg: Finds all cliques in a graph- uses an ARM-Apriori-like downward closure property: CLQk k. Clique. Set, CCLQk+1 Candk+1 Clique. Set By SG, CCLQk+1= all s of CLQk-pairs having k-1 common vertices. Let C CCLQk+1 be a union of two k-cliques with k-1 common vertices. Let v, w be the kth vertices of the k-cliques, then C CLQk+1 iff (PE)(v, w)=1. (Just need to check a single bit in PE. ) A good tradeoff between large δint(C) and small δext(C) is goal of density community mining algs. A simple approach is to maximize differences. Density Difference alg for Communities: δint(C)−δext(C) >Thresh? Degree Difference k. Cint – k. Cext > Thresh? Easy to compute even for Big Graphs. Giant Yahoo Data Dump Aims to Help Computers Know What You Want: (see “Here’s What Developers Are Doing With Google’s AI Brain”).

Complex Graph Structures: The vertex-labelled, edge-labelled graph We can interpret this structure many ways,

Complex Graph Structures: The vertex-labelled, edge-labelled graph We can interpret this structure many ways, 1. as a relationship with entity tables; 2. as a AN[lysist] Table with attributes, the AN attributes (SA, Ct, C, Sal) plus each Ticker. Symbol p. Tree as an additional attribute (the TS attributes (Dow? , Ct, BHS, SA) are not captured in this interpretation); 3. as a T[icker] S[ymbol] or Stock Table with attributes, the TS attributes (Dow? , Ct, TS AN p. Tree SA Ct C 3 8 2 3 7 3 2 8 0 1 7 1 3 4 0 2 4 1 3 4 0 1 3 0 3 4 0 2 4 0 1 6 0 1 7 2 1 8 0 3 5 0 1 2 0 2 2 0 3 2 3 ANalyst Ticker. Symbol Relationship with labels 1 0 0 1 1 0 3 3 6 4 8 8 a e c 5 4 6 3 3 Dow? AN p. Tree Ct H B B SS S S H H B B B SB Buy-Hold-Sell 1 2 2 3 3 TS SA 1 3 3 1 2 3 1 Sal AN 1 2 3 4 5 6 7 8 9 10 11 12 13 14 7 5 7 6 2 1 2 3 4 5 1 1 0 1 1 1 0 0 1 1 1 1 1 0 0 1 1 1 1 0 1 0 0 0 0 0 0 0 1 6 4 5 7 6 7 8 9 10 0 0 1 0 0 0 0 0 1 1 1 0 0 0 1 1 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 4 5 6 3 4 11 12 13 14 15 0 0 0 0 0 0 0 1 0 0 0 1 1 1 1 1 0 0 0 1 1 1 1 0 1 6 1 16 17 18 0 0 0 0 0 0 1 0 0 1 1 1 0 0 0 0 1 1 0 0 0 1 1 2 11 11 10 01 00 0 0 1 1 0 0 1 3 10 11 11 10 10 1 0 0 0 1 1 1 4 11 01 11 1 1 0 0 0 1 0 1 1 5 10 10 10 1 1 0 0 0 0 0 1 6 01 01 00 1 1 0 0 0 1 0 7 01 11 10 0 1 1 1 0 0 0 1 0 8 10 10 10 01 00 1 1 1 0 0 0 1 9 10 01 11 01 00 0 0 1 1 0 0 0 0 0 1 1 0 10 11 10 00 01 00 10 00 1 1 0 0 1 0 12 00 00 00 1 0 0 1 1 0 0 0 1 0 13 00 00 00 0 0 0 1 1 1 14 00 00 00 TS BHS, SA) plus each Analyst p. Tree as an additional attribute (the AN attributes (SA, Ct, F, Sal) are not captured in this interpretation); We can include this relationship with other relationships sharing entities by using the Rolo. Dex Model (next slide). The graph could be 3 D, 4 D (i. e. , edges are triples, quadruples), etc. The graph could also be edge labelled. A convenient way to capture edge labels is by making the cell content of each matrix cell into the label structure rather than just a yes/no bit. As a simple but pertinent example, suppose we have a 0 -3 rating of each Analyst-Stock pair which measure how much that Analysts know about that stock. We just change each bit to a decimal number in [0, 3] (or bitslice those using two bits instead of on, so that the matrix columns are 2 -bit p. Tree. Sets rather than just one p. Tree). 10 11 00 11 10 10 0 0 1 01 1 10 0 01 1 01 0 0 0 111 101 110 010 1 2 3 4 5 1 0 0 0 1 1 10 01 00 10 10 10 00 01 0 0 0 00 1 0 0 0 01 0 001 110 101 111 6 7 8 9 10 01 01 00 00 11 00 00 01 00 00 10 10 00 01 01 01 00 00 01 10 10 10 01 10 00 00 10 10 10 00 01 10 00 00 01 01 01 10 11 00 00 00 01 01 10 00 10 11 01 0 01 1 0 0 01 1 1 0 10 0 01 0 100 101 110 010 100 11 12 13 14 15 00 00 00 00 00 00 00 10 00 01 01 01 10 10 01 00 10 01 10 00 11 11 11 00 00 00 10 01 11 11 11 00 10 10 10 00 01 11 11 11 01 In full p. Tree form: SS AA CCCC F S S S AN 1 0 32 1 0 1 0 0 0 0 1 16 0 0 1 1 0 17 1 0 0 0 0 1 18 Dow? C 3 C 2 C 1 C 0 SS S H B SB SA 1 SA 0 TS 00 00 00 01 10 01 01 00 00 00 01 00 11 10 10 01 00 00 00 01 01 00 11 01 00 01 If C measures the “Correctness Level” of the Analyst over recent days or weeks over all stock (e. g. , based on backward analysis of previous sentiment analysis and the actual performance of the stock) and the cell numbers measure the correctness of that Analyst on that Stock, then a signal might be to mask C>=2 and for those Analysts find the average Correctness for each stock, then mask out those Stock for which the number of Analysts is between two thresholds (want a high average but also more than one analyst but not too many).

The Universal Entities-Relationships Model Everything is related! Stock 2 5 6 Da 1 1

The Universal Entities-Relationships Model Everything is related! Stock 2 5 6 Da 1 1 Conf(A B) Supp(A) = Cus. Freq(Item. Set) =Supp(A B)/Supp(A) Investors recommend stocks (y/n) (bipartite graph) 4 Friends relationship 1 1 1 3 Tweets are Documents, so the Tweet-Tweeter relationship is a Document-Author relationship (Tweetee, hashtag, etc. are Edge Labels). y Investors recommend stocks on days (y/n) (tripartite hypergraph) 16 Item Every Entity (Gene, Term, Experiment, Person, Document, Item, Stock, Course, Movie) has an Entity. Table of many descriptive attributes (columns). They aren’t shown. E. g. descriptive columns of Stocks(Dow? , Count, BHS, SA) and Analysts(SA, Count, Female? , Salary. In. Billions), not shown. 6 7 itemset 5 BUYS 4 3 2 In looking for signals that no one else uses: What if an Investor BUYS an island in the Mediterranean? What if an Investor’s best friend buys lots of stock in an Online University? Author People Customer, invester Term. Document 1 1 1 PI 2 32 43 45 56 7 Item. Set 1 2 3 4 0 0 antecedent 1 1 1 Auth 1 1 1 Doc Genegene rel (ppi’s) 3 2 1 1 1 2 1 3 1 docdoc 1 1 1 Gene 1 movie 4 Do c 1 Item. Set 1 Enroll 4 Course 2 People term G exp. PI 1 1 2 3 4 5 6 7 3 4 3 0 0 Doc 3 0 0 2 1 0 0 0 Expg ene t Ex p 3 1 1 3 1 0 0 0 5 6 7 0 0 0 4 5 0 0 0 customer rates movie 0 2 Share. Stem term rel Cell. Label=stem 0 0 0 1 0 0 4 0 0 1 1 0 0 3 5 0 0 0 0 customer rates movie as 5 relationships 0 0 0 1 0 5 6 16

Btwn 2. 1 on bipartite G 9 A B C D E F G

Btwn 2. 1 on bipartite G 9 A B C D E F G H I J x H H I I I H H H I G G G H E E F F F E E F F H H H G C C I I I L C C L D D G G J H I L D J E E F F K J L H J y btw 3 103 1 103 e 95 3 95 1 95 d 90 2 90 4 90 d 83 3 79 e 79 c 77 c 71 4 69 2 69 d 69 f 64 3 63 1 63 3 63 e 63 2 55 4 55 2 55 7 55 a 51 b 51 6 51 9 51 f 49 1 47 3 47 b 47 9 47 a 47 e 47 4 41 2 41 d 41 1 39 3 39 a 39 5 39 7 39 9 39 e 39 8 38 8 35 c 35 4 34 d 34 7 31 5 31 6 31 9 31 6 31 7 31 e 31 c 29 f 29 g 25 f 24 1 2 3 4 5 6 7 8 9 a b c d e f g h i 1 1 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0 1 1 1 0 0 0 1 1 1 1 0 1 0 0 0 0 0 1 1 0 0 1 1 1 0 0 0 1 1 1 1 0 0 1 0 0 1 1 1 1 0 0 0 0 0 1 1 1 0 0 0 3 3 6 5 8 8 1 1 1 5 0 3 2 A B B C C F I I I L L M N A A B M N D J K M N K K 1 3 1 6 5 8 i g h a b e e 2 4 2 d d 5 b f c c h i 23 23 23 23 20 20 20 19 19 19 17 17 7 7 K L M N A B 0 0 C 0 0 D 0 0 E 0 0 F 0 0 G 0 0 H 0 0 I 0 0 J 0 0 K 0 1 0 0 L 0 1 0 0 M 0 1 1 1 N 0 1 1 1 1 E 1 1 0 0 0 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 a b c d e f g h i 1 1 1 0 0 0 1 1 1 1 0 0 0 1 1 1 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 0 0 0 1 1 1 1 0 0 0 1 1 1 0 0 0 0 0 0 1 0 0 0 H I 16 g 0 0 0 0 1 0 0 0 8 11 b 8 7 4 4 4 3 4 4 4 6 7 8 5 2 2 2 1 4 6 3 3 9 6 G 9 18 i 10 a 17 h F E C 12 c 7 3 A L M 2 D K 15 f B 4 5 G J N 13 d G 9: Bipartite graph of the Southern Women Event Participation. Women are numbers (18), events are letters (14) (89 edges) Or Investors are numbers, stocks are letters in a recommends graph At this point, Investors {2, 3} recommend Stock {A}; Investors {15, 17, 18} recommend Stock {K}; Investors {12, 13} recommend Stocks {M, N} 14 e After all between-ness 2 = 20 s are deleted, we have Investors {15, 17, 18} recommend Stock {K}; Investor {12} recommend Stocks {M, N} After all between-ness 2 = 19 s are deleted, we have Investors {17, 18} recommend Stock {K}; Investor {12} recommend Stocks {M, N} After all between-ness 2 = 17 s are deleted, we have Investors {17, 18} recommend Stock {K}. If one believes high Between-ness 2 measure bad recommendation the best strategy is to buy stock K (assuming you like Investors 17 and 18. This can be arrived at much simpler by working up from the bottom of the Btwn 2 sorted list. How can we involve Sentiment Analysis? SA is a label on each vertex at this time. The simplest SA-based measure to use is probably Recommendation. Quality 1 hk = Phk*(SAh+Sak) which assigns edged labels based on SA only. Then we could define Recommendation. Quality 2 hk = (1/SAh))|Ph-1| + (1/SAk)|Pk-1| + (1/SAh)|Ph-1|*(1/SAk)|Pk-1| at no added cost and do the above again. If SA values can be zero, we use something like 1/(1+SA) instead of just 1/SA. These RQs involve SAs + Btwn-nesses One could argue for edges at the top (contrarian strategy? ) Max btwn 2 (or RQ 2) edges stand most between the crowds of recommendations? ? ? Another Contrarian approach would be to isolate high SA Investors recommending low SA stocks (and doing so alone)

Btwn. SA 1 on bipartite G 9 S I btn. SA 1 H c

Btwn. SA 1 on bipartite G 9 S I btn. SA 1 H c 24. 5 F 8 23 F e 21 F 3 21 F 6 19 F 7 19 I c 18. 2 F 1 18. 2 J c 17 N c 17 F 4 16. 6 F 2 16. 6 L c 15 H 8 11. 7 E 3 11. 3 H 3 10. 6 E 7 10. 2 E 6 10. 2 E 1 9. 8 H 7 9. 62 H b 9. 62 H 6 9. 62 H a 9. 62 H d 9. 62 H 1 9. 2 E 2 8. 9 E 4 8. 9 I 8 8. 6 H 4 8. 35 H 2 8. 35 E 5 8 E 9 8 I e 7. 8 I 3 7. 8 H 9 7. 5 M c 7. 4 J e 7. 25 N e 7. 25 I b 7 I d 7 I a 7 G e 6. 7 G 3 6. 7 I 1 6. 68 H f 6. 65 J d 6. 5 J b 6. 5 N d 6. 5 C 3 6. 33 L e 6. 33 G d 6 G 7 6 G a 6 K e 5. 87 C 6 5. 66 L d 5. 66 L a 5. 66 L b 5. 66 C 1 5. 4 I h 5. 4 I 9 5. 4 G 2 5. 16 G 4 5. 16 C 2 4. 86 C 4 4. 86 G 5 4. 6 G 9 4. 6 J f 4. 4 C 5 4. 33 H g 4. 31 G f 4. 04 K h 4 H (1/SAh)|Ph-1|+(1/SAk)|Pk-1|+(1/SAh)|Ph-1|*(1/SAk)|Pk-1| I 16 g 8 This is a contrarian strategy. (low Btwn. SA 2). At this point, Investors 2, 4 recommend Stock A and Investor 2 recommends Stock B 11 b 1 9 6 G 9 18 i 10 a 17 h F E 12 c 7 3 C A L M 2 D K 15 f B J 4 N G 5 13 d G 9: Bipartite graph of the Southern Women Event Participation. Women are numbers (18), events are letters (14) (89 edges) Or Investors are numbers, stocks are letters in a recommends graph 14 e 1 I L K D B I M D K A B D M A A B D i f f 3 3 g e 1 i 1 1 4 d 2 4 2 5 3. 8 3. 5 3. 4 3. 12 3 2. 85 2. 84 2. 75 2. 6 2. 52 2. 5 2. 3 2. 2 4 5 6 7 8 9 a b c d e f g h A 1 1 0 1 B 1 1 1 0 C 1 1 D 1 0 1 1 E 1 1 F 1 1 G 0 1 1 1 H 1 1 I 1 0 J 0 0 K 0 0 L 0 0 M 0 0 N 0 0 (SA^-1)*(Ct-1) 1. 4 1. 2 1. 7 1. 2 SA 5 5 4 5 Ct 8 7 2 3 0 0 1 1 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 0 0 0 1 1 1 1 0 0 0 1 1 1 0 0 0 0 0 0 1 0 0 0 1 1. 5 3 2 2 4 4 4 2 1 3 1 1. 5 3 2 2 4 4 4 5 1. 7 0. 8 0. 2 1 4 4 5 4 6 7 8 5 2 i (SA^-1)*(Ct-1) v SA Ct 0 0. 5 4 3 0 1. 6 3 6 0 0. 6 5 4 0 3. 5 2 8 0 7 1 8 0 1. 8 5 10 0 3. 2 4 14 1 2. 2 5 12 0 2 2 5 1 1. 5 2 4 0 1. 6 3 6 0 0. 4 5 3 0 2 1 3 1 0. 5 1 2 2 2

Btwn. SA 2 t on bipartite G 9 S I H H H I

Btwn. SA 2 t on bipartite G 9 S I H H H I I H G G I G G H G C D I E H C C D E E C D L G G E L I I H H I L A B G G M H F I A A B M H B J F F J K J I I C D H E E K I 1 1 2 4 e 3 3 4 2 d e 3 d d f f 1 1 9 2 4 4 4 2 3 3 e 9 5 3 d a b 6 7 a b c f 1 1 a 7 e c 1 g 4 2 2 d g 3 e 4 2 3 e d e f i 8 5 5 8 5 9 f btn. SA 2 2015 1907 1642 1623 1536 1425 1399 1333 1324 1149 1112 965 575 559 539 529 495 495 464 463 463 459 434 399 391 370 370 335 323 321 318 317 287 279 278 278 274 260 260 247 231 224 202 188 167 159 158 149 146 H SAh|Ph-1|+SAk|Pk-1|+SAh|Ph-1|*SAk|Pk-1| Delete from top I 16 g 8 This is a contrarian strategy. (low Btwn. SA 2). At this point, Investors 6, 7 and 8 recommend Stock F and Investors 17, 18 recommend Stock K and investors 1, 2 recommend Stocks J, N 11 b 1 9 6 G 9 18 i 10 a 17 h F E 12 c 7 3 C A L M 2 D K 15 f B J 4 N G 5 13 d G 9: Bipartite graph of the Southern Women Event Participation. Women are numbers (18), events are letters (14) (89 edges) Or Investors are numbers, stocks are letters in a recommends graph 14 e 1 C I L L E E L N N M J F F J F K N K 6 h a b 7 6 c e d c b 7 6 c 8 i c h 111 111 104 95 86 74 65 62 55 55 53 23 20 17 13 2 3 4 5 6 7 8 9 a b c d e f g h A 1 1 B 1 1 C 1 1 D 1 0 E 1 1 F 1 1 G 0 1 H 1 1 I 1 0 J 0 0 K 0 0 L 0 0 M 0 0 N 0 0 SA*(Ct-1) 35 30 SA 5 5 Ct 8 7 0 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 0 0 0 1 1 1 1 0 0 0 1 1 1 0 0 0 0 0 0 1 0 0 0 i SA*(Ct-1) v SA Ct 0 8 4 3 0 15 3 6 0 15 5 4 0 14 2 8 0 7 1 8 0 45 5 10 0 52 4 14 1 55 5 12 0 8 2 5 1 6 2 4 0 15 3 6 0 10 5 3 0 2 1 3 28 4 8 30 5 7 9 3 4 6 2 4 2 1 3 9 3 4 6 2 4 5 1 6 24 4 7 28 4 8 20 5 5 4 4 2 1 1 2 2

Btwn. SA 2 b on bipartite G 9 S I H H H I

Btwn. SA 2 b on bipartite G 9 S I H H H I I H G G I G G H G C D I E H C C D E E C D L G G E L I I H H I L A B G G M H F I A A B M H B J F F J K J I I C D H E E K I 1 1 2 4 e 3 3 4 2 d e 3 d d f f 1 1 9 2 4 4 4 2 3 3 e 9 5 3 d a b 6 7 a b c f 1 1 a 7 e c 1 g 4 2 2 d g 3 e 4 2 3 e d e f i 8 5 5 8 5 9 f btn. SA 2 2015 1907 1642 1623 1536 1425 1399 1333 1324 1149 1112 965 575 559 539 529 495 495 464 463 463 459 434 399 391 370 370 335 323 321 318 317 287 279 278 278 274 260 260 247 231 224 202 188 167 159 158 149 146 H SAh|Ph-1|+SAk|Pk-1|+SAh|Ph-1|*SAk|Pk-1| Del from the bottom I 16 g At this point Investors=3, 13 recommend Stocks G, H, I and 2, 4, 15 recommend H, G and 14 recommends G, I and 1 recommends H, I At this point Investor 1 still recommends H, I and Investor 2 recommends H. At this point Investor 1 still recommends H, I. 8 11 b 1 9 6 G 9 18 i 10 a 17 h F E 12 c 7 3 C A L M 2 D K 15 f B J 4 N G 5 13 d G 9: Bipartite graph of the Southern Women Event Participation. Women are numbers (18), events are letters (14) (89 edges) Or Investors are numbers, stocks are letters in a recommends graph 14 e 1 C I L L E E L N N M J F F J F K N K 6 h a b 7 6 c e d c b 7 6 c 8 i c h 111 111 104 95 86 74 65 62 55 55 53 23 20 17 13 2 3 4 5 6 7 8 9 a b c d e f g h A 1 1 B 1 1 C 1 1 D 1 0 E 1 1 F 1 1 G 0 1 H 1 1 I 1 0 J 0 0 K 0 0 L 0 0 M 0 0 N 0 0 SA*(Ct-1) 35 30 SA 5 5 Ct 8 7 0 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 0 0 0 1 1 1 1 0 0 0 1 1 1 0 0 0 0 0 0 1 0 0 0 i SA*(Ct-1) v SA Ct 0 8 4 3 0 15 3 6 0 15 5 4 0 14 2 8 0 7 1 8 0 45 5 10 0 52 4 14 1 55 5 12 0 8 2 5 1 6 2 4 0 15 3 6 0 10 5 3 0 2 1 3 28 4 8 30 5 7 9 3 4 6 2 4 2 1 3 9 3 4 6 2 4 5 1 6 24 4 7 28 4 8 20 5 5 4 4 2 1 1 2 2

Btwn. SA 3 on bipartite G 9 S F F F E H E

Btwn. SA 3 on bipartite G 9 S F F F E H E E H H E H I H C I I H J N G G C C G G I C L J N K G L J G D F F L A B K D A A B D E E B H M M I E E H H G G C H F I I H J I 1 2 4 3 e 1 1 4 2 3 3 1 d 1 e 3 f e e 2 4 4 2 3 e d d f f 1 7 6 f 1 1 f 4 4 2 2 3 9 5 3 9 e d 9 6 7 b 7 a 6 5 9 5 c 8 b a g b btn. SA 3 t 287 247 231 161 152 138. 5 130. 7 129. 5 122. 2 114. 2 105. 2 95 91. 8 88. 25 86 86 85. 8 81. 66 80. 2 79 76. 33 74 74 71. 5 69 65. 66 62 57. 8 56. 6 55 55 55 53 53 51. 5 48. 6 45. 5 45. 4 44 44 42. 5 41. 5 39. 6 34 31 30. 5 28. 75 27 27 25. 66 24. 5 23 21. 4 20. 25 20 H (1/SAH)|PH-1| + SAk|Pk-1| + (1/SAH)|PH-1|*SAk|Pk-1| Delete from the top. Strategies the result from this measure should be low SA stocks recommended by high SA Investors? (Twitter_SA Investor_Contrarian? ) I 16 g 8 At this point Inv=17, 18 recommend Stocks K, I. Inv 8 recommends I. 11 b 1 9 6 G 9 18 i 10 a 17 h F E 12 c 7 3 C A L M 2 D K 15 f B J 4 N G 5 13 d G 9: Bipartite graph of the Southern Women Event Participation. Women are numbers (18), events are letters (14) (89 edges) Or Investors are numbers, stocks are letters in a recommends graph 14 e 1 G G I C L L J N D I L H I I M K I K 7 a c 6 a b c c 5 g c 8 i 8 c i h h 18. 6 18. 2 17. 66 17 17 15 15 15 11. 75 8. 6 7. 4 6. 5 5. 4 4 2 3 4 5 6 7 8 9 a b c d e f g h A 1 1 B 1 1 C 1 1 D 1 0 E 1 1 F 1 1 G 0 1 H 1 1 I 1 0 J 0 0 K 0 0 L 0 0 M 0 0 N 0 0 (Ct-1)*SA 35 30 SA 5 5 Ct 8 7 0 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 0 0 0 1 1 1 1 0 0 0 1 1 1 0 0 0 0 0 0 1 0 0 0 i (Ct-1)/SA v 1/SA 0 0. 5 0. 25 0 1. 66 0. 33 0 0. 6 0. 2 0 3. 5 0 7 1 0 1. 8 0. 2 0 3. 25 0. 25 1 2. 2 0 2 0. 5 1 1. 5 0 1. 66 0. 33 0 0. 4 0. 2 0 2 1 28 4 8 30 5 7 9 3 4 6 2 4 2 1 3 9 3 4 6 2 4 5 1 6 24 4 7 28 4 8 20 5 5 4 4 2 1 1 2 2 SA 4 4 3 5 2 1 5 4 5 2 2 3 5 1 Ct 3 3 6 4 8 8 10 14 12 5 4 6 3 3

Btwn. SA 3 on bipartite G 9 S F F F E H E

Btwn. SA 3 on bipartite G 9 S F F F E H E E H H E H I H C I I H J N G G C C G G I C L J N K G L J G D F F L A B K D A A B D E E B H M M I E E H H G G C H F I I H J I 1 2 4 3 e 1 1 4 2 3 3 1 d 1 e 3 f e e 2 4 4 2 3 e d d f f 1 7 6 f 1 1 f 4 4 2 2 3 9 5 3 9 e d 9 6 7 b 7 a 6 5 9 5 c 8 b a g b btn. SA 3 b 287 247 231 161 152 138. 5 130. 7 129. 5 122. 2 114. 2 105. 2 95 91. 8 88. 25 86 86 85. 8 81. 66 80. 2 79 76. 33 74 74 71. 5 69 65. 66 62 57. 8 56. 6 55 55 55 53 53 51. 5 48. 6 45. 5 45. 4 44 44 42. 5 41. 5 39. 6 34 31 30. 5 28. 75 27 27 25. 66 24. 5 23 21. 4 20. 25 20 H G 9: Bipartite graph of Investors=numbers and stocks=letters in a recommends graph (1/SAH)|PH-1| + SAk|Pk-1| + (1/SAH)|PH-1|*SAk|Pk-1| Delete from the bottom. Strategies the result from this measure should be high SA stocks recommended by low SA Investors? (Twitter_SA Stock_Contrarian? ). At this point Investors=1, 2, 3, 4, 14 recommend Stock F (with large gap). Note that Investors 1, 2, 3, 4, 14 are held in high regard on twitter but Stock F is held in low regard on twitter. Thus, I call it Twitter_SA Stock_Contrarian Strategy At this point Investors=1, 2, 3, 4 recommend Stocks E, H as well. 1 Stock E is also held in low regard on twitter but Stock H is held in fairly high regard on twitter? ? ? Other strategies: 1. Use Btwn. SA 4= SAH|PH-1|+(1/SAk)|Pk-1|+SAH|PH-1|*1/Sak)|Pk-1| and then delete from the top or bottom (giving alternative contrarian strategies to the last two). Other strategies: 2. Eliminate the product term: Btwn. SA 5[6] = SAH|PH-1|+(1/SAk)|Pk-1| [(1/SAH)|PH-1|+SAk|Pk-1|] and then delete from the top or bottom (giving 4 more alternative contrarian strategies to the last two). I 16 g 8 11 b 9 6 G 9 18 i 10 a 17 h F E 12 c 7 3 C A L M 2 D K 15 f B J 4 N G 5 Other strategies: 3. Strength of Investor recommendations (Strong Sell, Neutral, Buy, Strong Buy). One way to capture that info is have a p. Tree. Set of bit maps for each strength, each like the one below. This amounts to adding an external edge label (the between-nesses are internal edge labels derived the p. Tree Counts) and vertex labels, Adjacency. Count=p. Tree. Count (internal) and SA (external). 13 d 14 e Other strategies: 4. There may be lots of other edge labels and vertex labels, each of which (or combinations) open up lots of new possible strategies. Other strategies: 5. Add a Day dimension (say, the previous 5 days along with stock movement each day as a “face label” on the Stock-Day 2 D face (independent of Investor). SA becomes a face label on Stock-Day and Investor-Day. Strength and Between-nesses are Hyper. Edge labels. 1 G G I C L L J N D I L H I I M K I K 7 a c 6 a b c c 5 g c 8 i 8 c i h h 18. 6 18. 2 17. 66 17 17 15 15 15 11. 75 8. 6 7. 4 6. 5 5. 4 4 2 3 4 5 6 7 8 9 a b c d e f g h A 1 1 B 1 1 C 1 1 D 1 0 E 1 1 F 1 1 G 0 1 H 1 1 I 1 0 J 0 0 K 0 0 L 0 0 M 0 0 N 0 0 (Ct-1)*SA 35 30 SA 5 5 Ct 8 7 0 1 1 1 1 0 0 0 0 1 1 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 0 1 1 1 0 0 0 0 1 1 1 0 0 0 1 1 1 1 0 0 0 1 1 1 0 0 0 0 0 0 1 0 0 0 i (Ct-1)/SA v 1/SA 0 0. 5 0. 25 0 1. 66 0. 33 0 0. 6 0. 2 0 3. 5 0 7 1 0 1. 8 0. 2 0 3. 25 0. 25 1 2. 2 0 2 0. 5 1 1. 5 0 1. 66 0. 33 0 0. 4 0. 2 0 2 1 28 4 8 30 5 7 9 3 4 6 2 4 2 1 3 9 3 4 6 2 4 5 1 6 24 4 7 28 4 8 20 5 5 4 4 2 1 1 2 2 SA 4 4 3 5 2 1 5 4 5 2 2 3 5 1 Ct 3 3 6 4 8 8 10 14 12 5 4 6 3 3

Btwn. SA 4 on bipartite G 9 S N F F F J K

Btwn. SA 4 on bipartite G 9 S N F F F J K N L I H N F I M H I F F K E E J K H J H C L J I K L L I J H G E I I M E E L H E E E L I M I I H H H I H H C G G H C C I c 8 6 7 c h e c 8 8 d e c c c h 3 2 4 1 i 6 7 b e 6 e 7 6 b d i f a e b f b 7 5 a e e 9 3 d a 2 4 1 f d d 9 3 1 2 4 5 a e 1 3 f 2 4 btn. SA 4 2. 9 2. 8 2. 4 2. 3 2. 2 2. 1 2. 0 1. 9 1. 8 1. 7 1. 6 1. 5 1. 4 1. 3 1. 2 1. 2 H G 9: Bipartite graph of Investors=numbers and stocks=letters in a recommends graph Btwn. SA 4 = SAH|PH-1|+(1/SAk)|Pk-1|+SAH|PH-1|*1/SAk)|Pk-1| and then delete from the top or bottom. From the top Investors held in low SA regard recommend Stocks held in low SA regard on twitter. So this is doubly contrarian. From the bottom Investors held in high SA regard recommend Stocks held in high SA regard. So this is doubly non-contrarian We now go to the avg of the highest and lowest (=3. 9/2 1. 9) and get 3 highly regarded investors recommending 1 lowly regarded stock. I 16 g 8 11 b 1 9 6 G 9 18 i 10 a 17 h F E C 12 c 7 3 A L M 2 D K 15 f B J 4 5 N G 13 d 14 e C I H G G G D B B D G A A B D A D 1 g g 5 d 9 3 2 4 5 3 2 3 f 2 4 1 1 1. 0 1. 0 14 1 2 3 4 5 6 7 8 9 a b c d e f g h i 1/SAH+sum(y in SA 5 5 4 5 3 2 2 1 4 4 5 4 1 2 | 1/S 0. 2 0. 3 0. 5 1 0. 2 1 0. 5 V 1/SA SA A 1 1 0 0 0 0. 45 0. 25 4 B 1 1 1 0 0 0 0. 46 0. 25 4 C 1 1 1 0 0 0 0. 61 0. 33 3 D 1 0 1 1 1 0 0 0 0. 44 0. 2 5 E 1 1 1 1 0 0 0. 81 0. 5 2 F 1 1 0 1 1 1 0 0 0 1. 38 1 1 G 0 1 1 0 0 1 1 1 0 0. 50 0. 2 5 H 1 1 0 1 1 0 0 0. 67 0. 25 4 I 1 0 0 0 0 1 1 1 1 0. 70 0. 2 5 J 0 0 0 0 0 1 1 1 0 0. 94 0. 5 2 K 0 0 0 0 1 1 0. 98 0. 5 2 L 0 0 0 0 0 1 1 1 0 0. 78 0. 33 3 M 0 0 0 1 1 1 0 0 0. 7 0. 2 5 N 0 0 0 1 1 1 0 0 1. 5 1 1 SAk+sum(X in Pk)[SAX]/|Pk| 0. 5 0. 6 1. 0 0. 9 1. 4 0. 6 0. 7 0. 8 1. 4 0. 6 0. 7 0. 5 0. 4 1. 3 0. 8 Ct 8 7 4 4 4 3 4 4 4 6 7 8 5 2 2 2 PH)[(1/SAy)]/|PH| Ct 3 3 6 4 8 8 10 14 12 5 4 6 3 3

More Complex Graph Structures? Hyper. Graphs, clique. Trees (c. Trees), GRAPH (linear edges, 2

More Complex Graph Structures? Hyper. Graphs, clique. Trees (c. Trees), GRAPH (linear edges, 2 vertices) k. PARTITE Graph or just k. PART Graph (V=! Vi i=1. . k (x, y) E x, y same Vi ) Motifs k. Hyper. Graph (edges=k vertices) k. PART Hyper. Graph (V=! Vi i=1. . k (x 1. . xk) E xj, xj same Vi ) Bi. PART Clique Mining finds Max. Cliques at cost of pairwise &s. Each LETp. Tree MCLQ unless pairwise & with same count. A&B, B w Ct(A&B)=Ct(A) is a MCLQ. potential for a k-plex [k-core] mining alg here. Instead of Ct(A&B)=Ct(A), consider. E. g. , Ct(A&B)=Ct(A)-1. Each such p. Tree, C, would be missing just 1 vertex (1 edge). Taking any MCLQ as above, ANDing in Cp. Tree would produce a 1 -plex. ANDing in k such C’s would produce a k-plex. In fact, suppose we have produced a k-plex in such a manner, then ANDing in any C with Ct(C)=Ct(A)-h would produce a (K+h)-plex. &i=1. . n. Ai is a [ i=1. . n. Ct(Ai)]-Core Tri. PART Clique Mining Algorithm? In a Tripartite Graph edges must start and end in different vertex parts. E. g. , PART 1=tweeters; PART 2=hashtags; PART 3=tweets. Tweeters-to-hashtags is many-to-many? Tweeters-to-tweets is many-to-many (incl. retweets)? ; hashtags-to-tweets is many-to-many? Multi. PART Graphs Bi. PART, Tri. PART (have 2, 3 PARTs respectively but still an edge is a linear (between two vertices) … No edge can start and end in the same PART. D Hyper. Clique Mining: A 3 hyper. Graph has 3 vertex PARTS and each edge is a planar triangle (defined by a vertex triple, one from each PART). Stock recommender is 3 hyper. Graph (Investors, Stocks, Days). A triangular edge connects Investor k, Stock X, and Day n if k recommends X on day n. A 3 hyper. Clique is I a community s. t. all investors in clique recommend all stocks in the clique on each day in clique. Tweet ex: PART 1=tweeters; PART 2=hashtags; PART 3=tweets. Conjecture: Kmulti. Cliques and Khyper. Cliques are in 1 -1 correspondence (both are defined by a K PART vertex set)? So, only one mining process needed? S We will represent these common objects with clique. Trees (c. Trees). A c. Tree bitmaps each PART of the clique. E. g. , the c. Tree for Inv={2, 3}; Stock={A, B} Day={ , }: Cts Cliques, Kplexes and Kcores are subgraphs (communities) defined using an internal edge count. A Motif is a subgraph defined using external “isomorphism into the graph” count. A motif must occur (isomorphically) in the graph more times than “expected”. Criticism: Some authors argue[62] that a motif structure does not necessarily determine function. Recent research [64] shows the connections of a motif to the network, is too important to draw function inferences just from local structure. [65] Research shows certain topological features of biological networks naturally give rise to canonical motifs, . [66] Most find induced Motifs. A graph, G′, is a subgraph of G (G′⊆G) if V′⊆V and E′⊆E∩(V′×V′). If G′⊆G and G′ contains all ‹u, v›∈E with u, v∈V′, G′ is induced subgraph. G′ and G are isomorphic (G′↔G), if a bijection f: V′→V with ‹u, v›∈E′⇔‹f(u), f(v)›∈E u, v∈V′. G″⊂G and an isomorphism between G″ and G′, G′ appears in G). The number of appearances G′ in G is the frequency FG of G′ in G, FG(G’). G is recurrent or frequent in G, when FG(G’)>threshold (pattern=frequent subgraph). Motif discovery includes exact counting, sampling, pattern growth. Motif discovery has 2 steps: calculate the # of occurrences; evaluating the significance. Are Stock-Inv or Stock-Inv-Day Motifs useful? Some questions/theorems/thoughts: 1. 2. 3. 4. 5. All K-Paths are isomorphic (thus, there’s alway a Kpath motif). A Shortest. KPath is an Induced subgraph. What does sequence Frequency(1 Path. Motif)=|V|, Frequency(2 Path. Motif), …tell? Sequence of Frequency(Shortest 1 Path), Frequency(Shortest 2 Path), …? Sequence Frequency(Max. Shortest 1 Path), Frequency(Max. Shortest 2 Path)… tell us? where a Max. S 2 P is not part of a S 3 P. Extend to Hyper. Edges? What is a path in, e. g. , a 3 Hyper. Graph? Both? 2 HGInterface 3 Hyper. Graph. Path. 1 HGI 3 HGP. (In general, h. HGIk. HGP, where 0<h<k) At the other extreme (all SPs are length=1: Or? 6. 7. I’ll bet most important motifs, M(V’, E’) in G are “Shortest Path Motifs”: x, y V’, a G-Shortest. Path in M running from x to y. I. e. , M is made up of G-SPs. 8. A Clique is a SPMotif (made up entirely of Shortest 1 Paths) A 4 PARThyper. Graph or just 4 Hyper. Graph has 4 vertex PARTS and each edge is a solid tetrahedron (defined by a vertex quadruple, one from each PART). Stock Recommender 4 hyper. Graph (Investors, Stocks, Strengh(Stron. Buy, …), Days). A tetrahedral hyperedge is a recommendation (connects Investor k, Stock X, Strength B and Day n iff k recommends X as a Buy on day n). A 4 hyper. Clique is a community s. t. all the investors recommend all the stocks as strength=B on each day in the clique. some degeneracy since the Strength will always be singleton? One might argue that this is just a series of 3 Hyper. Graphs, one for each strength level. ) A Tweet 4 Hyper. Graph: PART 1=tweeters; PART 2=hashtags; PART 3=tweets, PART 4=day. A 4 hyper. Clique: all tweeters send all tweets on all hashtags each day of the clique. A MBR 4 Hyper. Graph: PART 1=customers; PART 2=items; PART 3=days, PART 4=store. A 4 hyper. Clique: all customers buy all items at all stores on each day of the clique. 0 1 1 1 1 0 2 2 2

Introduction to 2 PART Graph Community Search: For a multipartite graph the concept of

Introduction to 2 PART Graph Community Search: For a multipartite graph the concept of community is still related to a large density of edges between members of the same group. A clique in a 2 PART (bipartite) graph to be a bipartite subset of vertices with all possible edges. 2 PART Induction thm: In a bipartite graph, a Kclique and 3 clique that share an edge form a (K+1)clique iff all edges that can exist, from the nonshared Kclique vertices to the non-shared 3 clique vertex, do exist. 2 PART 3 Clique thm: a pair of vertices from part 1, a, b and a vertex from the part 2, 1, form a 3 Clique iff both possible edges a 1, b 1 exist. CLQ 3 is constructed by listing each vertex pair in each p. Tree along with the naming vertex of the p. Tree. a a The 2 3 cliques ab 1 and b 12 sharing b 1 form a 4 clique iff the non-shared vertex pair a 2 is an edge The 2 3 cliques ab 1 and bc 1 sharing b 1 form a 4 clique. b 1 b 2 c 1 a a 1 b 2 The 4 clique ab 12 and 3 clique bc 2 sharing b 2 form a 5 clique iff the non-shared vertex pair c 1 is an edge. The 4 clique abc 1 and 3 clique cd 1 sharing c 1 form a 5 clique c c d a a a 1 b b 2 5 clique abc 12 and 3 clique c 23 sharing c 2 form a 6 clique iff the non-shared vertex pairs a 3 and b 3 are edges. 5 clique abc 12 and 3 clique d 12 sharing vertices 1 and 2 form a 6 clique. 5 clique abcd 1 and 3 clique de 1 sharing edge e 1 form a 6 clique. c 3 b 1 2 c 3 d b b 2 c d d e 1 a a 1 b 2 c 3 d c d 1 c a a 6 clique abc 123 and 3 clique cd 3 sharing c 3 form a 7 clique iff the non-shared vertex pairs d 1 and d 2 are edges. 6 clique abc 123 and 3 clique d 23 sharing vertices 2 and 3 form a 7 clique iff vertex pair d 1 is an edge. 6 clique abcd 12 and 3 clique de 2 sharing edge d 2 form a 7 clique iff vertex pair e 1 is an edge 6 clique abcde 1 and 3 clique ef 1 sharing edge e 1 form a 7 clique. 1 b e 1 1 b 2 c d e f Although the pattern seems complex, the 2 PART Clique Algorithm can be stated: A Kclique and 3 clique sharing 2 vertices form a K+1 clique iff all edges from the non-shared 3 clique vertex to each non-shared Kclique vertex (from the other PART) exist. That is, check edge existence between all non-shared vertices.

clique. Trees 2 PART G 11: Inv(12345) rec Stock(ABCDE) DI Stock. Base. Clique. Trees

clique. Trees 2 PART G 11: Inv(12345) rec Stock(ABCDE) DI Stock. Base. Clique. Trees NPZp. T st=5 I 23 1 00 0 10 0 01 1 0 0 0 1 I 3 S A 1 10 B 0 10 C 1 11 1 0 1 0 1 1 1 0 0 1 1 S 1 11 2 31 1 1 1 2 2 1 1 1 1 3 2 1 11 0 00 0 11 1 1 0 0 0 1 1 00 0 10 0 01 1 0 0 0 1 A 1 1 0 B 0 1 0 C 1 1 0 1 22 1 11 2 31 0 0 0 1 1 1 5 1 0 0 1 1 3 0 1 0 1 1 4 Stock EBCTs I 12 11 01 01 01 3 4 5 S A B C D E 0 0 0 1 1 0 2 4 0 0 0 1 1 1 0 0 0 0 0 1 1 00 0 10 0 01 1 0 0 0 1 A 1 10 B 0 10 C 1 11 1 0 1 0 1 1 1 0 0 1 11 2 31 1 1 1 2 2 1 1 1 1 3 2 1 11 0 00 0 0 0 1 1 1 0 0 0 0 0 1 1 01 1 11 0 01 1 0 0 0 1 0 1 1 0 1 1 0 1 A 1 1 0 B 0 1 0 C 1 1 0 1 0 1 1 1 0 0 1 1 3 3 1 1 1 2 2 1 11 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4 0 1 0 1 1 0 3 3 1 1 0 0 0 1 1 0 4 2 Inv EBGTs =C a Max. Clique. Then 1 of 1 1 0 0 A B C D E 1 2 3 4 5 DI Stock. Base. Clique. Trees 0 0 0 1 1 2 3 S 4534 0 0 0 1 1 1 L=1 1 0 1101 L=0 1100 1111 0111 1 11 0 00 D 3 4 5 New DSs: L=2 Stock BCTs I 12 10 01 00 00 oa 2 E 3 C 3 D 3 E 4 A 4 C 4 D 4 E A B C D E A B C D E oa 12 3 4 5 11 0 0 0 11 1 1 0 01 1 1 0 Edge. Map A B C D E Adj Matrix Traditional data structures 1 A Edge. Tbl 1 A 2 B 1 B 3 C 1 C 1 D 4 D 2 A 2 B 5 Graph E 2 C G 11 2 D 11 11 10 21 21 21 30 30 31 31 31 41 40 41 41 41 50 50 50 0 1 1 0 1 0 3 3 1 1 1 0 0 0 4 2 0 1 1 1 1 0 2 4 0 1 1 1 0 3 3

Baseclique. Trees (Bc. Ts), Expanded. Base c. Trees (EBc. Ts)=Max. Cliques for: 1 2

Baseclique. Trees (Bc. Ts), Expanded. Base c. Trees (EBc. Ts)=Max. Cliques for: 1 2 IDS Base c. Trees 1 1 0 0 0 1 A 0 B 1 1 1 0 0 A B 0 1 1 1 1 1 1 2 1 1 0 0 1 1 0 A B 0 1 1 1 1 2 1 0 1 A B 0 1 1 1 1 1 1 2 1 0 0 0 1 1 A B 0 1 1 1 0 0 1 0 1 0 0 1 1 1 2 aao 1 2 1 1 A 1 1 B 0 0 0 1 0 0 1 1 1 0 1 2 1 0 0 1 1 1 A 1 1 B 0 0 0 1 0 0 1 1 1 0 0 1 1 1 2 0 1 1 0 0 1 1 0 1 1 1 2 1 1 1 0 1 A 0 B 1 1 2 1 0 0 1 1 2 0 1 1 0 A 1 0 B 0 1 1 0 0 0 1 1 1 0 0 1 1 0 0 1 1 1 1 1 A 1 B 0 0 1 1 1 ISD Bc. Trees 1 2 1 1 0 0 0 1 1 0 A 1 0 B 0 1 1 0 0 1 1 0 0 1 1 2 1 1 1 1 SID Base c. Trees 1 2 1 1 0 0 SID Base c. Trees SDI Base c. Trees A 1 B 0 1 2 1 1 1 SDI Base c. Trees DSI Base c. Trees The c. Tree. Set is closed under aao as well and applying aao to DSI and SDI gives the same 2 Max. Clique c. Trees The non-leaf c. Tree PARTs are a lexico ordering of singletons so construct the EBc. Ts using only the p. Tree Leaves? 1 1 1 1 2 SDI Base c. Trees DSI Base c. Trees 1 1 0 ISD Bc. Trees A 1 B 0 0 1 1 0 A 1 0 B 0 1 0 1 1 0 0 1 1 0 1 2 1 1 1 2 1 1 1 0 A B 1 2 1 0 0 1 1 0 0 1 1 0 1 0 0 1 1 0 0 1 A B 1 2 A B oaa A B 1 2 1 0 0 1 1 0 0 1 1 0 1 0 0 1 1 0 0 1 DIS Bc. Ts 1 2 1 0 0 0 1 1 1 0 0 1 A 0 B 1 1 1 0 0 SDI Bc. Ts 1 2 DSI Base c. Trees 1 2 1 0 0 0 1 1 A 0 B 1 1 1 0 0 1 1 1 1 1 aoa 1 2 0 1 1 0 A 1 0 B 0 1 1 0 0 1 1 0 0 1 0 0 1 1 1 0 0 1 DSI Base c. Trees 1 2 1 0 0 0 1 1 A 0 B 1 1 1 0 0 1 1 1 1 1 1 2 DIS NPZ p. Tree Stride=2 Max. Cliques(H 2)= 1 Bc. Ts + 1 EBc. T 1 0 0 1 1 1 0 1 1 2 A B 0 1 1 0 1 2 1 1 10 11 20 20 11 10 21 20 1 1 A L=2 B 1 A B L=1 0 A B 0 A L=0 1 B 1 1 1 0 IDS NPZ p. Tree Stride=2 1 1 2 2 1 1 0 A 1 B 1 A 0 B 0 A 0 B 1 1 0 DSI NPZ p. Tree Stride=2 A A B B 1 1 01 02 11 12 01 02 0 1 1 SDI NPZ p. Tree Stride=2 A A B B ISD Bc. Ts 1 1 0 0 A 1 1 B 0 0 2 Seems to be no need to apply the 3 ops to 6 p. Tree. Sets (apply aoa, oaa, aao to any 1 p. Tree. Set only). And if the 3 ops commute use any order). Can we concatenate p. Tree. Sets into 1 and use only 1 op on it to get all EBc. Ts? If so, 1 op on 1 p. TS gives EBc. Ts=MCLQs. Take oaa on one Concatenated Bc. T (CBc. T), generate all EBc. Ts=Max. Cliques! SID CBc. Ts 1 ISD Bc. Trees B 1 1 0 0 1 DSI Base c. Trees 1 0 0 1 oaa 1 0 1 1 1 1 2 aao A B 0 1 1 1 0 oaa 1 2 1 1 0 0 oaa 1 0 1 2 1 0 0 1 oaa A B 0 1 1 0 1 2 0 0 1 1 A 1 1 B 0 0 A 1 2 1 0 1 1 0 0 oaa 0 1 SID Base c. Trees A S A B 0 1 Investors(12) recommend Stocks(AB) B 0 1 A 1 1 B 0 0 aoa 1 0 0 1 1 3 PART Hyper. Graph H 2: On Days( ) aoa 1 0 0 1 aoa 1 0 aoa 1 2 I SDI Base c. Trees aoa DIS Base c. Trees 0 0 D 10 1 1 DSI Base c. Trees 0 0 1 1 1 0 0 0 1 1 1 2 1 2 0 1 1 1 1 0 SID NPZ p. Tree Stride=2 DSI Base c. Trees 1 2 1 0 0 0 1 1 A 0 B 1 1 1 0 0 1 1 1 1 1 DSI Base c. Trees 1 2 aao 1 0 0 1 A 0 B 1 1 0 1 1 1 1 2 A A B B 10 11 20 21 11 10 20 20 1 1 0 ISD NPZ p. Tree Stride=2 1 1 2 2 A 0 A 1 B 0 1 1 0 0 1

Maximal Base Clique. Trees for H 3 Stock Day Investor Base c. Trees A

Maximal Base Clique. Trees for H 3 Stock Day Investor Base c. Trees A B C D E 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 1 1 1 1 1 0 0 0 1 1 1 1 0 0 0 1 1 0 1 0 0 0 1 1 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 1 1 0 0 1 0 0 1 1 0 0 0 0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 1 0 aoa then oaa on the 6 c. Trees (removing duplicates - no covers since aoa then oaa gives Maximal Cliques only). We get 34 MCs below. Theorem: These 34 MCs are the only Maxmal Cliques. General thm: {a. . ao(a. . oa(…oa. . a(B)|B=Base. Clique} is the Max. Clique. Set Thus, for a bipartite graph, ao(B) is MCS. 1 1 5 4 5 1 5 3 2 3 3 2 2 1 3 2 3 3 4 2 2 3 4 5 4 1 4 2 1 3 2 1 2 3 3 4 2 5 2 3 3 3 4 5 2 4 4 4 3 3 5 4 3 3 4 2 2 5 3 2 4 2 3 2 4 1 3 3 3 2 1 2 3 3 1 1 2 3 1 2 1 0 1 0 0 0 1 1 0 0 0 0 1 1 0 0 0 1 1 1 1 A B C D E 1 0 1 1 1 1 0 0 0 1 1 1 1 1 0 1 0 0 0 1 1 1 0 0 1 1 1 0 1 1 0 0 1 1 1 0 0 0 1 1 1 1 0 1 0 1 0 0 1 0 0 0 1 1 5 1 4 5 2 5 3 3 4 2 3 3 4 3 2 2 1 3 2 2 3 1 5 3 3 2 1 0 0 3 2 2 1 3 2 3 4 2 5 2 3 3 2 4 1 3 3 1 0 1 1 0 3 3 2 3 4 2 3 2 4 1 0 0 1 2 3 4 5 A B C D E 1 1 0 0 0 0 1 0 0 0 0 1 1 0 0 0 1 0 1 1 1 A B C D E 1 0 0 0 0 1 1 1 1 1 0 0 0 1 1 1 1 0 0 0 1 1 0 1 0 0 0 1 1 0 0 0 1 1 1 1 0 1 1 0 1 0 1 1 1 1 0 1 1 0 0 1 0 1 1 1 1 0 0 1 1 1 1 0 1 1 1 A B C D E 1 0 0 1 1 0 1 1 1 1 1 1 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 0 0 1 1 0 0 0 0 1 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 1 0 0 1 1 1 0 1 0 0 1 1 1 0 1 1 0 0 1 1 1 1 0 0 0 1 1 1 0 1 1 1 0 0 1 1 0 1 1 1 0 1 1 1 0 0 1 1 1 0 0 1 1 1 0 0 1 1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