454 views
0 0 votes
Suppose that instead of a linked list, each array entry $adj[u]$ is a hash table containing the vertices $v$ for which $(u,v) \in E$. If all edge lookups are equally likely, what is the expected time to determine whether an edge is in the graph? What disadvantages does this scheme have ? Suggest an alternate data structure for each edge list that solves these problems. Does your alternative have disadvantages compared to the hash table ?

Please log in or register to answer this question.

Position:
Show:

Related questions

0 0 votes
0 0 answers
443
443 views
akash.dinkar12 asked Apr 7, 2019
443 views
Most graph algorithms that take an adjacency-matrix representation as input require time $\Omega(V^2)$,but there are some exceptions. Show how to determine whether a dire...
0 0 votes
0 0 answers
435
435 views
akash.dinkar12 asked Apr 7, 2019
435 views
The square of a directed graph $G=(V,E)$ is the graph $G^2=(V,E^2)$ such that $(u,v) \in E^2$ if and only $G$ contains a path with at most two edges between $u$ and $v$ ....
0 0 votes
1 1 answer
1.5k
1.5k views
akash.dinkar12 asked Apr 7, 2019
1,486 views
Given an adjacency-list representation of a multi graph $G=(V,E)$, describe an $O(V+E)$ time algorithm to compute the adjacency-list representation of the “equivalent” un...
1 1 vote
1 1 answer
5.3k
5.3k views
akash.dinkar12 asked Apr 7, 2019
5,326 views
The transpose of a directed graph $G=(V,E)$ is the graph $G^T=(V,E^T)$, where $E^T=\{(v,u) \in V * V :(u,v) \in E \ \}$ .Thus ,$G^T$ is $G$ with all its edges reversed . ...