0 Up votes0 Down votes

0 views4 pagesGraph

Jan 27, 2018

© © All Rights Reserved

DOCX, PDF, TXT or read online from Scribd

Graph

© All Rights Reserved

0 views

Graph

© All Rights Reserved

- Some New kinds of Connected Domination in Fuzzy Graphs
- Disjoint Set ADT.pdf
- Homework 1
- Algorithm to Construct Super Vertex Magic Total Labeling of Complete Graphs
- IJAIEM-2014-10-31-101
- pure_ch21
- DOC-20190502-WA0007
- MIT6_006F11_lec13
- GraphTheory.pdf
- Networks Theory.pdf
- vertexformofaquadratic-sethn
- On the Injective Domination of Graphs
- Teoría de Grafos ch14
- Mapping network to smaller networks to get vulnerability value
- 1802.07298
- The Fluid Mechanics of Liquid Democracy
- Session 5&6
- 2-sat e-maxx ru (english translated)
- Lecture9.pdf
- Cause and Effect Graphing

You are on page 1of 4

edge is represented as a tuple of vertices. How we want to represent a graph largely depends on

the operations we intend to support.

Adjacency list:

An array of linked lists is used. Size of the array is equal to number of vertices. Let the array be

array[]. An entry array[i] represents the linked list of vertices adjacent to the ith vertex. This

representation can also be used to represent a weighted graph. The weights of edges can be stored

in nodes of linked lists. Following is adjacency list representation of the above graph.

An array A of length n where each entry A[i] contains a pointer to a linked list of all the out-

neighbors of vertex i. In an undirected graph with edge {u, v} the edge will appear in the adjacency

list for both u and v.

An adjacency list is a list of lists. Each list corresponds to a vertex u and contains a list of edges

(u, v) that originate from u. Thus, an adjacency list takes up Θ(V + E) space.

Adjacency matrix:

An adjacency matrix is a 2-D array of size |V| X |V| of bits where element (i, j) is 1 if and only if

the edge (vi, vj) is in E. Thus an adjacency matrix takes up Θ (V2) storage (note that the constant

factor here is small since each entry in the matrix is just a bit).

Edge List:

The edge list structure simply stores the vertices and the edges into unsorted sequences.

Easy to implement.

Finding the edges incident on a given vertex is inefficient since it requires examining the

entire edge sequence

Total space: O(n + m)

Edge lists

One simple way to represent a graph is just a list, or array, of |E| edges, which we call an edge list.

To represent an edge, we just have an array of two vertex numbers, or an array of objects containing

the vertex numbers of the vertices that the edges are incident on. If edges have weights, add either

a third element to the array or more information to the object, giving the edge's weight. Since each

edge contains just two or three numbers, the total space for an edge list is Θ(E). For example, here's

how we represent an edge list in JavaScript for the social network graph:

[ [0,1], [0,6], [0,8], [1,4], [1,6], [1,9], [2,4], [2,6], [3,4], [3,5], [3,8], [4,5], [4,9], [7,8], [7,9] ]

Edge lists are simple, but if we want to find whether the graph contains a particular edge, we have

to search through the edge list. If the edges appear in the edge list in no particular order, that's a

linear search through |E| edges. Question to think about: How can you organize an edge list to

make searching for a particular edge take O(lgE) time? The answer is a little tricky.

Comparison:

The worst case storage of an adjacency list is when the graph is dense, i.e. E = Θ(V2). This gives

us the same space complexity as the adjacency matrix representation. The Θ(V + E) space

complexity for the general case is usually more desirable, however. Furthermore, adjacency lists

give you the set of adjacent vertices to a given vertex quicker than an adjacency matrix

O(neighbors) for the former vs O(V ) for the latter. In the algorithms we’ve seen in class, finding

the neighbors of a vertex has been essential.

- Some New kinds of Connected Domination in Fuzzy GraphsUploaded byIOSRjournal
- Disjoint Set ADT.pdfUploaded byBhavya Jain
- Homework 1Uploaded byTien Telopette
- Algorithm to Construct Super Vertex Magic Total Labeling of Complete GraphsUploaded byAnonymous vQrJlEN
- IJAIEM-2014-10-31-101Uploaded byAnonymous vQrJlEN
- pure_ch21Uploaded bydocsdownforfree
- DOC-20190502-WA0007Uploaded bylovely eswar
- MIT6_006F11_lec13Uploaded bymorgan
- GraphTheory.pdfUploaded byAnubhav Chaturvedi
- Networks Theory.pdfUploaded bySandro Rolak
- vertexformofaquadratic-sethnUploaded byapi-357616428
- On the Injective Domination of GraphsUploaded byRaja Sekar G
- Teoría de Grafos ch14Uploaded byoitc85
- Mapping network to smaller networks to get vulnerability valueUploaded byRishu Kumar
- 1802.07298Uploaded byMayurkumar patil
- The Fluid Mechanics of Liquid DemocracyUploaded byTiago Torres
- Session 5&6Uploaded byJitendra Singh Rauthan
- 2-sat e-maxx ru (english translated)Uploaded byLeandro Vianna
- Lecture9.pdfUploaded byManoj Nanduri
- Cause and Effect GraphingUploaded bymurtajiz110
- TSPUploaded byMizanur Rahman
- Graph Analytics PDFUploaded byrkarthik403
- XOR Realization Using KH-MapUploaded byAli Ahmad
- losscodeUploaded bypostscript
- TopologyUploaded byKaitlyn Wuetrich
- Module 4Uploaded byFaiz Kothari
- A Spectral Method for Image Co-segmentationUploaded byTiantang Chen
- network analysis (1).pdfUploaded byAnnisa Salsabilla
- fogaras05ppr_ext.pdfUploaded byShruti Bansal
- 02 Lecture 5-7 Intro to shape functions-Beams.pdfUploaded byJohn

- Lecture_5Uploaded byVirgiawan Huda Akbar
- IDBMS UNIT IIIUploaded byshyamd4
- nnml.pptUploaded byshyamd4
- ML_A1.pdfUploaded byshyamd4
- L1Uploaded byshyamd4
- Quetsion BookUploaded byshyamd4
- Types of Data in ClusteringUploaded byshyamd4
- ClusteringUploaded byshyamd4
- 16368_15840-UNIT IVUploaded bySidharth Sundaresan
- BBN SolutionUploaded byshyamd4
- 07 Game PlayingUploaded byshyamd4
- MLR talk.pptUploaded byshyamd4
- Compiler Lab ManualUploaded byshyamd4
- PgNet2006Uploaded byshyamd4
- CSE309-2Uploaded byshyamd4

- The Effects of Flipped Class on LearningUploaded bydarosa_f
- CS Practice StructUploaded bynita23arora2321
- 0e9ebeb6-d8c2-4b89-8a18-57ebc0a899ac-150714213446-lva1-app6892Uploaded byMrserma
- Programming Language Explorations Ray Toal,Uploaded byAlex Skolnick
- The Astronomy of Indigenous AustraliansUploaded byPurdy Matthews
- Graco PumpUploaded byjltochimaniv
- bryophyteUploaded bySuci Hidayati Dwi Lestari
- switchUploaded bypote
- DLP 7E'sUploaded byFaye Kathreen Telen-Nomananap
- Limestone CalcinationUploaded byfaizah_ismail0308
- 02 Shell Roof-ModelUploaded byShah Prachi
- ODUploaded byLeslie Valena-Denosta
- Manitou ME Pop (EN)Uploaded byManitou
- Hallt EmbeddedUploaded byVinayak Kumar
- Refractory solutions ICR December 2007[1].pdfUploaded byFrancisco Uribe Parra
- Preanalytical Errors in Medical Laboratories a Review of the Avaliable Methods of Data ColectionUploaded byHéctor Northman
- Social finalUploaded byshuga seiji
- axial fanUploaded bySudheer Nair
- Alan Evison, A. P. Cowie - Oxford Learner’s Pocket Dictionary (1983, Oxford University Press).pdfUploaded byAugusto Gaboto
- Final Form 4 2011 ( Soalan Dan Skema), Peperiksaan Akhir Tahun Tingkatan 4 2011Uploaded byRohaya Morat
- BASSnet_OnBoard_Manual_v4_final.doc_merged.pdfUploaded byEugen Adi Pitigoi
- Recycle of ThermosetsUploaded byPath
- Post Processor ReferenceUploaded bynnn765
- Top 5 Theories of Social Change – ExplainedUploaded byvinod
- Get_Published_Your_How_To_Guide_e-book.pdfUploaded byFrancisco Calderon
- 4900 Load CellsUploaded byRahmat Dwi
- UntitledUploaded byciyiri
- EC2202Uploaded byParthipan Parthi
- hsp_sc_y4Uploaded byNguMeeKok
- BBC-HD Code of Ethics for Business DocumentUploaded bycorky01

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.