1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
mojhsa [17]
3 years ago
7

Assume that

Computers and Technology
1 answer:
gulaghasi [49]3 years ago
6 0

Answer:

Explanation:

Create a min-heap of size v (the number of vertices), each of which contains the vertex number and the distance from the root vertex (which is the source vertex).

So, the distance on the root vertex would be 0. And let the distances on all other nodes be infinite(since they will be updated later).

Until the min-heap gets empty, do the following

(i) Extract that vertex from the min-heap, which has the minimum distance value, using Extract-Min operation, which takes O(logV). Lets name it u

(ii) Now, for every adjacent vertex of u, say v, check if v is in min-heap or not. If yes, and if the distance value of u plus the edge weight u-v is less than the distance value of v, then update the distance value of v.

Running time of O(ElogV) is obtained, as the Extract-Min operation which takes O(logV), is performed at most E times, i.e. the number of edges times.

You might be interested in
A ________ attack uses software to try thousands of common words sequentially in an attempt to gain unauthorized access to a use
Andrej [43]
Malware
Hope this helps
3 0
3 years ago
How the (i)?? Help me to slove this
cupoosta [38]

Answer:

#include <fstream>

 ifstream inFile("bookBorrower.txt");

 ofstream outFiles ("overPayment.txt");

Explanation:

fstream has ifstream and ofstream for input and output, respectively.

4 0
2 years ago
How to write my name in binary code ? Rivas
wel

Your name in binary would be "01010010 01101001 01110110 01100001 01110011"

3 0
3 years ago
Read 2 more answers
How do I insert a row above the selected row in between row and row 2 revenue xls
Scorpion4ik [409]
I believe you go to the the tools selection or just click control alt space 
5 0
3 years ago
Why save html documents as lowercase.?
astraxan [27]
Nowadays, it's really just convention to use lowercase file names.
3 0
4 years ago
Other questions:
  • g Write a program that prompts the user to enter two integers. The program outputs how many numbers are multiples of 3 and how m
    11·1 answer
  • Which of the following is not a reason that the subject line should never be left blank?
    13·2 answers
  • How to revive a computer if it functions in an unexpected manner?
    9·1 answer
  • The main benefit of shielded twisted pair cabling over unshielded twisted pair is that STP is much more durable.
    13·1 answer
  • Empty parentheses following a function name in a function definition indicate that the function does not require any parameters
    7·1 answer
  • g Given the information below, answer each part of the question: Page Size: 4 KB a. How many bits are in the Page Offset
    11·1 answer
  • 4. What are the things that a computer literate understands?name them
    5·2 answers
  • It is impossible to overemphasize the fact that, from the perspective of a computer, a network is a) simply another I/O device.
    9·1 answer
  • What is the advantage of learning through story compared to learning through personal experience?
    7·2 answers
  • Which of the following statements is true for plotly?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!