150 likes | 323 Views
By: Priya Gangaraju Saloni Tamotia. Project Presentation- Simplicial Complex conversion to graph. Simplex. Convex hull of a set of (n+1) independent points in some Euclidean Space of dimension n or higher. Examples of Simplices : 0-Simplex (1 vertex) 1-Simplex (2 vertices)
E N D
By: PriyaGangaraju SaloniTamotia Project Presentation- SimplicialComplex conversion to graph
Simplex • Convex hull of a set of (n+1) independent points in some Euclidean Space of dimension n or higher. • Examples of Simplices: • 0-Simplex (1 vertex) • 1-Simplex (2 vertices) • 2-Simplex(3 vertices)
0-Simplex 0 1-Simplex 1 2-Simplex 2 Simplices 0-Simplex which is just a node or 1 vertex 1- simplex with 2 vertices; represented as line segment 2-simplex with 3 vertices; represented as triangle
Simplicial Complex • A simplicial complex is constructed by “gluing together” points, line segments, triangles, and simplices.
Keywords assumed as vertices Formation of simplex by connection of keywords provides special meaning. Example of WallSreet Journal Used in search engines Use of Simplicial Complex in Project
Begin with 0-Simplex We have vertices {0,1,2,3,4,5,6,7,8} • Formation of 1-simplex • Pair two vertices of the 0-simplexes • Formation of 2-Simplex • Pair three vertices of the 0-simplexes Formation of Simplexes
A B C AB BC CA ABC This is the formation of 2- simplex Theory: Graphical Representation
Input looks like: 25 6 3 4 0 1 7 8 c0={0,1,2,3,4,5,6,7,8} c1={(0 1),(0 2),(1 2),(3 4),(5 6),(5 7),(6 7),(6 8), (7 8)} c2={(0 1 2),(5 6 7),(6 7 8)} Input Form
Vertices – 0,1,2,3,4,5,6,7,8 (0 1) – vertex 9 (0 2) – vertex 10 (1 2) – vertex 11 …. (0 1 2) – vertex 18 (5 6 7) – vertex 19 (6 7 8) – vertex 20 Representation
Two output forms: • Vertices: which are single nodes {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20} • Edges: connection between nodes { (20,6),(20,7),(20,8),(20,15),(20,16),(20,17), (19,5),(19,6),(19,7),(19,13),(19,14),(19,15), (18,0),(18,1),(18,2),(18,9),(18,10),(18,11)} Expected Output
A counter “Vertices” keeps the count of vertices. An array is used to represent the adjacency matrix. The matrix keeps track of the vertex given to the edge. For example, if the edge between 0 and 1 is represented as vertex 9, then the entry in the matrix will be e[0][1]=9. Implementation in C
Edges are listed as • One edge for each of the vertices. • One edge for each of the combination of the vertices if such a combination exists. • For example, (0 1 2) will be vertex 18. So one set of edges will be, (18,0),(18,1),(18,2). • second set will be (18,(0 1)) which will be (18,9) as (0 1) represents vertex 9. Implementation in c (contd.)
Each of the combinations are verified against the adjacency matrix and an edge is added to the edges list if there is an edge which is represented as vertex. Each of the array elements are initialized to -1. Implementation in c (contd.)
Vertices={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15, 16,17,18,19,20} Edges={(20,6),(20,7),(20,8),(20,15),(20,16),(20,17), (19,5),(19,6),(19,7),(19,13),(19,14),(19,15), (18,0),(18,1),(18,2),(18,9),(18,10),(18,11)} Press any key to continue . . . Sample output produced