Differentiate between directed and undirected graphs.

By vivek kumar in 20 Jul 2024 | 09:05 pm
vivek kumar

vivek kumar

Student
Posts: 552
Member since: 20 Jul 2024

Differentiate between directed and undirected graphs.

20 Jul 2024 | 09:05 pm
0 Likes
Prince

Prince

Student
Posts: 557
Member since: 20 Jul 2024

Directed Graphs (Digraphs):


  1. Edges: In directed graphs, edges have a direction. They are represented as ordered pairs (u, v), where the edge goes from vertex u to vertex v. The direction is crucial and can’t be reversed.
  2. Representation: They can be represented using an adjacency matrix where the entry at position (i, j) is non-zero if there is a directed edge from vertex i to vertex j.
  3. Example: A social media network where user A follows user B, but not necessarily vice versa.

Undirected Graphs:


  1. Edges: In undirected graphs, edges have no direction. They are represented as unordered pairs {u, v}. The edge between u and v is the same as the edge between v and u.
  2. Representation: They can be represented using an adjacency matrix where the matrix is symmetric (i.e., the entry at (i, j) is the same as the entry at (j, i)).
  3. Example: A network of friends where if user A is friends with user B, then user B is also friends with user A.
20 Jul 2024 | 11:42 pm
0 Likes

Report

Please describe about the report short and clearly.