laymanfai5409 laymanfai5409
  • 23-08-2019
  • Computers and Technology
contestada

)In a graph represented by adjacency matrix u can find all the neighbours of a given vertices in ____Operations

A. O(1)

B.O(n)

C.O(logn)

D.O(n2)

Respuesta :

ExieFansler ExieFansler
  • 26-08-2019

Answer:

B.O(n).

Explanation:

If the graph is represented by adjacency matrix then we can find all the neighbors of a given vertex in O(n) time because each row in adjacency matrix consists the track of the neighbors.If the other vertex is a neighbor then it contains 1 in adjacency matrix if not it contains 0.So we have to iterate over that row of the vertex to find the neighbors.

Answer Link

Otras preguntas

what is 2 to the power of 100 and what is the last digit of the answer and why
The circle below is centered at the point (4,-3) and has a radius of length 3 what is it’s equation?
Which number is missing from the list of factors for 48? 1, 2, 4, 6, 8, 12, 16, 24, 48?
The person riding the horse and winning the race was actually carters father. Which word is the linking verb?
The system of nerves linking the spinal cord with the body and sense organs?
The local classic car auction car auction raised 12,000 for local charities, the mayor is designating the funds to the children’s hospital. Which sentence error
The majority of the body's fluid is found within the
Someone help me with 3-6
Fixed cost per unit is $10 when 12,000 units are produced and $3 when 40,000 units are produced. What is the total fixed cost when nothing is produced?
From the station, a train traveled due east while another train traveled due north. they traveled the same distance before they reached their next stations. whe