answersLogoWhite

0

A tree is a specialized case of a graph. A tree is a connected graph with no circuits and no self loops.

A graph consists of 3 sets - vertices, edges and a set representing relations between vertices and edges i.e. v = (a, b, c) e = (e1, e2, E3) and x = ((a,b,e1), (b,c,e2), (a,c,e3)) represents a graph where e1 joins a and b and so on.

A circuit is alternating sequence of edges and vertices where in edges are not repeated, vertices may be and starting and ending vertices are the same e.g. a e1 b e2 c e3 a means a connected to b, b to c and c to a. This forms a loop.

A self loop is a vertex looping on to itself.

As a tree does not contain any loops and is still connected, it is also called a minimally connected graph i.e. there is just one path between any 2 vertices.

User Avatar

Wiki User

15y ago

Still curious? Ask our experts.

Chat with our AI personalities

TaigaTaiga
Every great hero faces trials, and you—yes, YOU—are no exception!
Chat with Taiga
ReneRene
Change my mind. I dare you.
Chat with Rene
DevinDevin
I've poured enough drinks to know that people don't always want advice—they just want to talk.
Chat with Devin

Add your answer:

Earn +20 pts
Q: DIFFERENCE between GRAPH and TREE IN DATA STRUCTURES?
Write your answer...
Submit
Still have questions?
magnify glass
imp