Mikkel Thorup found the first deterministic algorithm to solve the classic single-source shortest paths problem for undirected graphs with positive integer weights in linear time and space. The algorithm requires a hierarchical bucketing structure for identifying the order the vertices have to be visited in without breaking this time bound, thus avoiding the sorting bottleneck of the algorithm proposed by Dijkstra in 1959.
TensorFlow Tutorial | Deep Learning With TensorFlow | TensorFlow Tutorial For...Simplilearn
This presentation on TensorFlow will help you understand what is Deep Learning and it's libraries, why use TensorFlow, what is TensorFlow, how to build a computational graph, programming using elements in TensorFlow, what are Recurrent Neural Networks along with a use case implementation on TensorFlow. TensorFlow is a software library developed by Google for the purposes of conducting machine learning and deep neural network research. In this video, you will learn the fundamentals of TensorFlow concepts, functions and operations required to implement deep learning algorithms and leverage data like never before. Now let's get started in mastering the concept of Deep Learning using TensorFlow.
Below topics are explained in this TensorFlow presentation:
1. What is Deep Learning?
2. Top Deep Learning libraries?
3. Why use TensorFlow?
4. What is TensorFlow?
5. Building a computational graph
6. Programming elements in TensorFlow
7. Introducing Recurrent Neural Networks
8. Use case implementation of RNN using TensorFlow
Why Deep Learning?
It is one of the most popular software platforms used for deep learning and contains powerful tools to help you build and implement artificial neural networks. Advancements in deep learning are being seen in smartphone applications, creating efficiencies in the power grid, driving advancements in healthcare, improving agricultural yields, and helping us find solutions to climate change.
You can gain in-depth knowledge of Deep Learning by taking our Deep Learning certification training course. With Simplilearn’s Deep Learning course, you will prepare for a career as a Deep Learning engineer as you master concepts and techniques including supervised and unsupervised learning, mathematical and heuristic aspects, and hands-on modeling to develop algorithms. Those who complete the course will be able to:
1. Understand the concepts of TensorFlow, its main functions, operations and the execution pipeline
2. Implement deep learning algorithms, understand neural networks and traverse the layers of data abstraction which will empower you to understand data like never before
3. Master and comprehend advanced topics such as convolutional neural networks, recurrent neural networks, training deep networks and high-level interfaces
4. Build deep learning models in TensorFlow and interpret the results
5. Understand the language and fundamental concepts of artificial neural networks
6. Troubleshoot and improve deep learning models
7. Build your own deep learning project
8. Differentiate between machine learning, deep learning and artificial intelligence
Learn more at: https://www.simplilearn.com
What is TensorFlow? | Introduction to TensorFlow | TensorFlow Tutorial For Be...Simplilearn
This presentation on TensorFlow will help you in understanding what exactly is TensorFlow and how it is used in Deep Learning. TensorFlow is a software library developed by Google for the purposes of conducting machine learning and deep neural network research. In this tutorial, you will learn the fundamentals of TensorFlow concepts, functions, and operations required to implement deep learning algorithms and leverage data like never before. This TensorFlow tutorial is ideal for beginners who want to pursue a career in Deep Learning. Now, let us deep dive into this TensorFlow tutorial and understand what TensorFlow actually is and how to use it.
Below topics are explained in this TensorFlow presentation:
1. What is Deep Learning?
2. Top Deep Learning Libraries
3. Why TensorFlow?
4. What is TensorFlow?
5. What are Tensors?
6. What is a Data Flow Graph?
7. Program Elements in TensorFlow
8. Use case implementation using TensorFlow
Simplilearn’s Deep Learning course will transform you into an expert in deep learning techniques using TensorFlow, the open-source software library designed to conduct machine learning & deep neural network research. With our deep learning course, you’ll master deep learning and TensorFlow concepts, learn to implement algorithms, build artificial neural networks and traverse layers of data abstraction to understand the power of data and prepare you for your new role as deep learning scientist.
Why Deep Learning?
It is one of the most popular software platforms used for deep learning and contains powerful tools to help you build and implement artificial neural networks.
You can gain in-depth knowledge of Deep Learning by taking our Deep Learning certification training course. With Simplilearn’s Deep Learning course, you will prepare for a career as a Deep Learning engineer as you master concepts and techniques including supervised and unsupervised learning, mathematical and heuristic aspects, and hands-on modeling to develop algorithms. Those who complete the course will be able to:
1. Understand the concepts of TensorFlow, its main functions, operations and the execution pipeline
2. Implement deep learning algorithms, understand neural networks and traverse the layers of data abstraction which will empower you to understand data like never before
3. Master and comprehend advanced topics such as convolutional neural networks, recurrent neural networks, training deep networks and high-level interfaces
4. Build deep learning models in TensorFlow and interpret the results
5. Understand the language and fundamental concepts of artificial neural networks
6. Troubleshoot and improve deep learning models
7. Build your own deep learning project
8. Differentiate between machine learning, deep learning and artificial intelligence
Learn more at: https://www.simplilearn.com
Approximate Vector Search at Scale, With Application to Image Search - SciPY ...Wakana Nogami
Mercari provides an image search feature, which makes it possible for users to find similar items by image. This talk describes how we implemented similar image search over 100s of millions of images, in a way that is accurate. We will also highlight the techniques we used to keep the system efficient and update to date.
TensorFlow에 대한 분석 내용
- TensorFlow?
- 배경
- DistBelief
- Tutorial - Logistic regression
- TensorFlow - 내부적으로는
- Tutorial - CNN, RNN
- Benchmarks
- 다른 오픈 소스들
- TensorFlow를 고려한다면
- 설치
- 참고 자료
TensorFlow Tutorial | Deep Learning With TensorFlow | TensorFlow Tutorial For...Simplilearn
This presentation on TensorFlow will help you understand what is Deep Learning and it's libraries, why use TensorFlow, what is TensorFlow, how to build a computational graph, programming using elements in TensorFlow, what are Recurrent Neural Networks along with a use case implementation on TensorFlow. TensorFlow is a software library developed by Google for the purposes of conducting machine learning and deep neural network research. In this video, you will learn the fundamentals of TensorFlow concepts, functions and operations required to implement deep learning algorithms and leverage data like never before. Now let's get started in mastering the concept of Deep Learning using TensorFlow.
Below topics are explained in this TensorFlow presentation:
1. What is Deep Learning?
2. Top Deep Learning libraries?
3. Why use TensorFlow?
4. What is TensorFlow?
5. Building a computational graph
6. Programming elements in TensorFlow
7. Introducing Recurrent Neural Networks
8. Use case implementation of RNN using TensorFlow
Why Deep Learning?
It is one of the most popular software platforms used for deep learning and contains powerful tools to help you build and implement artificial neural networks. Advancements in deep learning are being seen in smartphone applications, creating efficiencies in the power grid, driving advancements in healthcare, improving agricultural yields, and helping us find solutions to climate change.
You can gain in-depth knowledge of Deep Learning by taking our Deep Learning certification training course. With Simplilearn’s Deep Learning course, you will prepare for a career as a Deep Learning engineer as you master concepts and techniques including supervised and unsupervised learning, mathematical and heuristic aspects, and hands-on modeling to develop algorithms. Those who complete the course will be able to:
1. Understand the concepts of TensorFlow, its main functions, operations and the execution pipeline
2. Implement deep learning algorithms, understand neural networks and traverse the layers of data abstraction which will empower you to understand data like never before
3. Master and comprehend advanced topics such as convolutional neural networks, recurrent neural networks, training deep networks and high-level interfaces
4. Build deep learning models in TensorFlow and interpret the results
5. Understand the language and fundamental concepts of artificial neural networks
6. Troubleshoot and improve deep learning models
7. Build your own deep learning project
8. Differentiate between machine learning, deep learning and artificial intelligence
Learn more at: https://www.simplilearn.com
What is TensorFlow? | Introduction to TensorFlow | TensorFlow Tutorial For Be...Simplilearn
This presentation on TensorFlow will help you in understanding what exactly is TensorFlow and how it is used in Deep Learning. TensorFlow is a software library developed by Google for the purposes of conducting machine learning and deep neural network research. In this tutorial, you will learn the fundamentals of TensorFlow concepts, functions, and operations required to implement deep learning algorithms and leverage data like never before. This TensorFlow tutorial is ideal for beginners who want to pursue a career in Deep Learning. Now, let us deep dive into this TensorFlow tutorial and understand what TensorFlow actually is and how to use it.
Below topics are explained in this TensorFlow presentation:
1. What is Deep Learning?
2. Top Deep Learning Libraries
3. Why TensorFlow?
4. What is TensorFlow?
5. What are Tensors?
6. What is a Data Flow Graph?
7. Program Elements in TensorFlow
8. Use case implementation using TensorFlow
Simplilearn’s Deep Learning course will transform you into an expert in deep learning techniques using TensorFlow, the open-source software library designed to conduct machine learning & deep neural network research. With our deep learning course, you’ll master deep learning and TensorFlow concepts, learn to implement algorithms, build artificial neural networks and traverse layers of data abstraction to understand the power of data and prepare you for your new role as deep learning scientist.
Why Deep Learning?
It is one of the most popular software platforms used for deep learning and contains powerful tools to help you build and implement artificial neural networks.
You can gain in-depth knowledge of Deep Learning by taking our Deep Learning certification training course. With Simplilearn’s Deep Learning course, you will prepare for a career as a Deep Learning engineer as you master concepts and techniques including supervised and unsupervised learning, mathematical and heuristic aspects, and hands-on modeling to develop algorithms. Those who complete the course will be able to:
1. Understand the concepts of TensorFlow, its main functions, operations and the execution pipeline
2. Implement deep learning algorithms, understand neural networks and traverse the layers of data abstraction which will empower you to understand data like never before
3. Master and comprehend advanced topics such as convolutional neural networks, recurrent neural networks, training deep networks and high-level interfaces
4. Build deep learning models in TensorFlow and interpret the results
5. Understand the language and fundamental concepts of artificial neural networks
6. Troubleshoot and improve deep learning models
7. Build your own deep learning project
8. Differentiate between machine learning, deep learning and artificial intelligence
Learn more at: https://www.simplilearn.com
Approximate Vector Search at Scale, With Application to Image Search - SciPY ...Wakana Nogami
Mercari provides an image search feature, which makes it possible for users to find similar items by image. This talk describes how we implemented similar image search over 100s of millions of images, in a way that is accurate. We will also highlight the techniques we used to keep the system efficient and update to date.
TensorFlow에 대한 분석 내용
- TensorFlow?
- 배경
- DistBelief
- Tutorial - Logistic regression
- TensorFlow - 내부적으로는
- Tutorial - CNN, RNN
- Benchmarks
- 다른 오픈 소스들
- TensorFlow를 고려한다면
- 설치
- 참고 자료
https://telecombcn-dl.github.io/2018-dlai/
Deep learning technologies are at the core of the current revolution in artificial intelligence for multimedia data analysis. The convergence of large-scale annotated datasets and affordable GPU hardware has allowed the training of neural networks for data analysis tasks which were previously addressed with hand-crafted features. Architectures such as convolutional neural networks, recurrent neural networks or Q-nets for reinforcement learning have shaped a brand new scenario in signal processing. This course will cover the basic principles of deep learning from both an algorithmic and computational perspectives.
이 발표는 [야생의 땅: 듀랑고]의 지형 배포 시스템과 생태계 시뮬레이션 자동화 시스템에 대한 이야기를 다룹니다. 듀랑고의 각 섬은 크기와 지형, 기후 조건이 다양하고 섬의 개수가 많아서 수동으로 관리하는 것은 사실상 불가능합니다. 몇번의 사내 테스트와 베타 테스트를 거치면서 이러한 문제를 해결해주는 자동화된 도구의 필요성이 절실해졌고, 작년에 NDC에서 발표했던 생태계 시뮬레이터와 Docker, 그리고 아마존 웹서비스(AWS)를 이용하여 수많은 섬들을 자동으로 생성하고 관리하는 자동화 시스템을 구축하게 되었습니다. 그 과정에서 했던 고민들, 기존의 애플리케이션을 "Dockerizing" 했던 경험, AWS의 각 서비스들을 적절히 활용했던 이야기, AWS의 각 지역별 요금이 상이하다는 점을 이용해서 비용을 절감한 사례, 그리고 자동화 시스템의 문제점과 앞으로의 방향에 대해서 이야기 할 계획입니다.
I will try to say – what is QA, how could we get the answer to questions on natural language and how successful have we been in that domain.
I have gained all of my knowledge from three proposed papers and what I read around them.
NDC 16에서 발표한 '스매싱더배틀 1년간의 개발일지'라는
제목의 포스트 모템입니다.
PT의 내용은 실제 발표 자료에 조금 더 설명을 붙였으며
PT의 내용에 대한 질문은 아래의 주소를 통해서
문의 부탁드립니다.
Twitter
https://twitter.com/Studio_HG
Facebook
https://www.facebook.com/GameStudioHG
In this presentation we discuss the convolution operation, the architecture of a convolution neural network, different layers such as pooling etc. This presentation draws heavily from A Karpathy's Stanford Course CS 231n
https://telecombcn-dl.github.io/2017-dlcv/
Deep learning technologies are at the core of the current revolution in artificial intelligence for multimedia data analysis. The convergence of large-scale annotated datasets and affordable GPU hardware has allowed the training of neural networks for data analysis tasks which were previously addressed with hand-crafted features. Architectures such as convolutional neural networks, recurrent neural networks and Q-nets for reinforcement learning have shaped a brand new scenario in signal processing. This course will cover the basic principles and applications of deep learning to computer vision problems, such as image classification, object detection or image captioning.
Screen Space Decals in Warhammer 40,000: Space MarinePope Kim
My Siggraph 2012 presentation slides on Screen Space Decals in Warhammer 40,000: Space Marine.
SSD is similar to Deferred Decals, so I focused more on the problems we had and how we solved(or avoided) them
NDC2012_마비노기 영웅전 카이 포스트모템_시선을 사로잡는 캐릭터 카이 그 시도와 성공의 구현 일지영준 박
온라인 게임에서 새로운 캐릭터를 만든다는 것은 어떠한 컨텐츠와 비교 안될 만큼 많은 코스트가 드는 작업 입니다.
당연, 이러한 비싼 코스트의 신캐릭터는 유저들의 시선을 사로잡을 수 있는 독특한 매력을 가져야만 성공할 수 있습니다.
시선을 사로잡는 외형뿐만 아니라 핵심 플레이의 재미, 그리고 그것을 뒷받침해주기 위한 기술적 시도가 조화 되어야만
이러한 매력적인 캐릭터들이 탄생하게 됩니다.
현 세션에선 영웅전의 주인공인 리시타, 피오나, 이비, 카록을 개발하면서 겪었던 여러 가지 기술적인 시행 착오에 대해 알아보고
그 노하우를 엮어서 어떻게 궁수 <카이>를 성공적으로 런칭 할 수 있었는지를 공유하고자 합니다.
대략 다음과 같은 항목들을 다룹니다.
- 영웅전 궁수 캐릭터 카이를 개발하면서 겪었던 좌충우돌 생생한 개발 스토리.
- 구세대 엔진을 이용해 신세대 엔진 따라잡기
- 카이는 궁수 캐릭터의 기술적 난제를 어떻게 해결했을까? – 블렌딩 애니메이션 구성
- 카이 캐릭터 제작에서의 기술적 특이한 시도 및 시행착오들
- 타격감 개선 및 궁수의 재미를 살리기 위한 노하우
- 실시간 체형 변화 시스템
- 실시간 시퀀스 키 프레임 디포메이션 기법.
[2019] 배틀로얄 전장(map) 제작으로 알아보는 슈팅 게임 레벨 디자인NHN FORWARD
※다운로드하시면 더 선명한 자료를 보실 수 있습니다.
배틀로얄 게임 전장(맵) 레벨 디자인의 경험과 노하우를 공유하려 합니다.
100인 이상의 PVP 사용자가 대전하는 오픈 필드 전장을 디자인할 때 레벨 기획자가 가져야 할 관점과 고려 사항을 다룹니다. 인도어 FPS와 오픈 필드 배틀로얄 게임의 레벨 관점 차이와 오픈 필드 전장을 효과적으로 제작하기 위한 작법을 사례와 함께 설명합니다.
목차
1. 범위 - 강연에서 다룰 레벨 디자인의 영역은?
2. 관점 - 일반 슈팅 맵과 배틀로얄 맵의 레벨 시각
3. 작법 - 어떤 방식으로 배틀로얄 맵을 만들 것인가?
4. 이슈 - 문제와 고민거리는 무엇인가?
대상
- FPS/TPS 레벨 디자인에 관심 있는 분
- 배틀로얄 게임 디자인에 관심 있는 분
■관련 동영상: https://youtu.be/ZWJKvCi3Njc
Incremental and Multi-feature Tensor Subspace Learning applied for Background...ActiveEon
ICIAR'14 - International Conference on Image Analysis and Recognition. Incremental and Multi-feature Tensor Subspace Learning applied for Background Modeling and Subtraction.
https://telecombcn-dl.github.io/2018-dlai/
Deep learning technologies are at the core of the current revolution in artificial intelligence for multimedia data analysis. The convergence of large-scale annotated datasets and affordable GPU hardware has allowed the training of neural networks for data analysis tasks which were previously addressed with hand-crafted features. Architectures such as convolutional neural networks, recurrent neural networks or Q-nets for reinforcement learning have shaped a brand new scenario in signal processing. This course will cover the basic principles of deep learning from both an algorithmic and computational perspectives.
이 발표는 [야생의 땅: 듀랑고]의 지형 배포 시스템과 생태계 시뮬레이션 자동화 시스템에 대한 이야기를 다룹니다. 듀랑고의 각 섬은 크기와 지형, 기후 조건이 다양하고 섬의 개수가 많아서 수동으로 관리하는 것은 사실상 불가능합니다. 몇번의 사내 테스트와 베타 테스트를 거치면서 이러한 문제를 해결해주는 자동화된 도구의 필요성이 절실해졌고, 작년에 NDC에서 발표했던 생태계 시뮬레이터와 Docker, 그리고 아마존 웹서비스(AWS)를 이용하여 수많은 섬들을 자동으로 생성하고 관리하는 자동화 시스템을 구축하게 되었습니다. 그 과정에서 했던 고민들, 기존의 애플리케이션을 "Dockerizing" 했던 경험, AWS의 각 서비스들을 적절히 활용했던 이야기, AWS의 각 지역별 요금이 상이하다는 점을 이용해서 비용을 절감한 사례, 그리고 자동화 시스템의 문제점과 앞으로의 방향에 대해서 이야기 할 계획입니다.
I will try to say – what is QA, how could we get the answer to questions on natural language and how successful have we been in that domain.
I have gained all of my knowledge from three proposed papers and what I read around them.
NDC 16에서 발표한 '스매싱더배틀 1년간의 개발일지'라는
제목의 포스트 모템입니다.
PT의 내용은 실제 발표 자료에 조금 더 설명을 붙였으며
PT의 내용에 대한 질문은 아래의 주소를 통해서
문의 부탁드립니다.
Twitter
https://twitter.com/Studio_HG
Facebook
https://www.facebook.com/GameStudioHG
In this presentation we discuss the convolution operation, the architecture of a convolution neural network, different layers such as pooling etc. This presentation draws heavily from A Karpathy's Stanford Course CS 231n
https://telecombcn-dl.github.io/2017-dlcv/
Deep learning technologies are at the core of the current revolution in artificial intelligence for multimedia data analysis. The convergence of large-scale annotated datasets and affordable GPU hardware has allowed the training of neural networks for data analysis tasks which were previously addressed with hand-crafted features. Architectures such as convolutional neural networks, recurrent neural networks and Q-nets for reinforcement learning have shaped a brand new scenario in signal processing. This course will cover the basic principles and applications of deep learning to computer vision problems, such as image classification, object detection or image captioning.
Screen Space Decals in Warhammer 40,000: Space MarinePope Kim
My Siggraph 2012 presentation slides on Screen Space Decals in Warhammer 40,000: Space Marine.
SSD is similar to Deferred Decals, so I focused more on the problems we had and how we solved(or avoided) them
NDC2012_마비노기 영웅전 카이 포스트모템_시선을 사로잡는 캐릭터 카이 그 시도와 성공의 구현 일지영준 박
온라인 게임에서 새로운 캐릭터를 만든다는 것은 어떠한 컨텐츠와 비교 안될 만큼 많은 코스트가 드는 작업 입니다.
당연, 이러한 비싼 코스트의 신캐릭터는 유저들의 시선을 사로잡을 수 있는 독특한 매력을 가져야만 성공할 수 있습니다.
시선을 사로잡는 외형뿐만 아니라 핵심 플레이의 재미, 그리고 그것을 뒷받침해주기 위한 기술적 시도가 조화 되어야만
이러한 매력적인 캐릭터들이 탄생하게 됩니다.
현 세션에선 영웅전의 주인공인 리시타, 피오나, 이비, 카록을 개발하면서 겪었던 여러 가지 기술적인 시행 착오에 대해 알아보고
그 노하우를 엮어서 어떻게 궁수 <카이>를 성공적으로 런칭 할 수 있었는지를 공유하고자 합니다.
대략 다음과 같은 항목들을 다룹니다.
- 영웅전 궁수 캐릭터 카이를 개발하면서 겪었던 좌충우돌 생생한 개발 스토리.
- 구세대 엔진을 이용해 신세대 엔진 따라잡기
- 카이는 궁수 캐릭터의 기술적 난제를 어떻게 해결했을까? – 블렌딩 애니메이션 구성
- 카이 캐릭터 제작에서의 기술적 특이한 시도 및 시행착오들
- 타격감 개선 및 궁수의 재미를 살리기 위한 노하우
- 실시간 체형 변화 시스템
- 실시간 시퀀스 키 프레임 디포메이션 기법.
[2019] 배틀로얄 전장(map) 제작으로 알아보는 슈팅 게임 레벨 디자인NHN FORWARD
※다운로드하시면 더 선명한 자료를 보실 수 있습니다.
배틀로얄 게임 전장(맵) 레벨 디자인의 경험과 노하우를 공유하려 합니다.
100인 이상의 PVP 사용자가 대전하는 오픈 필드 전장을 디자인할 때 레벨 기획자가 가져야 할 관점과 고려 사항을 다룹니다. 인도어 FPS와 오픈 필드 배틀로얄 게임의 레벨 관점 차이와 오픈 필드 전장을 효과적으로 제작하기 위한 작법을 사례와 함께 설명합니다.
목차
1. 범위 - 강연에서 다룰 레벨 디자인의 영역은?
2. 관점 - 일반 슈팅 맵과 배틀로얄 맵의 레벨 시각
3. 작법 - 어떤 방식으로 배틀로얄 맵을 만들 것인가?
4. 이슈 - 문제와 고민거리는 무엇인가?
대상
- FPS/TPS 레벨 디자인에 관심 있는 분
- 배틀로얄 게임 디자인에 관심 있는 분
■관련 동영상: https://youtu.be/ZWJKvCi3Njc
Incremental and Multi-feature Tensor Subspace Learning applied for Background...ActiveEon
ICIAR'14 - International Conference on Image Analysis and Recognition. Incremental and Multi-feature Tensor Subspace Learning applied for Background Modeling and Subtraction.
a graph search algorithm that solves the single-source shortest path problem for a graph with non-negative edge path costs, producing a shortest path tree. This algorithm is often used in routing and as a subroutine in other graph algorithms.
Sequential and parallel algorithm to find maximum flow on extended mixed netw...csandit
The problem of finding maximum flow in network
graph is extremely interesting and
practically applicable in many fields in our daily
life, especially in transportation. Therefore, a
lot of researchers have been studying this problem
in various methods. Especially in 2013, we
has developed a new algorithm namely, postflow-pull
algorithm to find the maximum flow on
traditional networks. In this paper, we revi
sed postflow-push methods to solve this
problem of finding maximum flow on extended mixed
network. In addition, to take more
advantage of multi-core architecture of t
he parallel computing system, we build this
parallel algorithm. This is a completely new method
not being announced in the world. The
results of this paper are basically systematized an
d proven. The idea of this algorithm is using
multi processors to work in parallel by postflow_p
ush algorithm. Among these processors,
there is one main processor managing data, sending
data to the sub processors, receiving data
from the sub-processors. The sub-processors simulta
neously execute their work and send their
data to the main processor until the job is finishe
d, the main processor will show the results of
the problem.
SEQUENTIAL AND PARALLEL ALGORITHM TO FIND MAXIMUM FLOW ON EXTENDED MIXED NETW...cscpconf
The problem of finding maximum flow in network graph is extremely interesting and
practically applicable in many fields in our daily life, especially in transportation. Therefore, a
lot of researchers have been studying this problem in various methods. Especially in 2013, we
has developed a new algorithm namely, postflow-pull algorithm to find the maximum flow on
traditional networks. In this paper, we revised postflow-push methods to solve this
problem of finding maximum flow on extended mixed network. In addition, to take more
advantage of multi-core architecture of the parallel computing system, we build this
parallel algorithm. This is a completely new method not being announced in the world. The
results of this paper are basically systematized and proven. The idea of this algorithm is using
multi processors to work in parallel by postflow_push algorithm. Among these processors,
there is one main processor managing data, sending data to the sub processors, receiving data
from the sub-processors. The sub-processors simultaneously execute their work and send their
data to the main processor until the job is finished, the main processor will show the results of
the problem.
Similar to Implementation of Thorup's Linear Time Algorithm for Undirected Single Source Shortest Paths With Positive Integer Weights (20)
Sixth chapter of the lecture Unreal Engine Basics taught at SAE Institute Hamburg.
- Understanding how to drive final character animation poses through animation blueprints and blend spaces
- Learning how to configure, combine and play sound assets
- Understanding the modular nature of particle effects in Unreal Engine
Unreal Engine Basics 05 - User InterfaceNick Pruehs
Fifth chapter of the lecture Unreal Engine Basics taught at SAE Institute Hamburg.
- Understanding the difference between Unreal’s UI frameworks Slate and UMG
- Learning how to create basic and complex user interfaces in UMG
- Learning how to build a simple main menu
Forth chapter of the lecture Unreal Engine Basics taught at SAE Institute Hamburg.
- Getting familiar with behavior trees in general
- Learning how to set up and use behavior trees in Unreal Engine
- Learning about the very basics of the Unreal Engine navigation system
Third chapter of the lecture Unreal Engine Basics taught at SAE Institute Hamburg.
- Learning how to expose class fields and functions to blueprints
- Writing basic Unreal gameplay code, such as spawning actors, accessing components and listening for events
- Getting familiar with gameplay concepts in the context of Unreal, such as damage and collision
Second chapter of the lecture Unreal Engine Basics taught at SAE Institute Hamburg.
- Getting familiar with the Unreal Level Editor
- Learning how to bind and handle player keyboard and mouse input
- Understanding character movement properties and functions
Unreal Engine Basics 01 - Game FrameworkNick Pruehs
First chapter of the lecture Unreal Engine Basics taught at SAE Institute Hamburg.
- Getting familiar with Unreal Engine as a technology, framework and toolset
- Learning the basics about writing Unreal Engine C++ code
Designing an actor model game architecture with PonyNick Pruehs
Introduction to Pony, actor model, reference capabilities and making concurrent DirectX games with Pony.
Presented at MVP Fusion #3.
http://mvpfusion.azurewebsites.net/
When developing games, each and every one of us should strive for perfection. At my desk, I have put up a sign saying “What would Blizzard do?” This talk is about motivation, excitement and learning how to dissect other games in order to learn from each other.
Chapter 11 of the lecture Game Programming taught at HAW Hamburg.
Introduction to kinematics and dynamics, numerical integration, rigid bodies, collision detection and resolving.
Chapter 9 of the lecture Game Programming taught at HAW Hamburg.
Introduction to AI in games, existing approaches to AI architecture, behaviour trees and AI authoring tools.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
I have heard many times that architecture is not important for the front-end. Also, many times I have seen how developers implement features on the front-end just following the standard rules for a framework and think that this is enough to successfully launch the project, and then the project fails. How to prevent this and what approach to choose? I have launched dozens of complex projects and during the talk we will analyze which approaches have worked for me and which have not.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Implementation of Thorup's Linear Time Algorithm for Undirected Single Source Shortest Paths With Positive Integer Weights
1. Implementation
of Thorup's
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Implementation of Thorup's Linear Time
Integer Weights
Nick Prühs
Algorithm for Undirected Single-Source
Shortest Paths with Positive Integer Weights
Introduction
Thorup's
algorithm
Overview
Nick Prühs
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Department of Computer Science, CAU Kiel
September 30, 2009
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
2. Implementation
of Thorup's
Linear Time
Algorithm for
Undirected
Introduction
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
3. Implementation
of Thorup's
Linear Time
Algorithm for
Undirected
Introduction
Single-Source
Shortest Paths
with Positive
Integer Weights
Thorup's algorithm
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
4. Implementation
of Thorup's
Linear Time
Algorithm for
Undirected
Introduction
Single-Source
Shortest Paths
with Positive
Integer Weights
Thorup's algorithm
Nick Prühs
Introduction
Implementation details
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
5. Implementation
of Thorup's
Linear Time
Algorithm for
Undirected
Introduction
Single-Source
Shortest Paths
with Positive
Integer Weights
Thorup's algorithm
Nick Prühs
Introduction
Implementation details
Thorup's
algorithm
Overview
Performance
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
6. Implementation
of Thorup's
Linear Time
Algorithm for
Undirected
Introduction
Single-Source
Shortest Paths
with Positive
Integer Weights
Thorup's algorithm
Nick Prühs
Introduction
Implementation details
Thorup's
algorithm
Overview
Performance
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Conclusion
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
7. Implementation
of Thorup's
Introduction
Linear Time
Algorithm for
Undirected
Single-Source
Thorup's algorithm
Overview
msb-Minimum spanning tree M
Component tree T
Bucketing structure B
Unvisited data structure U
Visiting components and vertices
Implementation details
Performance
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Conclusion
Performance
Conclusion
8. Introduction
Implementation
of Thorup's
Linear Time
The Single-Source Shortest Paths Problem
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
in:
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
9. Implementation
Introduction
of Thorup's
Linear Time
The Single-Source Shortest Paths Problem
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
in:
Introduction
undirected, connected graph
vertices and |E | = m edges
G = (V , E ) with |V | = n
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
10. Introduction
Implementation
of Thorup's
Linear Time
The Single-Source Shortest Paths Problem
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
in:
Introduction
undirected, connected graph G = (V , E ) with |V | = n
vertices and |E | = m edges
positive edge weight function w : V × V → N with
∀(u , v ) ∈ E : w (u , v ) = ∞
/
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
11. Implementation
Introduction
of Thorup's
Linear Time
The Single-Source Shortest Paths Problem
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
in:
Introduction
undirected, connected graph G = (V , E ) with |V | = n
vertices and |E | = m edges
positive edge weight function w : V × V → N with
∀(u , v ) ∈ E : w (u , v ) = ∞
/
distinguished source vertex
s∈V
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
12. Implementation
Introduction
of Thorup's
Linear Time
The Single-Source Shortest Paths Problem
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
in:
Introduction
undirected, connected graph G = (V , E ) with |V | = n
vertices and |E | = m edges
positive edge weight function w : V × V → N with
∀(u , v ) ∈ E : w (u , v ) = ∞
/
distinguished source vertex
s∈V
out: d (v ) = dist (v , s ) for all other vertices v ∈ V {s }
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
13. Introduction
Implementation
of Thorup's
Linear Time
Dijkstra's algorithm
Algorithm for
Undirected
proposed by Edsger W. Dijkstra [Dij59]
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
14. Implementation
Introduction
of Thorup's
Linear Time
Dijkstra's algorithm
Algorithm for
Undirected
proposed by Edsger W. Dijkstra [Dij59]
additional denitions:
set of visited vertices S ⊆ V
super distance D (v ) ≥ d (v ) for every vertex
with
D (v ) =
d (v ),
minu∈S {d (u ) + w (u , v )},
v ∈S
v ∈S
/
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
v ∈ V,
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
15. Implementation
Introduction
of Thorup's
Linear Time
Dijkstra's algorithm
Algorithm for
Undirected
proposed by Edsger W. Dijkstra [Dij59]
additional denitions:
set of visited vertices S ⊆ V
super distance D (v ) ≥ d (v ) for every vertex
with
D (v ) =
initialization:
d (v ),
minu∈S {d (u ) + w (u , v )},
S = {s }
D (s ) = d (s ) = 0
∀v = s : D (v ) = w (s , v )
v ∈S
v ∈S
/
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
v ∈ V,
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
16. Implementation
Introduction
of Thorup's
Linear Time
Dijkstra's algorithm
Algorithm for
Undirected
proposed by Edsger W. Dijkstra [Dij59]
additional denitions:
set of visited vertices S ⊆ V
super distance D (v ) ≥ d (v ) for every vertex
with
D (v ) =
d (v ),
minu∈S {d (u ) + w (u , v )},
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
v ∈ V,
v ∈S
v ∈S
/
initialization:
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
S = {s }
D (s ) = d (s ) = 0
∀v = s : D (v ) = w (s , v )
algorithm:
1. while S = V :
Introduction
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
visit the vertex v ∈ S minimizing D (v )
/
details
Performance
Conclusion
17. Implementation
Introduction
of Thorup's
Linear Time
Dijkstra's algorithm
Algorithm for
Undirected
proposed by Edsger W. Dijkstra [Dij59]
additional denitions:
set of visited vertices S ⊆ V
super distance D (v ) ≥ d (v ) for every vertex
with
D (v ) =
d (v ),
minu∈S {d (u ) + w (u , v )},
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
v ∈ V,
Introduction
v ∈S
v ∈S
/
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
initialization:
Component tree
T
S = {s }
D (s ) = d (s ) = 0
∀v = s : D (v ) = w (s , v )
algorithm:
1. while S = V :
1.1
move
1.2
for all
v
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
visit the vertex v ∈ S minimizing D (v )
/
to
S,
because
(u , v ) ∈ E ,
the latter is less
Performance
D (v )
decrease
= d (v )
D (u ) to D (v ) + w (u , v ),
details
Conclusion
if
18. Introduction
Implementation
of Thorup's
Linear Time
The problem: The bottleneck of Dijkstra's algorithm
Algorithm for
Undirected
running time results from two operations:
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
19. Implementation
Introduction
of Thorup's
Linear Time
The problem: The bottleneck of Dijkstra's algorithm
Algorithm for
Undirected
running time results from two operations:
deleteMin: nd a vertex v ∈ S minimizing
/
(exactly n − 1 times)
Single-Source
Shortest Paths
D (v )
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
20. Introduction
Implementation
of Thorup's
Linear Time
The problem: The bottleneck of Dijkstra's algorithm
Algorithm for
Undirected
running time results from two operations:
deleteMin: nd a vertex v ∈ S minimizing D (v )
/
(exactly n − 1 times)
decreaseKey: decrease D (u ) (at most m times)
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
21. Introduction
Implementation
of Thorup's
Linear Time
The problem: The bottleneck of Dijkstra's algorithm
Algorithm for
Undirected
running time results from two operations:
deleteMin: nd a vertex v ∈ S minimizing D (v )
/
(exactly n − 1 times)
decreaseKey: decrease D (u ) (at most m times)
naive implementation:
deleteMin in O (n)
decreaseKey in O (1)
total running time is O (n2 + m)
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
22. Introduction
Implementation
of Thorup's
Linear Time
The problem: The bottleneck of Dijkstra's algorithm
Algorithm for
Undirected
running time results from two operations:
deleteMin: nd a vertex v ∈ S minimizing D (v )
/
(exactly n − 1 times)
decreaseKey: decrease D (u ) (at most m times)
naive implementation:
deleteMin in O (n)
decreaseKey in O (1)
total running time is O (n2 + m)
implementation with Fibonacci heaps [FT84]:
deleteMin has amortized running time O (log n)
decreaseKey has running time O (1)
total running time is O (n log n + m)
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
23. Introduction
Implementation
of Thorup's
Linear Time
The problem: The bottleneck of Dijkstra's algorithm
Algorithm for
Undirected
running time results from two operations:
deleteMin: nd a vertex v ∈ S minimizing D (v )
/
(exactly n − 1 times)
decreaseKey: decrease D (u ) (at most m times)
naive implementation:
deleteMin in O (n)
decreaseKey in O (1)
total running time is O (n2 + m)
implementation with Fibonacci heaps [FT84]:
deleteMin has amortized running time O (log n)
decreaseKey has running time O (1)
total running time is O (n log n + m)
linear time Dijkstra requires linear time sorting
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
24. Introduction
Implementation
of Thorup's
Linear Time
The problem: The bottleneck of Dijkstra's algorithm
Algorithm for
Undirected
running time results from two operations:
deleteMin: nd a vertex v ∈ S minimizing D (v )
/
(exactly n − 1 times)
decreaseKey: decrease D (u ) (at most m times)
naive implementation:
deleteMin in O (n)
decreaseKey in O (1)
total running time is O (n2 + m)
implementation with Fibonacci heaps [FT84]:
deleteMin has amortized running time O (log n)
decreaseKey has running time O (1)
total running time is O (n log n + m)
linear time Dijkstra requires linear time sorting
sorting using comparisons only requires Ω(n log n)
comparisons
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
25. Introduction
Implementation
of Thorup's
Linear Time
The solution: Avoiding the sorting bottleneck
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
26. Introduction
Implementation
of Thorup's
Linear Time
The solution: Avoiding the sorting bottleneck
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Thorup [Tho99] does not visit the vertices in order of
increasing distance from s
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
27. Introduction
Implementation
of Thorup's
Linear Time
The solution: Avoiding the sorting bottleneck
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Thorup [Tho99] does not visit the vertices in order of
increasing distance from s
identies vertex pairs that can be visited in any order,
using a hierarchical bucketing structure
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
28. Introduction
Implementation
of Thorup's
Linear Time
The solution: Avoiding the sorting bottleneck
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Thorup [Tho99] does not visit the vertices in order of
increasing distance from s
Introduction
Thorup's
algorithm
identies vertex pairs that can be visited in any order,
using a hierarchical bucketing structure
Overview
requires several other data structures to be computed
before
Bucketing
structure B
msb-Minimum
spanning tree M
Component tree
T
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
29. Implementation
of Thorup's
Introduction
Linear Time
Algorithm for
Undirected
Single-Source
Thorup's algorithm
Overview
msb-Minimum spanning tree M
Component tree T
Bucketing structure B
Unvisited data structure U
Visiting components and vertices
Implementation details
Performance
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Conclusion
Performance
Conclusion
30. Thorup's algorithm
Implementation
of Thorup's
Linear Time
Overview
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Thorup's algorithm inherits. . .
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
31. Implementation
Thorup's algorithm
of Thorup's
Linear Time
Overview
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Thorup's algorithm inherits. . .
. . . the denition of G , V , E , n,
Integer Weights
m, w , d , s , S and D
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
32. Implementation
Thorup's algorithm
of Thorup's
Linear Time
Overview
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Thorup's algorithm inherits. . .
. . . the denition of G , V , E , n,
. . . the initialization of S and D
Integer Weights
m, w , d , s , S and D
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
33. Thorup's algorithm
Implementation
of Thorup's
Linear Time
Overview
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Thorup's algorithm inherits. . .
. . . the denition of G , V , E , n, m, w , d , s , S and D
. . . the initialization of S and D
. . . visiting a vertex v ∈ V , which might decrease D (u )
for some adjacent vertices u ∈ V and moves v to S
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
34. Thorup's algorithm
Implementation
of Thorup's
Linear Time
Overview
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Thorup's algorithm inherits. . .
. . . the denition of G , V , E , n, m, w , d , s , S and D
. . . the initialization of S and D
. . . visiting a vertex v ∈ V , which might decrease D (u )
for some adjacent vertices u ∈ V and moves v to S
but Thorup allows visiting a vertex v ∈ S not
/
minimizing D (v )
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
35. Thorup's algorithm
Implementation
of Thorup's
Linear Time
Overview
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Thorup's algorithm inherits. . .
. . . the denition of G , V , E , n, m, w , d , s , S and D
. . . the initialization of S and D
. . . visiting a vertex v ∈ V , which might decrease D (u )
for some adjacent vertices u ∈ V and moves v to S
but Thorup allows visiting a vertex v ∈ S not
/
minimizing D (v )
in order to identify the next vertex to be visited, the
vertices are placed in buckets
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
36. Thorup's algorithm
Implementation
of Thorup's
Linear Time
Overview
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Thorup's algorithm inherits. . .
. . . the denition of G , V , E , n, m, w , d , s , S and D
. . . the initialization of S and D
. . . visiting a vertex v ∈ V , which might decrease D (u )
for some adjacent vertices u ∈ V and moves v to S
but Thorup allows visiting a vertex v ∈ S not
/
minimizing D (v )
in order to identify the next vertex to be visited, the
vertices are placed in buckets
every bucket is associated with a component, a node of
the component tree explained later
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
37. Thorup's algorithm
Implementation
of Thorup's
Linear Time
The main routine
Algorithm for
Undirected
Single-Source
Shortest Paths
The whole algorithm can be summarized in top-level
pseudo-code as follows:
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
38. Thorup's algorithm
Implementation
of Thorup's
Linear Time
The main routine
Algorithm for
Undirected
Single-Source
Shortest Paths
The whole algorithm can be summarized in top-level
pseudo-code as follows:
1. Construct an msb-minimum spanning tree M in O (m).
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
39. Thorup's algorithm
Implementation
of Thorup's
Linear Time
The main routine
Algorithm for
Undirected
Single-Source
Shortest Paths
The whole algorithm can be summarized in top-level
pseudo-code as follows:
1. Construct an msb-minimum spanning tree M in O (m).
2. Construct the component tree T in O (m).
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
40. Thorup's algorithm
Implementation
of Thorup's
Linear Time
The main routine
Algorithm for
Undirected
Single-Source
Shortest Paths
The whole algorithm can be summarized in top-level
pseudo-code as follows:
1. Construct an msb-minimum spanning tree M in O (m).
2. Construct the component tree T in O (m).
3. Construct the unvisited data structure U in O (n).
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
41. Thorup's algorithm
Implementation
of Thorup's
Linear Time
The main routine
Algorithm for
Undirected
Single-Source
Shortest Paths
The whole algorithm can be summarized in top-level
pseudo-code as follows:
1. Construct an msb-minimum spanning tree M in O (m).
2. Construct the component tree T in O (m).
3. Construct the unvisited data structure U in O (n).
4. Set S = {s }.
5. Set D (s ) = 0.
6. For all v ∈ V with v = s : Set D (v ) = w (s , v ).
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
42. Thorup's algorithm
Implementation
of Thorup's
Linear Time
The main routine
Algorithm for
Undirected
Single-Source
Shortest Paths
The whole algorithm can be summarized in top-level
pseudo-code as follows:
1. Construct an msb-minimum spanning tree M in O (m).
2. Construct the component tree T in O (m).
3. Construct the unvisited data structure U in O (n).
4. Set S = {s }.
5. Set D (s ) = 0.
6. For all v ∈ V with v = s : Set D (v ) = w (s , v ).
7. Visit the root of the component tree T .
8. Return D .
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
43. Implementation
of Thorup's
Introduction
Linear Time
Algorithm for
Undirected
Single-Source
Thorup's algorithm
Overview
msb-Minimum spanning tree M
Component tree T
Bucketing structure B
Unvisited data structure U
Visiting components and vertices
Implementation details
Performance
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Conclusion
Performance
Conclusion
44. Thorup's algorithm
Implementation
of Thorup's
Linear Time
Constructing a minimum spanning tree in linear time?
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
construction of a minimum spanning tree is possible in
linear time [FW90]
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
45. Thorup's algorithm
Implementation
of Thorup's
Linear Time
Constructing a minimum spanning tree in linear time?
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
construction of a minimum spanning tree is possible in
linear time [FW90]
this requires a priority queue called atomic heap, which
requires n 212
20
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
46. Thorup's algorithm
Implementation
of Thorup's
Linear Time
Constructing a minimum spanning tree in linear time?
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
construction of a minimum spanning tree is possible in
linear time [FW90]
this requires a priority queue called atomic heap, which
requires n 212
20
nd a dierent way for today's computers
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
47. Implementation
Thorup's algorithm
The
msb -minimum
spanning tree
of Thorup's
M
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
let msb(x ) = log2 x denote the position of the most
signicant bit of x ∈ N
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
48. Implementation
Thorup's algorithm
The
msb -minimum
spanning tree
of Thorup's
M
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
let msb(x ) = log2 x denote the position of the most
signicant bit of x ∈ N
an msb-minimum spanning tree of a graph G is a
spanning tree that is minimal in G where each weight x
is replaced by msb(x )
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
49. Implementation
Thorup's algorithm
The
msb -minimum
spanning tree
of Thorup's
M
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
let msb(x ) = log2 x denote the position of the most
signicant bit of x ∈ N
an msb-minimum spanning tree of a graph G is a
spanning tree that is minimal in G where each weight x
is replaced by msb(x )
use such an msb-minimum spanning tree for
constructing the component tree
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
50. Implementation
Thorup's algorithm
An example of an input graph
of Thorup's
G
(n
= 11, m = 16)
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
51. Implementation
Thorup's algorithm
The input graph
G
after having replaced each weight
of Thorup's
x
by
msb (x )
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
52. Implementation
Thorup's algorithm
An
msb -minimum
spanning tree of
of Thorup's
G
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
53. Implementation
Thorup's algorithm
How to construct an
msb -minimum
of Thorup's
Linear Time
spanning tree
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
1. sort all edges according to their msb-weights in linear
time using simple bucketing
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
54. Implementation
Thorup's algorithm
How to construct an
msb -minimum
of Thorup's
Linear Time
spanning tree
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
1. sort all edges according to their msb-weights in linear
time using simple bucketing
2. compute a minimum spanning tree with Kruskal's
algorithm [Kru56], using the pre-sorted edges
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
55. Implementation
Thorup's algorithm
How to construct an
msb -minimum
of Thorup's
Linear Time
spanning tree
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
the clustering is done with Tarjan's union-nd algorithm
[Tar75]
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
56. Implementation
Thorup's algorithm
How to construct an
msb -minimum
of Thorup's
Linear Time
spanning tree
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
the clustering is done with Tarjan's union-nd algorithm
[Tar75]
the use of union with size, and nd with path
compression leads to a time bound of O (α(m, n)m)
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
57. Implementation
of Thorup's
Introduction
Linear Time
Algorithm for
Undirected
Single-Source
Thorup's algorithm
Overview
msb-Minimum spanning tree M
Component tree T
Bucketing structure B
Unvisited data structure U
Visiting components and vertices
Implementation details
Performance
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Conclusion
Performance
Conclusion
58. Thorup's algorithm
Implementation
of Thorup's
Linear Time
The component hierarchy
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
let Gi be the subgraph of G containing all edges e ∈ E
with w (e ) 2i
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
59. Thorup's algorithm
Implementation
of Thorup's
Linear Time
The component hierarchy
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
let Gi be the subgraph of G containing all edges e ∈ E
with w (e ) 2i
Level i of Thorup's component hierarchy consists of the
components of Gi
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
60. Thorup's algorithm
Implementation
of Thorup's
Linear Time
The component hierarchy
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
let Gi be the subgraph of G containing all edges e ∈ E
with w (e ) 2i
Level i of Thorup's component hierarchy consists of the
components of Gi
use the msb-minimum spanning tree here
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
61. Thorup's algorithm
Implementation
of Thorup's
Linear Time
The component hierarchy
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
let Gi be the subgraph of G containing all edges e ∈ E
with w (e ) 2i
Level i of Thorup's component hierarchy consists of the
components of Gi
use the msb-minimum spanning tree here
let [v ]i denote the component on level i containing the
vertex v ∈ V
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
62. Thorup's algorithm
Implementation
of Thorup's
Linear Time
The component hierarchy
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
let Gi be the subgraph of G containing all edges e ∈ E
with w (e ) 2i
Level i of Thorup's component hierarchy consists of the
components of Gi
use the msb-minimum spanning tree here
let [v ]i denote the component on level i containing the
vertex v ∈ V
the children of a component [v ]i are all components
[w ]i −1 with [w ]i = [v ]i , in other words with w ∈ [v ]i
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
63. Thorup's algorithm
Implementation
of Thorup's
Linear Time
The component hierarchy
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
let Gi be the subgraph of G containing all edges e ∈ E
with w (e ) 2i
Level i of Thorup's component hierarchy consists of the
components of Gi
use the msb-minimum spanning tree here
let [v ]i denote the component on level i containing the
vertex v ∈ V
the children of a component [v ]i are all components
[w ]i −1 with [w ]i = [v ]i , in other words with w ∈ [v ]i
[v ]i = [w ]i ⇒ dist (v , w ) ≥ 2i
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
64. Thorup's algorithm
The subgraph
G4
Implementation
of Thorup's
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
65. Thorup's algorithm
The component tree
T
Implementation
of Thorup's
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
the component tree T skips all nodes [v ]i = [v ]i −1 :
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
66. Thorup's algorithm
The component tree
T
Implementation
of Thorup's
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
the component tree T skips all nodes [v ]i = [v ]i −1 :
Every leaf of T is a singleton component [v ]0 = {v },
v ∈ V.
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
67. Thorup's algorithm
The component tree
T
Implementation
of Thorup's
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
the component tree T skips all nodes [v ]i = [v ]i −1 :
Every leaf of T is a singleton component [v ]0 = {v },
v ∈ V.
Every internal node of T is a component [v ]i , v ∈ V ,
with i 0 and [v ]i −1 [v ]i .
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
68. Thorup's algorithm
The component tree
T
Implementation
of Thorup's
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
the component tree T skips all nodes [v ]i = [v ]i −1 :
Every leaf of T is a singleton component [v ]0 = {v },
v ∈ V.
Every internal node of T is a component [v ]i , v ∈ V ,
with i 0 and [v ]i −1 [v ]i .
The root of T is the node [v ]r = G with r minimized.
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
69. Thorup's algorithm
The component tree
T
Implementation
of Thorup's
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
the component tree T skips all nodes [v ]i = [v ]i −1 :
Every leaf of T is a singleton component [v ]0 = {v },
v ∈ V.
Every internal node of T is a component [v ]i , v ∈ V ,
with i 0 and [v ]i −1 [v ]i .
The root of T is the node [v ]r = G with r minimized.
the parent of a node [v ]i is its nearest ancestor in the
component hierarchy with at least two children
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
70. Thorup's algorithm
The component tree
T
Implementation
of Thorup's
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
the component tree T skips all nodes [v ]i = [v ]i −1 :
Every leaf of T is a singleton component [v ]0 = {v },
v ∈ V.
Every internal node of T is a component [v ]i , v ∈ V ,
with i 0 and [v ]i −1 [v ]i .
The root of T is the node [v ]r = G with r minimized.
the parent of a node [v ]i is its nearest ancestor in the
component hierarchy with at least two children
T has no nodes with exactly one child ⇒ the total
number of nodes is bounded by 2n ∈ O (n)
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
71. Thorup's algorithm
The component tree
T
of
G
Implementation
of Thorup's
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
72. Thorup's algorithm
The components of
G4
Implementation
of Thorup's
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
73. Thorup's algorithm
The subgraph
G4
Implementation
of Thorup's
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
74. Implementation
Thorup's algorithm
How to construct the component tree
of Thorup's
T
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
1. sort the edges of M according to the most signicant
bits of their weights
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
75. Implementation
Thorup's algorithm
How to construct the component tree
of Thorup's
T
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
1. sort the edges of M according to the most signicant
bits of their weights
2. process the resulting sequence of edges e1 , . . . , en−1 in
the following way: For i = 1 to n − 1:
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
76. Implementation
Thorup's algorithm
How to construct the component tree
of Thorup's
T
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
1. sort the edges of M according to the most signicant
bits of their weights
2. process the resulting sequence of edges e1 , . . . , en−1 in
the following way: For i = 1 to n − 1:
2.1 Let (v , w ) = ei .
2.2 Call union(v , w ).
2.3 If msb(w (ei )) msb(w (ei +1 )): Insert all new
components of the union-nd structure into T .
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
77. Implementation
Thorup's algorithm
How to construct the component tree
of Thorup's
T
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
using Tarjan's union-nd algorithm [Tar75] again, the
running time is O (α(m, n)m)
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
78. Implementation
Thorup's algorithm
How to construct the component tree
of Thorup's
T
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
using Tarjan's union-nd algorithm [Tar75] again, the
running time is O (α(m, n)m)
construction T in linear time is also possible:
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
79. Implementation
Thorup's algorithm
How to construct the component tree
of Thorup's
T
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
using Tarjan's union-nd algorithm [Tar75] again, the
running time is O (α(m, n)m)
construction T in linear time is also possible:
requires the tabulation-based union-nd algorithm by
Gabow and Tarjan which runs in O (m + n) time [GT85]
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
80. Implementation
Thorup's algorithm
How to construct the component tree
of Thorup's
T
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
using Tarjan's union-nd algorithm [Tar75] again, the
running time is O (α(m, n)m)
construction T in linear time is also possible:
requires the tabulation-based union-nd algorithm by
Gabow and Tarjan which runs in O (m + n) time [GT85]
much more complicated than the one by Tarjan
we use the simpler one here
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
81. Implementation
of Thorup's
Introduction
Linear Time
Algorithm for
Undirected
Single-Source
Thorup's algorithm
Overview
msb-Minimum spanning tree M
Component tree T
Bucketing structure B
Unvisited data structure U
Visiting components and vertices
Implementation details
Performance
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Conclusion
Performance
Conclusion
82. Thorup's algorithm
The bucketing structure
B
Implementation
of Thorup's
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
visit the nodes of the component tree T in the right
order
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
83. Thorup's algorithm
The bucketing structure
B
Implementation
of Thorup's
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
visit the nodes of the component tree T in the right
order
whenever a component [v ]i is visited, so are all its
ancestors in T
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
84. Thorup's algorithm
The bucketing structure
B
Implementation
of Thorup's
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
visit the nodes of the component tree T in the right
order
whenever a component [v ]i is visited, so are all its
ancestors in T
bucket the children [w ]h of a component [v ]i into
B ([v ]i , min D ([w ]− ) i − 1)
h
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
85. Thorup's algorithm
The bucketing structure
B
Implementation
of Thorup's
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
visit the nodes of the component tree T in the right
order
whenever a component [v ]i is visited, so are all its
ancestors in T
bucket the children [w ]h of a component [v ]i into
B ([v ]i , min D ([w ]− ) i − 1)
h
maintain two additional properties for every component:
ix ([v ]i ) ≤ the smallest index of a nonempty bucket of
[v ]i
∆([v ]i ) = number buckets of [v ]i
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
86. Thorup's algorithm
The bucketing structure
B
Implementation
of Thorup's
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
visit the nodes of the component tree T in the right
order
whenever a component [v ]i is visited, so are all its
ancestors in T
bucket the children [w ]h of a component [v ]i into
B ([v ]i , min D ([w ]− ) i − 1)
h
maintain two additional properties for every component:
ix ([v ]i ) ≤ the smallest index of a nonempty bucket of
[v ]i
∆([v ]i ) = number buckets of [v ]i
the total number of buckets is bounded by 8n
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
87. Implementation
of Thorup's
Introduction
Linear Time
Algorithm for
Undirected
Single-Source
Thorup's algorithm
Overview
msb-Minimum spanning tree M
Component tree T
Bucketing structure B
Unvisited data structure U
Visiting components and vertices
Implementation details
Performance
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Conclusion
Performance
Conclusion
88. Implementation
Thorup's algorithm
The unvisited data structure
of Thorup's
U
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
The unvisited data structure U . . .
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
89. Implementation
Thorup's algorithm
The unvisited data structure
of Thorup's
U
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
The unvisited data structure U . . .
. . . represents the unvisited subforest of the component
tree T
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
90. Implementation
Thorup's algorithm
The unvisited data structure
of Thorup's
U
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
The unvisited data structure U . . .
. . . represents the unvisited subforest of the component
tree T
. . . is required for maintaining the changing values
min D ([v ]− ) for the changing set of roots [v ]i in the
i
unvisited part of T in linear total time
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
91. Implementation
Thorup's algorithm
The unvisited data structure
of Thorup's
U
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
The unvisited data structure U . . .
. . . represents the unvisited subforest of the component
tree T
. . . is required for maintaining the changing values
min D ([v ]− ) for the changing set of roots [v ]i in the
i
unvisited part of T in linear total time
[v ]i is a root of a tree in U if and only if [v ]i is an
unvisited child of a visited component in T
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
92. Implementation
Thorup's algorithm
The unvisited data structure
of Thorup's
U
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
The unvisited data structure U . . .
. . . represents the unvisited subforest of the component
tree T
. . . is required for maintaining the changing values
min D ([v ]− ) for the changing set of roots [v ]i in the
i
unvisited part of T in linear total time
[v ]i is a root of a tree in U if and only if [v ]i is an
unvisited child of a visited component in T
[v ]i = [v ]i for each of these roots, because they are
unvisited
−
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
93. Thorup's algorithm
Implementation
of Thorup's
Linear Time
The problem: Operations of the unvisited data structure
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
two operations in amortized constant time:
1. Update min D ([v ]i ) whenever D (v ) is decreased for
some vertex v ∈ V with unvisited root [v ]i .
2. Turn all children [w ]h of [v ]i in T into roots in U and
compute min D ([w ]− ) for all of them whenever an
h
unvisited root [v ]i is visited.
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
94. Thorup's algorithm
Implementation
of Thorup's
Linear Time
The problem: Operations of the unvisited data structure
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
two operations in amortized constant time:
1. Update min D ([v ]i ) whenever D (v ) is decreased for
some vertex v ∈ V with unvisited root [v ]i .
2. Turn all children [w ]h of [v ]i in T into roots in U and
compute min D ([w ]− ) for all of them whenever an
h
unvisited root [v ]i is visited.
transform this problem into another one that can be
solved by the split-ndmin structure by Gabow [Gab85]
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
95. Implementation
Thorup's algorithm
The initial unvisited data structure
of Thorup's
U
of
G
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
[1, 2, 3, 10, 8, 9, 4, 5, 7, 11, 6]
96. Implementation
Thorup's algorithm
The unvisited data structure
of Thorup's
U
after having called
visit([1]11 )
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
[1, 2, 3, 10, 8, 9, 4, 5, 7, 11] [6]
97. Implementation
Thorup's algorithm
The unvisited data structure
of Thorup's
U
after having called
visit([1]9 )
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
[1, 2, 3, 10, 8, 9, 4, 5, 7] [11] [6]
98. Implementation
Thorup's algorithm
The unvisited data structure
of Thorup's
U
after having called
visit([1]7 )
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
[1, 2, 3, 10, 8, 9] [4, 5, 7] [11] [6]
99. Thorup's algorithm
Implementation
of Thorup's
Linear Time
Total running time of the operations of the unvisited data structure
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
for k ∈ N, k 2, each split in k can be implemented by
k − 1 splits in two
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
100. Thorup's algorithm
Implementation
of Thorup's
Linear Time
Total running time of the operations of the unvisited data structure
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
for k ∈ N, k 2, each split in k can be implemented by
k − 1 splits in two
at most n − 1 splits in two, because |V | = n
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
101. Thorup's algorithm
Implementation
of Thorup's
Linear Time
Total running time of the operations of the unvisited data structure
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
for k ∈ N, k 2, each split in k can be implemented by
k − 1 splits in two
at most n − 1 splits in two, because |V | = n
at most m decreases, one for each edge in G
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
102. Thorup's algorithm
Implementation
of Thorup's
Linear Time
Total running time of the operations of the unvisited data structure
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
for k ∈ N, k 2, each split in k can be implemented by
k − 1 splits in two
at most n − 1 splits in two, because |V | = n
at most m decreases, one for each edge in G
Gabow's split-ndmin data structure supports exactly
these two operations
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
103. Thorup's algorithm
Implementation
of Thorup's
Linear Time
Total running time of the operations of the unvisited data structure
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
for k ∈ N, k 2, each split in k can be implemented by
k − 1 splits in two
at most n − 1 splits in two, because |V | = n
at most m decreases, one for each edge in G
Gabow's split-ndmin data structure supports exactly
these two operations
the total runinng time for n − 1 splits and m decreases is
O (α(m, n)m)
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
104. Thorup's algorithm
Implementation
of Thorup's
Linear Time
Operations of the unvisited data structure in linear total time?
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Thorup presented an O (m + n) solution [Tho99]), which
is based on the atomic heaps by Fredman and Willard
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
105. Thorup's algorithm
Implementation
of Thorup's
Linear Time
Operations of the unvisited data structure in linear total time?
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Thorup presented an O (m + n) solution [Tho99]), which
is based on the atomic heaps by Fredman and Willard
as mentioned above, these priority queues require
n 212
20
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
106. Thorup's algorithm
Implementation
of Thorup's
Linear Time
Operations of the unvisited data structure in linear total time?
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Thorup presented an O (m + n) solution [Tho99]), which
is based on the atomic heaps by Fredman and Willard
Introduction
Thorup's
algorithm
as mentioned above, these priority queues require
n 212
Overview
fall back to the solution by Gabow and to a total
running time of O (α(m, n)m)
Bucketing
structure B
20
msb-Minimum
spanning tree M
Component tree
T
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
107. Implementation
of Thorup's
Introduction
Linear Time
Algorithm for
Undirected
Single-Source
Thorup's algorithm
Overview
msb-Minimum spanning tree M
Component tree T
Bucketing structure B
Unvisited data structure U
Visiting components and vertices
Implementation details
Performance
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Conclusion
Performance
Conclusion
108. Thorup's algorithm
Implementation
of Thorup's
Linear Time
The main routine revisited
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
1. Construct an msb-minimum spanning tree M in O (m).
Integer Weights
Nick Prühs
(done)
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
109. Thorup's algorithm
Implementation
of Thorup's
Linear Time
The main routine revisited
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
1. Construct an msb-minimum spanning tree M in O (m).
Integer Weights
Nick Prühs
(done)
2. Construct the component tree T in O (m). (done)
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
110. Thorup's algorithm
Implementation
of Thorup's
Linear Time
The main routine revisited
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
1. Construct an msb-minimum spanning tree M in O (m).
Integer Weights
Nick Prühs
(done)
2. Construct the component tree T in O (m). (done)
3. Construct the unvisited data structure U in O (n).
(done)
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
111. Thorup's algorithm
Implementation
of Thorup's
Linear Time
The main routine revisited
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
1. Construct an msb-minimum spanning tree M in O (m).
Integer Weights
Nick Prühs
(done)
2. Construct the component tree T in O (m). (done)
3. Construct the unvisited data structure U in O (n).
(done)
4. Set S = {s }. (done)
5. Set D (s ) = 0. (done)
6. For all v ∈ V with v = s : Set D (v ) = w (s , v ). (done)
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
112. Thorup's algorithm
Implementation
of Thorup's
Linear Time
The main routine revisited
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
1. Construct an msb-minimum spanning tree M in O (m).
Integer Weights
Nick Prühs
(done)
2. Construct the component tree T in O (m). (done)
3. Construct the unvisited data structure U in O (n).
(done)
4. Set S = {s }. (done)
5. Set D (s ) = 0. (done)
6. For all v ∈ V with v = s : Set D (v ) = w (s , v ). (done)
7. Visit the root of the component tree T .
8. Return D .
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
113. Thorup's algorithm
Visit(
[v ]i ):
Implementation
of Thorup's
Linear Time
Step 1
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
If [v ]i is the root of T ,
1. then: Set j = ω + 1.
2. else: Let [v ]j be the parent of [v ]i in T .
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
114. Implementation
Thorup's algorithm
Visit(
[v ]i ):
of Thorup's
Linear Time
Step 2
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
If i = 0:
Integer Weights
Nick Prühs
1. Add v to S .
2. For all edges (u , v ) ∈ E :
2.1 If D (v ) + w (u , v ) D (w ):
2.1.1
2.1.2
2.1.3
2.1.4
2.1.5
[u ]h be the unvisited root of [u ]0 in U .
Let [u ]i be the visited parent of [u ]h in T .
−
Set oldMin = min D ([u ] )
i − 1.
h
Decrease D (u ) to D (v ) + w (u , v ).
−
i − 1 oldMin: Move [u ]h
If min D ([u ] )
h
B ([u ]i , min D ([u ]h )
i − 1).
Introduction
Thorup's
algorithm
Overview
Let
3. Remove [v ]i from its bucket of [v ]j .
4. Return.
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
to bucket
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
115. Thorup's algorithm
Visit(
[v ]i ):
Implementation
of Thorup's
Linear Time
Step 3
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
If [v ]i is visited for the rst time:
1. Construct the ∆([v ]i ) buckets of [v ]i .
2. Delete [v ]i from U , turning its children into roots in U .
3. For all children [w ]h of [v ]i :
3.1 Bucket [w ]h in B ([v ]i , min D ([w ]− ) i − 1).
h
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
116. Implementation
Thorup's algorithm
Visit(
[v ]i ):
of Thorup's
Linear Time
Steps 4-6
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Set oldIndex = ix ([v ]i )
j − i.
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
117. Implementation
Thorup's algorithm
Visit(
[v ]i ):
of Thorup's
Linear Time
Steps 4-6
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Set oldIndex = ix ([v ]i )
j − i.
−
While [v ]i = ∅ and oldIndex = ix ([v ]i )
1. While B ([v ]i , ix ([v ]i )) = ∅:
1.1
1.2
[w ]h ∈ B ([v ]i , ix ([v ]i )).
Call visit ([w ]h ).
Let
2. Increment
ix ([v ]i ).
Nick Prühs
j − i:
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
118. Implementation
Thorup's algorithm
Visit(
[v ]i ):
of Thorup's
Linear Time
Steps 4-6
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Set oldIndex = ix ([v ]i )
j − i.
−
While [v ]i = ∅ and oldIndex = ix ([v ]i )
1. While B ([v ]i , ix ([v ]i )) = ∅:
1.1
1.2
[w ]h ∈ B ([v ]i , ix ([v ]i )).
Call visit ([w ]h ).
Nick Prühs
j − i:
Let
2. Increment ix ([v ]i ).
If [v ]− = ∅,
i
1. then: If [v ]i is not the root of T , remove it from its
bucket of [v ]j .
2. else: Move [v ]i to bucket B ([v ]j , ix ([v ]i ) j − i ).
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
119. Implementation
of Thorup's
Introduction
Linear Time
Algorithm for
Undirected
Single-Source
Thorup's algorithm
Overview
msb-Minimum spanning tree M
Component tree T
Bucketing structure B
Unvisited data structure U
Visiting components and vertices
Implementation details
Performance
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Conclusion
Performance
Conclusion
120. Implementation details
Implementation
of Thorup's
Linear Time
The strategy pattern
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Java implementation:
imperative programming language
ts the required RAM model
object-oriented
word length ω = 32, number of vertices n ≤ 232
allows the extensive use of the strategy pattern
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
121. Implementation details
Implementation
of Thorup's
Linear Time
Implemented data structures
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
an undirected, weighted graph using adjacency lists
an array priority queue
Introduction
Thorup's
algorithm
Overview
a Fibonacci heap [FT84]
msb-Minimum
a split-ndmin structure [GT85]
T
a union-nd structure [Tar75]
spanning tree M
Component tree
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
122. Implementation details
Implementation
of Thorup's
Linear Time
Implemented algorithms
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Kruskal [Kru56]
Dijkstra [Dij59]
Thorup [Tho99]
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
123. Implementation
of Thorup's
Introduction
Linear Time
Algorithm for
Undirected
Single-Source
Thorup's algorithm
Overview
msb-Minimum spanning tree M
Component tree T
Bucketing structure B
Unvisited data structure U
Visiting components and vertices
Implementation details
Performance
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Conclusion
Performance
Conclusion
124. Performance
Implementation
of Thorup's
Linear Time
The performance tests
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
average of ve passes
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
125. Performance
Implementation
of Thorup's
Linear Time
The performance tests
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
average of ve passes
the test system:
Intel Core 2 Duo E6300 at 1,86 GHz
2048 MB DDR2 667 PC2-5300 RAM
Java 1.6.0_15
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
126. Performance
Implementation
of Thorup's
Linear Time
Varying the number of vertices
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
start with n = 1000 and increase it in steps of 1000 until
n = 10000
about m = 5n edges
edge weights 1 ≤ w ≤ 100000
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
127. Performance
Implementation
of Thorup's
Linear Time
Varying the number of vertices: Results
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Figure: Running times for 1000 ≤ n ≤ 10000, m = 5n.
Performance
Conclusion
128. Performance
Implementation
of Thorup's
Linear Time
Varying the number of vertices
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
start with n = 4000 and increase it in steps of 4000 until
n = 40000
about m = 5n edges again
edge weights 1 ≤ w ≤ 100000 again
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
129. Performance
Implementation
of Thorup's
Linear Time
Varying the number of vertices
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
start with n = 4000 and increase it in steps of 4000 until
n = 40000
about m = 5n edges again
edge weights 1 ≤ w ≤ 100000 again
leave out the naive implementation of Dijkstra's
algorithm and focus on the faster one
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
130. Performance
Implementation
of Thorup's
Linear Time
Varying the number of vertices
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
start with n = 4000 and increase it in steps of 4000 until
n = 40000
about m = 5n edges again
edge weights 1 ≤ w ≤ 100000 again
leave out the naive implementation of Dijkstra's
algorithm and focus on the faster one
nd out which n is required for Thorup to catch up with
Dijkstra
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
131. Performance
Implementation
of Thorup's
Linear Time
Varying the number of vertices: Results
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Figure: Running times for 4000 ≤ n ≤ 40000, m = 5n.
Conclusion
132. Performance
Implementation
of Thorup's
Linear Time
Varying the number of edges per vertex
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
x the number of vertices n = 20000
start with m = 3n edges and increase it in steps of 3n
until m = 24n
edge weights 1 ≤ w ≤ 100000 again
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
133. Implementation
Performance
of Thorup's
Linear Time
Varying the number of edges per vertex: Results
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Figure: Running times for
n = 20000, 3n ≤ m ≤ 24n.
Conclusion
134. Performance
Implementation
of Thorup's
Linear Time
Varying the maximum edge weight
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
x the number of vertices n = 20000
x the number of edges m = 5n
start by choosing all edge weights 1 ≤ w ≤ 5 and
increase the maximum edge weight in steps of 5 until
1 ≤ w ≤ 100
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
135. Performance
Implementation
of Thorup's
Linear Time
Varying the maximum edge weight: Results
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
Figure: Running times for n = 20000, m = 5n, and maximum edge
weights between 5 and 100.
details
Performance
Conclusion
136. Implementation
Performance
of Thorup's
Linear Time
Varying the maximum edge weight: Results
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
maximum edge weight
256
1024
16384
Dijkstra (Fibonacci heap)
212
209
212
219
Thorup (MST)
Thorup (other DS)
Thorup (visit)
148
153
461
153
171
423
145
156
430
168
140
403
Nick Prühs
262144
Table: Running times for n = 20000, m = 5n and maximum edge
weights 28 , 210 , 214 and 218 .
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
137. Performance
Implementation
of Thorup's
Linear Time
Repetitive queries
Algorithm for
Undirected
Single-Source
Shortest Paths
nd out whether Thorup's algorithm can catch up with
the one by Dijkstra making repetive queries
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
138. Performance
Implementation
of Thorup's
Linear Time
Repetitive queries
Algorithm for
Undirected
Single-Source
Shortest Paths
nd out whether Thorup's algorithm can catch up with
the one by Dijkstra making repetive queries
at the rst query, all required data structures are
computed once
this is the initial lead Dijkstra's algorithm has over the
one by Thorup
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
139. Performance
Implementation
of Thorup's
Linear Time
Repetitive queries
Algorithm for
Undirected
Single-Source
Shortest Paths
nd out whether Thorup's algorithm can catch up with
the one by Dijkstra making repetive queries
at the rst query, all required data structures are
computed once
this is the initial lead Dijkstra's algorithm has over the
one by Thorup
clean up between two queries:
1. Reset the set S of visited vertices.
2. Clear all buckets.
3. Reset the unvisited data structure U , making it contain
only the root of T .
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
140. Performance
Implementation
of Thorup's
Linear Time
Repetitive queries
Algorithm for
Undirected
Single-Source
Shortest Paths
nd out whether Thorup's algorithm can catch up with
the one by Dijkstra making repetive queries
at the rst query, all required data structures are
computed once
this is the initial lead Dijkstra's algorithm has over the
one by Thorup
clean up between two queries:
1. Reset the set S of visited vertices.
2. Clear all buckets.
3. Reset the unvisited data structure U , making it contain
only the root of T .
still takes signicantly less time than before the rst
query
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
141. Performance
Implementation
of Thorup's
Linear Time
Repetitive queries
Algorithm for
Undirected
Single-Source
test instance: the road network of New York City
number of vertices n = 264, 346
number of edges m = 733, 846 (about m = 3n)
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
142. Performance
Implementation
of Thorup's
Linear Time
Repetitive queries
Algorithm for
Undirected
Single-Source
test instance: the road network of New York City
number of vertices n = 264, 346
number of edges m = 733, 846 (about m = 3n)
source: 9th DIMACS Implementation Challenge Shortest Paths [Dem06]
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
143. Performance
Implementation
of Thorup's
Linear Time
Repetitive queries
Algorithm for
Undirected
Single-Source
test instance: the road network of New York City
number of vertices n = 264, 346
number of edges m = 733, 846 (about m = 3n)
source: 9th DIMACS Implementation Challenge Shortest Paths [Dem06]
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
nd the shortest paths from the vertices with indices 0
to 9 to all other ones
Overview
accumulate the resulting running times
Bucketing
structure B
msb-Minimum
spanning tree M
Component tree
T
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
144. Performance
Implementation
of Thorup's
Linear Time
Repetitive queries
Algorithm for
Undirected
Single-Source
test instance: the road network of New York City
number of vertices n = 264, 346
number of edges m = 733, 846 (about m = 3n)
source: 9th DIMACS Implementation Challenge Shortest Paths [Dem06]
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
nd the shortest paths from the vertices with indices 0
to 9 to all other ones
Overview
accumulate the resulting running times
Bucketing
structure B
the initialization of Thorup's algorithm takes about 2100
ms and is added to the rst accumulated time
the time required for cleaning up all data structures is
always about 200 ms and is added to the accumulated
time of the query the clean-up has been done before
msb-Minimum
spanning tree M
Component tree
T
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
145. Performance
Implementation
of Thorup's
Linear Time
Repetitive queries: Results
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Figure: Accumulated running times for ten queries on the road
network of New York City.
Performance
Conclusion
146. Implementation
of Thorup's
Introduction
Linear Time
Algorithm for
Undirected
Single-Source
Thorup's algorithm
Overview
msb-Minimum spanning tree M
Component tree T
Bucketing structure B
Unvisited data structure U
Visiting components and vertices
Implementation details
Performance
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Conclusion
Performance
Conclusion
147. Conclusion
Implementation
of Thorup's
Linear Time
Algorithm for
Undirected
Single-Source
Thorup's algorithm does not require comparison-based
sorting and is today's theoretically fastest SSSP
algorithm, . . .
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
148. Conclusion
Implementation
of Thorup's
Linear Time
Algorithm for
Undirected
Single-Source
Thorup's algorithm does not require comparison-based
sorting and is today's theoretically fastest SSSP
algorithm, . . .
. . . but our implementation of the algorithm is still
signicantly slower than our implementation of
Dijkstra's algorithm using a Fibonacci heap
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
149. Conclusion
Implementation
of Thorup's
Linear Time
Algorithm for
Undirected
Single-Source
Thorup's algorithm does not require comparison-based
sorting and is today's theoretically fastest SSSP
algorithm, . . .
. . . but our implementation of the algorithm is still
signicantly slower than our implementation of
Dijkstra's algorithm using a Fibonacci heap
possbile reasons are:
an inecient implementation
a word length which is still too small for realizing the
full potential of Thorup's algorithm
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
150. Conclusion
Implementation
of Thorup's
Linear Time
Algorithm for
Undirected
Single-Source
Thorup's algorithm does not require comparison-based
sorting and is today's theoretically fastest SSSP
algorithm, . . .
. . . but our implementation of the algorithm is still
signicantly slower than our implementation of
Dijkstra's algorithm using a Fibonacci heap
possbile reasons are:
an inecient implementation
a word length which is still too small for realizing the
full potential of Thorup's algorithm
these observations essentially equal the conclusion made
by Yasuhito Asano and Hiroshi Imai [AI00]
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
151. Conclusion
Implementation
of Thorup's
Linear Time
Future work
Algorithm for
Undirected
Single-Source
Shortest Paths
implement the strictly linear time parts of Thorup's
algorithm:
the linear time algorithm for constructing minimum
spanning trees [FW90]
the linear time union-nd [GT85] structure
the linear time split-ndmin structure [Tho99]
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
152. Conclusion
Implementation
of Thorup's
Linear Time
Future work
Algorithm for
Undirected
Single-Source
Shortest Paths
implement the strictly linear time parts of Thorup's
algorithm:
the linear time algorithm for constructing minimum
spanning trees [FW90]
the linear time union-nd [GT85] structure
the linear time split-ndmin structure [Tho99]
see how well Thorup's algorithm does compared to fast
all shortest paths algorithms
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
153. Conclusion
Implementation
of Thorup's
Linear Time
Future work
Algorithm for
Undirected
Single-Source
Shortest Paths
implement the strictly linear time parts of Thorup's
algorithm:
the linear time algorithm for constructing minimum
spanning trees [FW90]
the linear time union-nd [GT85] structure
the linear time split-ndmin structure [Tho99]
see how well Thorup's algorithm does compared to fast
all shortest paths algorithms
see if his component tree can be useful for other
applications
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
154. Conclusion
Implementation
of Thorup's
Linear Time
Future work
Algorithm for
Undirected
Single-Source
Shortest Paths
implement the strictly linear time parts of Thorup's
algorithm:
the linear time algorithm for constructing minimum
spanning trees [FW90]
the linear time union-nd [GT85] structure
the linear time split-ndmin structure [Tho99]
see how well Thorup's algorithm does compared to fast
all shortest paths algorithms
see if his component tree can be useful for other
applications
run the algorithm on signicantly larger graphs and
check whether it is as attractive for repetitive queries as
expected, as soon as we are able to
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
155. Conclusion
Implementation
of Thorup's
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Thank you for your attention!
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
156. Yasuhito Asano and Hiroshi Imai.
Practical eciency of the linear-time algorithm for the
single source shortest path problem.
Journal of the Operations Research, 43:431447, 2000.
Camil Demetrescu.
9th dimacs implementation challenge - shortest paths.
http://www.dis.uniroma1.it/~challenge9/
download.shtml, 2006.
Edsger W. Dijkstra.
A note on two problems in connection with graphs.
Numer. Math., 1:269271, 1959.
Michael L. Fredman and Robert Endre Tarjan.
Fibonacci heaps and their uses in improved network
optimization algorithms.
In FOCS, pages 338346. IEEE, 1984.
Michael L. Fredman and Dan E. Willard.
Implementation
of Thorup's
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
157. Trans-dichotomous algorithms for minimum spanning
trees and shortest paths.
In FOCS, volume II, pages 719725. IEEE, 1990.
Harold N. Gabow.
A scaling algorithm for weighted matching on general
graphs.
In FOCS, pages 90100. IEEE, 1985.
Harold N. Gabow and Robert Endre Tarjan.
A linear-time algorithm for a special case of disjoint set
union.
J. Comput. Syst. Sci., 30(2):209221, 1985.
Joseph B. Kruskal.
On the shortest spanning subtree of a graph and the
traveling salesman problem.
Proc. Am. Math. Soc, 7:4850, 1956.
Robert Endre Tarjan.
Eciency of a good but not linear set union algorithm.
J. ACM, 22(2):215225, 1975.
Implementation
of Thorup's
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion
158. Mikkel Thorup.
Undirected single-source shortest paths with positive
integer weights in linear time.
J. ACM, 46(3):362394, 1999.
Implementation
of Thorup's
Linear Time
Algorithm for
Undirected
Single-Source
Shortest Paths
with Positive
Integer Weights
Nick Prühs
Introduction
Thorup's
algorithm
Overview
msb-Minimum
spanning tree M
Component tree
T
Bucketing
structure B
Unvisited data
structure U
Visiting
components and
vertices
Implementation
details
Performance
Conclusion