wmi-parprog/06_prolog/ex2-roads/desc

8 lines
695 B
Plaintext
Raw Permalink Normal View History

2024-04-22 13:40:57 +02:00
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
2024-04-22 14:27:34 +02:00
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.