Question
Need help, thanks!

In a graph with v vertices and e edges, which of the following maximum sizes is not correct for the shortest path computation
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Let's analyze the options one by one:

1.) v for the number of adjaceny list:

  • Adjacency lists will be formed for each vertices only. So maximum number of adjacency list that will exit is equal to number of vertices in the graph

2.) e as total size of all adjaceny list.

  • There can be only a maximum of e number of connection for any adjacency list.
  • So, e can be used be used as maximum size for all adjacency list.

3.) e as size of dictionary

  • In the dictionary representation of graph, the size of the dictionary must be ATLEAST e.
  • e cannot be set as maximum size of dictionary, it will lead to memory errors.
  • This option is our answer

ANswer: option 3

Add a comment
Know the answer?
Add Answer to:
Need help, thanks! In a graph with v vertices and e edges, which of the following...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT