warthy / gtfs-canberra

ISEP School Project | Work on Canberra's buses GTFS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ISEP - Course II.2415 ##TP6

A. The Depth Search First algorithm (DFS)

  • 1 cf. code
  • 2 cf. code
  • 3

The order of the nodes encountered is the following: 5, 4, 2, 1, 0, 3, 7, 6 This graph has only one connected components as all nodes are linked between another, therefore the graph is connected.

B. Breadth Search First algorithm (BFS)

  • 1 cf. code
  • 2

The order of the nodes encountered is the following: 5, 4, 6, 7, 2, 1, 3, 0 This graph has only one connected components as all nodes are linked between another, therefore the graph is connected.

C. Breadth Search First (BFS) for shortest paths in unweighted (di)graphs

  • 1 cf. code
  • 2 cf. code
  • 3 cf. code
  • 4 cf. code
  • 5 cf. code
  • 6 Eccentricity of each node:
    • 0: 5
    • 1: Infinite
    • 2: Infinite
    • 3: Infinite
    • 4: Infinite
    • 5: Infinite
    • 6: Infinite
    • 7: Infinite

As only node 0 is not reachable by any other nodes, it implies that all other node will have an infinite eccentricity. The diameter of the graph is 5 and is given by the shortest path from 0-6. The radius is 6.

About

ISEP School Project | Work on Canberra's buses GTFS


Languages

Language:Java 100.0%