120 likes | 303 Views
Final Project Simplicial Complex. ID: 219 Name: Qun Yu Class: CS257 219 Spring 2009 Instructor: Dr. T.Y.Lin. Simplicial Complex input/output. File 1. File 2. File 3. File 4. File 5. A,B,C,D B,C,D,D C,D,E,F …. A,B,C,D,D B,C,D,D,E C,D,E,F,G … …. A B C. A,B B,C C,D ….
E N D
Final ProjectSimplicial Complex ID: 219 Name: Qun Yu Class: CS257 219 Spring 2009 Instructor: Dr. T.Y.Lin
Simplicial Complex input/output File 1 File 2 File 3 File 4 File 5 A,B,C,D B,C,D,D C,D,E,F … A,B,C,D,D B,C,D,D,E C,D,E,F,G … … A B C ... A,B B,C C,D … A,B,C B,C,D C,D,E … Simplicial Complex Program runs here! Output files from Simplicial Complex Program.
Input SC program takes input from output file by Tokenize team. There are 5 files in total and may be more in future. File 1: only individual words File 2: word pairs File 3: word triplets File 4: 4 words File 5: 5 words
3 development phases Phase-1 : Translate the words into numbers A,B,C,D B,C,D,D C,D,E,F … A,B,C,D,D B,C,D,D,E C,D,E,F,G … … A B C ... A,B B,C C,D … A,B,C B,C,D C,D,E … 1,2,3,4 2,3,4,5 3,5,6,7 … 1,2,3,4,5 2,3,4,5,6 3,5,6,7,8 … … 1 2 3 ... 1,2 2,3 3,5 … 1,2,3 2,3,5 3,5,6 …
3 development phases Phase-2: Find Connected Components and then decompose each Connected Component into Simplicial Complex from level-0 to level-4. In short, Connected Components are sub-graphs. There are different levels of Simplicial Complex. In a Simplicial Complex, there is an edge between any two vertices.
Connected Component There are 3 Connected Components in this graph.
Simplicial Complex level-1 to level-4 Level-1 Level-2 Level-3 Level-4
Phase-2 Processing… Since the 5 input files are generated in parallel, once a file is produced by Tokenize phase, our program starts to work on this file. File 1 should come first. It is easy to do. Every vertex is a CC. File 2 + File 1: Find CCs and decompose each CC. Also, here we need to make sure vertex in File2 is in File1(i.e. subset of File1) File3 + File2 + Fiel1: Same, but more complicated. File4 + File3 +File2 + File1: File5 + File4 + File3 + File2 + File1:
Output 5 files in formats: CC1: 1,2,3,4,5,6,7,8 Level-0:{1}{2}{3}{4}{5}{6}{7}{8} Level-1:{1,2}{2,4}{1,4} Level-2:{1,2,4} Level-3: Level-4: CC2:
Data Structure Since the words are translated into numbers in step 1. The data structure represents data from input files can be typedef struct { int a; int b; } rec1; typedef struct { int a; int b; int c; } rec2; typedef struct { int a; int b; int c; int d; } rec3; typedef struct { int a; int b; int c; int d; int e; } rec4;