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

JordanJordan
Looking for a career mentor? I've seen my fair share of shake-ups.
Chat with Jordan
EzraEzra
Faith is not about having all the answers, but learning to ask the right questions.
Chat with Ezra
JudyJudy
Simplicity is my specialty.
Chat with Judy

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