Is it possible to start a Dijkstra search from a source node s, bounded at r, with known shortest distances from s smaller than r?

I am implementing a complex shortest path algorithm for large graphs in C++.

This algorithm basically constructs a hierarchy of shortcut graphs by utilizing nice properties.

The first step in the algorithm to construct a shortcut graph G[i] is to determine its vertex set C[i]. I have no problem with this. The second step involves adding edges to the shortcut graph by following certain rules:

there is an edge between a pair of nodes u,v of C[i] iff the shortest path from u to v in the original graph G does not contain another node of C[i] and if its length is no more than r.

At each level i of the hierarchy, the bound r is equal to 8^i. To compute the shortest paths between all node pairs u,v in C[i], I simply use Dijkstra bounded at r, which works successfully. Ideally, I guess that it would be nice to save the results from a level i’s Dijkstra search in order to start the search at the next level with existing information.

Due to the fact that the graphs are huge and that the distances map computed by this Dijkstra contains a bit more information than just {reached_node: distance} for other requirements of my algorithm, I assumed that it would be pointless to try and keep the returned value of Dijkstra and pass it to the next level.

But after thinking about it again and calculating that my distances map contains:

  • 32-bit int for keys (reached nodes)
  • 64-bit double for the distances, which I realise now that I could probably reduce to floats
  • 64-bit double for another distance measure useful for my algorithm
  • 32-bit parent to be able to find the path between the source and this node using the map
    I realise that for graphs of e.g. 10M nodes, this is 228MB, which is considerable but definitely manageable, given that we don’t need to store them after the next shortcut graph is complete. So I want to try and see if it works.

So my question is: are there any considerations to take into account if I initialize Dijkstra’s algorithm with a distances map such as {source:0, other_nodes:infinity|existing_distance} and a priority queue that contains all the existing reached nodes and distances ?

In my understanding, the search wouldn’t push any element to the queue until it reaches the end of the search space of the previous search, but then it would simply “resume” normally.

I am just not sure if this is correct, or if it breaks the correctness of Dijkstra’s algorithm.

I have tried on small hand-made input graphs that I could manually run the algorithm on, but I am not confident enough to affirm that it works on all graphs (by all graphs, I mean those that a regular Dijkstra could work on, of course).

New contributor

maitrehihois is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật