Week 2

Sample Solution Weekly Assignment - Week 2

Question 1:

network topology

For calculating the shortest path to all nodes within a network topology such as the one above, which algorithm would you use?

Correct Answer:

  • Dijkstra's algorithm

Wrong Answers:

  • Lamport's bakery algorithm
  • Travelling Salesman algorithm

Explanation:

While the traveling salesman problem tries to find the shortest possible route that visits each node in a graph exactly once and returns to the original node, and Lamport's bakery algorithm is intended to improve the safety in the usage of shared resources among multiple threads, Dijkstra's algorithm finds the path with lowest cost between one node and every other node in a graph and, therefore, is used to calculate the routes in networks.

Question 2:

When applying the algorithm you chose in question 1 to the referenced topology, how long is the shortest path from node A to node B?

Correct Answer:

  • 9

Explanation:

The shortest path is A-D-B and has a length of 9.

Question 3:

When applying the algorithm you chose in question 1 to the referenced topology, how long is the shortest path from node A to node C?

Correct Answer:

  • 5

Explanation:

The shortest path is A-D-E-C and has a length of 5.

Question 4:

When applying the algorithm you chose in question 1 to the referenced topology, how long is the shortest path from node A to node D?

Correct Answer:

  • 3

Explanation:

The shortest path is A-D and has a length of 3.

Question 5:

When applying the algorithm you chose in question 1 to the referenced topology, how long is the shortest path from node A to node E?

Correct Answer:

  • 4

Explanation:

The shortest path is A-D-E and has a length of 4.

Question 6:

Two computers A and B are transmitting within an Ethernet network at the same time onto a shared medium. Computer A detects the collision. What happens now?

Correct Answers:

  • Computer A sends the jam signal.
  • Computer A aborts its transmission.
  • Computer B aborts its transmission.

Wrong Answers:

  • Computer A finishes its transmission, and next transmits the jam signal.
  • Since Computer A sent the jam signal, it is guaranteed to be the first to start another transmission attempt.

Explanation:

In an Ethernet network transmissions are stopped when a collision is detected.
The computer that detects the collision sends a jam signal.

Question 7:

Which of the following statements are true for Ethernet-based LANs?

Correct Answers:

  • In a hubbed network, every computer receives every transmitted packet.
  • With switched networks, collisions are less likely to happen than with hubbed networks.

Wrong Answers:

  • In a switched network, every computer receives every transmitted packet.
  • With hubbed networks, collisions are less likely to happen than with switched networks.

Explanation:

Hubs do not care for the section of a network in which sender and receiver are located.
Switches do not transmit data to other sections of a network if both, sender and receiver, are located within the same section of the network. While hubs forward the data to all their ports, switches are more restrictive and forward the data to affected ports only.

Question 8:

WANs use hierarchical addresses that consist of a prefix and a suffix. What does that suffix stand for?

Correct Answer:

  • The local address of the recipient.

Wrong Answers:

  • The type of the given WAN address.
  • The address of the next hop.
  • The address of the destination network.
  • The global address of the recipient.

Explanation:

The prefix of an address stands for the type, and the global address of a network, while the suffix of the address stands for the local address of the recipient within that network.

Zur Übersicht