Networks · GCSE · OCR J277 1.3.1, Edexcel 1CP2 4.1.8 · about 20 min
Star, bus, ring and mesh, and routing around a failure in a mesh of robots.
[1 mark]In a star topology, what happens if the central switch fails?
[1 mark]Why is a mesh network very reliable?
[1 mark]How many connections does a full mesh of 5 devices need?
[1 mark]In a bus topology, what happens if the backbone cable breaks?
[1 mark]In a ring topology, how does data travel?
[1 mark]What does this program print?
links = {"A": ["B"], "B": ["A", "C"], "C": ["B"]}
seen = ["A"]
for robot in seen:
for n in links[robot]:
if n not in seen:
seen.append(n)
print(seen)Write route(links, start, end) that returns the shortest route as a list of robots, using a breadth-first search. Print route: A-B-D-F style for the route from A to F, joining the names with -, and send the same text by radio. Then the link between D and F fails: remove it from both robots' lists, find the route again, and print after D-F fails: <route>.
# the two lines every program starts with: the commands, then the robot
from bugbot import *
connect()
links = {"A": ["B", "C"], "B": ["A", "D"], "C": ["A", "D", "E"], "D": ["B", "C", "F"], "E": ["C", "F"], "F": ["D", "E"]}Plan your program here, then type it in and press Run.