You can try to write it in python for me, but I also accept somthing like a code plan without actual code
There are two dictionaries in first are names of points assigned to cost of each, in second are points which are directly connected in format like this:
Dictionary={"a":"b c","b":"a d","t":"a b"}
So every point is a key in dictionary and have connected points in it separated by Space. The goal is to get the cheepest way to get controll on whole network and the directly connected points to the one that your program is "Buying" are free, so I want to get all names of points that program buy and the cost of all points .
![[Image: 97kkD.png]](https://i.stack.imgur.com/97kkD.png)
This is the cheapest way to do this example(Red circles means purchased points, the dots, are from one that are connected.
My English is not perfect so there can be some errors. This is my first post here, so description of my problem can be wonky.
There are two dictionaries in first are names of points assigned to cost of each, in second are points which are directly connected in format like this:
Dictionary={"a":"b c","b":"a d","t":"a b"}
So every point is a key in dictionary and have connected points in it separated by Space. The goal is to get the cheepest way to get controll on whole network and the directly connected points to the one that your program is "Buying" are free, so I want to get all names of points that program buy and the cost of all points .
![[Image: 97kkD.png]](https://i.stack.imgur.com/97kkD.png)
This is the cheapest way to do this example(Red circles means purchased points, the dots, are from one that are connected.
My English is not perfect so there can be some errors. This is my first post here, so description of my problem can be wonky.