wmi-parprog/06_prolog/ex2-roads/desc
2024-04-22 14:38:06 +02:00

8 lines
695 B
Plaintext

Parse the file Zarzadzenie_GD_nr_32_z_dnia_2022-12-27.pdf by extracting the connections between the cities (e.g. copy&paste from pdf, pinch of regex, mix for a few minutes). Create facts for Prolog and do the exercises:
1. Find any path from Suwałki to Jelenia Góra
2. Find all paths between Szczecin and Przemyśl and find the shortest one
Tips: If someone is having problems with cleaning the data one can use the file roads.txt. The file still need to be converted into a Prolog file, but at least now it is straightforward. Every road consists of cities separated by '-'. If the road is long then it might take multiple lines, but any next road is separated at least by one empty line.