0% found this document useful (0 votes)
14 views1 page

DAA

A graph is defined as an ordered pair of vertices and edges, which can be undirected or directed. Complete graphs and digraphs have edges connecting every pair of nodes, while connected and acyclic graphs are referred to as unrooted trees. Additionally, weighted graphs assign values to edges, and from a hardware and programming perspective, they allow for shared memory access among processors and parallel tasks.

Uploaded by

Majid Latif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views1 page

DAA

A graph is defined as an ordered pair of vertices and edges, which can be undirected or directed. Complete graphs and digraphs have edges connecting every pair of nodes, while connected and acyclic graphs are referred to as unrooted trees. Additionally, weighted graphs assign values to edges, and from a hardware and programming perspective, they allow for shared memory access among processors and parallel tasks.

Uploaded by

Majid Latif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

A graph is an ordered pair, G = (V, E), of two sets representing the

nodes or vertices of the graph and the edges of the graph. An edge specifies
which nodes have a connection between them.

A graph can either be undirected or directed. An undirected graph, typically


just called a graph, has edges that can be traversed in either direction.

A directed graph, also called a digraph, has edges that can


only be traversed in one direction. For a digraph, our set of edges will have
ordered pairs in which the first item is where the edge starts and the second is
where the edge ends.

A complete graph is a graph with an edge between every pair of nodes. If there
are N nodes, there will be (N^2 - N) / 2 edges in a complete graph without
loop edges.

A complete digraph is a digraph with an edge allowing traversal


between every pair of nodes. Because the edges of a graph allow travel in two
directions, whereas a digraph’s edges allow travel in only one, a digraph with N
nodes will have twice as many edges, specifically N2 - N.

A graph or digraph is called connected if there is at least one path between


every pair of nodes. A cycle is a path that begins and ends at the same node. An
acyclic graph or digraph is one that has no cycles.

A graph that is connected


and acyclic is called an unrooted tree. An unrooted tree has the structure of a
tree except that no node has been specified as the root (but every node could
serve as the root).

A subgraph (Vs, Es) of a graph or digraph (V, E) is one that has a subset of
the vertices (Vs ⊆V) and edges (Es ⊆ E) of the full graph.

A path between two nodes of a graph or digraph is a sequence of edges that


can be traveled consecutively

A weighted graph or digraph is one where each edge has a value, called the
weight, associated with it. In graph drawings, the weight will be written near
the edge.

From a hardware perspective, this describes a computer system where all processors
can directly access the same physical memory, usually through a shared connection
like a bus.

From a programming perspective, it means all parallel tasks (or threads) see the
same memory space and can work on the same memory locations, no matter where the
actual memory is located in the hardware.

You might also like