Special graph
Techniques Used:
1. Layout: The Fruchterman-Reingold layout was applied to position nodes
for clarity, minimizing edge crossings.
2. Styling:
o Nodes are colored skyblue and sized small for clarity.
o Edges are colored gray, with arrows to indicate the direction of
communication.
o Edge arrow size was adjusted for clear visualization
3. The directed arrows show the direction of communication, which can reveal
patterns in email exchanges, such as frequent communication between
certain individuals or groups.
Central Nodes: In a large network like this, some nodes will appear at the
center of the graph, indicating individuals who are highly connected. These
nodes may represent key individuals within the Enron corporation who
communicated frequently with others.
Clusters: The layout may also reveal clusters of nodes that are tightly
connected, representing groups of individuals or departments within the
company.
Email Flow: The direction of the arrows helps identify the flow of information
within the network, which could be useful for identifying important
information channels or potential bottlenecks in communication.
Code :
Bipartite graph : (representation of special graph (extra )
Representing graph
Edge list :
Edge List for the Enron Dataset (first 500 samples):
[(0, 1), (1, 0), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (1, 7), (1, 8), (1, 9), (1, 10), (1,
11), (1, 12), (1, 13), (1, 14), (1, 15), (1, 16), (1, 17), (1, 18), (1, 19), (1, 20),
(1, 21), (1, 22), (1, 23), (1, 24), (1, 25), (1, 26), (1, 27), (1, 28), (1, 29), (1,
30), (1, 31), (1, 32), (1, 33), (1, 34), (1, 35), (1, 36), (1, 37), (1, 38), (1, 39),
(1, 40), (1, 41), (1, 42), (1, 43), (1, 44), (1, 45), (1, 46), (1, 47), (1, 48), (1,
49), (1, 50), (1, 51), (1, 52), (1, 53), (1, 54), (1, 55), (1, 56), (1, 57), (1, 58),
(1, 59), (1, 60), (1, 61), (1, 62), (1, 63), (1, 64), (1, 65), (1, 66), (1, 67), (1,
68), (1, 69), (1, 70), (2, 1), (3, 1), (3, 4), (3, 6), (3, 878), (3, 8552), (4, 1), (4,
3), (4, 49), (4, 50), (4, 74), (4, 878), (4, 910), (4, 8552), (5, 1), (5, 56), (5, 75),
(5, 86), (5, 93), (5, 106), (5, 136), (5, 140), (5, 144), (5, 145), (5, 151), (5,
188), (5, 195), (5, 212), (5, 213), (5, 301), (5, 416), (5, 443), (5, 478), (5,
566), (5, 588), (5, 647), (5, 734), (5, 823), (5, 851), (5, 919), (5, 1330), (5,
1359), (5, 1365), (5, 1371), (5, 1672), (5, 1725), (5, 1768), (5, 1793), (5,
1824), (5, 2718), (5, 2737), (5, 2753), (5, 3027), (5, 3237), (5, 3311), (5,
3334), (5, 3844), (5, 4153), (5, 4398), (5, 4746), (5, 5030), (5, 5033), (5,
5036), (5, 5048), (5, 5050), (5, 5061), (5, 6917), (5, 9132), (5, 9136), (5,
9498), (5, 9499), (5, 9500), (5, 9501), (5, 9502), (5, 9503), (5, 9504), (6, 1),
(6, 3), (6, 7), (6, 50), (6, 74), (6, 308), (6, 878), (6, 910), (6, 10606), (7, 1), (7,
6), (7, 49), (7, 50), (7, 74), (7, 88), (7, 118), (7, 308), (7, 851), (7, 878), (7,
910), (7, 949), (7, 7775), (7, 10606), (8, 1), (9, 1), (9, 56), (9, 81), (9, 82), (9,
184), (9, 273), (9, 316), (9, 390), (9, 416), (9, 823), (9, 1053), (9, 1139), (9,
1330), (9, 1672), (9, 1725), (9, 1768), (9, 2348), (9, 2630), (9, 3334), (9,
3844), (9, 5020), (9, 5024), (9, 5033), (9, 5036), (9, 5050), (9, 5069), (9,
5587), (9, 8032), (9, 8556), (9, 8565), (9, 8566), (9, 9129), (9, 9130), (9,
9131), (9, 9132), (9, 9133), (9, 9134), (9, 9135), (9, 9136), (10, 1), (10, 11),
(10, 12), (10, 13), (11, 1), (11, 10), (11, 12), (11, 13), (11, 74), (12, 1), (12,
10), (12, 11), (12, 13), (12, 74), (13, 1), (13, 10), (13, 11), (13, 12), (13, 56),
(13, 74), (13, 78), (13, 82), (13, 115), (13, 128), (13, 362), (13, 959), (13,
960), (13, 961), (13, 962), (14, 1), (15, 1), (15, 56), (15, 102), (15, 112), (15,
133), (15, 1806), (16, 1), (16, 56), (16, 82), (16, 887), (16, 1365), (17, 1),
(18, 1), (18, 316), (18, 416), (18, 8565), (18, 8566), (19, 1), (19, 5023), (19,
5024), (20, 1), (21, 1), (21, 78), (21, 189), (21, 204), (22, 1), (23, 1), (24, 1),
(25, 1), (25, 74), (26, 1), (27, 1), (27, 56), (27, 72), (27, 74), (27, 75), (27,
76), (27, 83), (27, 93), (27, 95), (27, 102), (27, 106), (27, 107), (27, 109),
(27, 112), (27, 128), (27, 133), (27, 136), (27, 140), (27, 145), (27, 184), (27,
195), (27, 232), (27, 301), (27, 308), (27, 353), (27, 402), (27, 409), (27,
416), (27, 443), (27, 458), (27, 478), (27, 652), (27, 734), (27, 802), (27,
851), (27, 873), (27, 887), (27, 929), (27, 939), (27, 1028), (27, 1139), (27,
1161), (27, 1287), (27, 1304), (27, 1334), (27, 1371), (27, 1507), (27, 1528),
(27, 1552), (27, 1672), (27, 1819), (27, 1821), (27, 1824), (27, 1927), (27,
1935), (27, 2111), (27, 2253), (27, 2718), (27, 2720), (27, 2737), (27, 2753),
(27, 2939), (27, 2947), (27, 3237), (27, 3844), (27, 4153), (27, 4398), (27,
4755), (27, 5033), (27, 5041), (27, 5045), (27, 5046), (27, 6826), (27, 6827),
(27, 6828), (27, 6829), (27, 6830), (27, 6831), (28, 1), (29, 1), (30, 1), (30,
9137), (31, 1), (31, 5023), (31, 5024), (32, 1), (32, 9137), (33, 1), (34, 1),
(35, 1), (35, 1768), (35, 9137), (36, 1), (37, 1), (38, 1), (39, 1), (39, 56), (39,
81), (39, 93), (39, 342), (39, 878), (39, 1588), (39, 1970), (39, 2737), (39,
5025), (39, 5026), (39, 5027), (39, 5587), (39, 8556), (39, 8558), (39, 8559),
(39, 8560), (39, 8561), (40, 1), (41, 1), (41, 1768), (41, 9137), (42, 1), (42,
93), (42, 316), (42, 9861), (43, 1), (44, 1), (44, 56), (44, 878), (44, 1588),
(44, 5026), (44, 5027), (44, 5587)]
Code :
adjacent matrix :
Code :
Flow-chart Diagram :
Code :
Visualize using the Reingold-Tilford layout. The
layout helps structure the graph in a way that
resembles a flowchart, with nodes arranged
hierarchically to clearly show the direction of
communication (email exchanges).
table-based test : (VISUALIZATION)
A test-based approach:
involves creating a series of tests to validate the
correctness and functionality of a system, ensuring
that it behaves as expected. For graph-based
systems, this approach is crucial for verifying the
relationships between nodes and edges, checking
for connectivity, and validating the integrity of the
data structure.
Benefits of Test-Based Approach:
Error Detection: Identifies errors and
inconsistencies in the graph’s structure, like
missing or incorrect edges.
Systematic Validation: Ensures the system
behaves as expected and aligns with its
design.
Automated Testing: Enables automation,
crucial for large datasets with complex
relationships.
Improved Reliability: Validates graph
relationships, enhancing the reliability of the
system and algorithms.