Compare commits
2
Commits
fc1386e572
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
24c25f9431 | ||
|
|
1aba0700fc |
Binary file not shown.
Binary file not shown.
Binary file not shown.
+626
@@ -0,0 +1,626 @@
|
|||||||
|
\documentclass{article}
|
||||||
|
\usepackage{kotex}
|
||||||
|
\usepackage{float}
|
||||||
|
\usepackage{hyperref}
|
||||||
|
\hypersetup{
|
||||||
|
pdfborder={0 0 0}
|
||||||
|
}
|
||||||
|
\usepackage{graphicx}
|
||||||
|
\graphicspath{{images/}}
|
||||||
|
|
||||||
|
\usepackage{amsmath}
|
||||||
|
|
||||||
|
\usepackage[style=apa,backend=biber]{biblatex} % 출처
|
||||||
|
\addbibresource{references.bib}
|
||||||
|
|
||||||
|
\setlength{\parindent}{0pt}
|
||||||
|
\setlength{\parskip}{0.6em}
|
||||||
|
\linespread{1.08}
|
||||||
|
|
||||||
|
\title{When Asymptotic Complexity Fails: An Empirical and Cost-Based Study of Binary and Fibonacci Heaps in Python}
|
||||||
|
\author{Seungjun Lee}
|
||||||
|
\date{\today}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\maketitle
|
||||||
|
|
||||||
|
\newpage
|
||||||
|
|
||||||
|
\tableofcontents
|
||||||
|
|
||||||
|
\newpage
|
||||||
|
|
||||||
|
\section{Introduction}
|
||||||
|
% \begin{itemize}
|
||||||
|
% \item Dijkstra 알고리즘 소개
|
||||||
|
% \item Priority queue 소개
|
||||||
|
% \item Binary heap 소개 (간단한 설명과 시간 복잡도)
|
||||||
|
% \item Fibonacci heap 소개 (간단한 설명과 시간 복잡도)
|
||||||
|
% \item 현실과 이론의 괴리 설명
|
||||||
|
% \item 연구 질문 명시
|
||||||
|
% \item Why does the theoretical asymptotic advantage of Fibonacci heap in Dijkstra's algorithm not translate into practical runtime improvements in Python implementations?
|
||||||
|
% \end{itemize}
|
||||||
|
|
||||||
|
Dijkstra's algorithm is widely used for finding the shortest path in graphs.
|
||||||
|
Its performance can be improved by implementing a priority queue.
|
||||||
|
Binary heaps and Fibonacci heaps are commonly used priority queue implementations.
|
||||||
|
Theoretically, Fibonacci heaps have a lower asymptotic time complexity than binary heaps.
|
||||||
|
However, empirical studies often show that binary heaps achieve better practical runtime performance.
|
||||||
|
Asymptotic time complexity is widely used to evaluate algorithm performance.
|
||||||
|
Investigating the gap between theoretical complexity and practical performance is therefore important.
|
||||||
|
Therefore, this study investigates why does the theoretical asymptotic advantage of Fibonacci heap in Dijkstra's algorithm not translate into practical runtime improvements in Python implementations.
|
||||||
|
|
||||||
|
% \newpage
|
||||||
|
|
||||||
|
\section{Theoretical Background}
|
||||||
|
% \begin{itemize}
|
||||||
|
% \item Dijkstra 알고리즘 원리
|
||||||
|
% \begin{itemize}
|
||||||
|
% \item 특정 노드로 갈 수 있는 최단거리 계속 수정
|
||||||
|
% \item 현재 기준 가장 이동거리 짧은 노드 (여기서 priority queue 연결)
|
||||||
|
% \end{itemize}
|
||||||
|
|
||||||
|
% \item Priority queue
|
||||||
|
% \begin{itemize}
|
||||||
|
% \item 이게 뭔지 설명. add, extract\_min, decrease\_key 3개 설명
|
||||||
|
% \item Binary tree
|
||||||
|
% \item Fibonacci tree
|
||||||
|
% \end{itemize}
|
||||||
|
|
||||||
|
% \item 시간 복잡도
|
||||||
|
% \begin{itemize}
|
||||||
|
% \item 어떤 부분에서 차이가 나는지
|
||||||
|
% \end{itemize}
|
||||||
|
% \end{itemize}
|
||||||
|
|
||||||
|
\subsection{Dijkstra's Algorithm}
|
||||||
|
|
||||||
|
Dijkstra's algorithm solves the \emph{single-source shortest-path} problem on a finite graph whose edges are assigned nonnegative real weights.
|
||||||
|
Given a designated source vertex, the algorithm computes, for every vertex reachable from the source, the minimum total weight of any path from the source to that vertex.
|
||||||
|
The pseudocode below records a standard sequential formulation in which each iteration selects the next vertex by scanning the entire unvisited set.
|
||||||
|
|
||||||
|
\begin{verbatim}
|
||||||
|
dist[v] = ∞ for all vertices v
|
||||||
|
unvisited = set of all vertices
|
||||||
|
|
||||||
|
dist[source] = 0
|
||||||
|
|
||||||
|
while unvisited is not empty:
|
||||||
|
# Main loop executes once per vertex → total O(V)
|
||||||
|
|
||||||
|
cur = unvisited vertex with minimum dist[cur]
|
||||||
|
# Select vertex with smallest tentative distance
|
||||||
|
# Linear scan over unvisited → O(V) per iteration
|
||||||
|
|
||||||
|
if dist[cur] = ∞:
|
||||||
|
break
|
||||||
|
remove cur from unvisited
|
||||||
|
|
||||||
|
for each neighbor nxt of cur:
|
||||||
|
# Iterate over all adjacent edges
|
||||||
|
# Total number of iterations across algorithm = O(E)
|
||||||
|
# Each iteration is counted as a relaxation attempt
|
||||||
|
|
||||||
|
cand = dist[cur] + weight(cur, nxt)
|
||||||
|
if cand < dist[nxt]:
|
||||||
|
dist[nxt] = cand
|
||||||
|
# Relaxation success
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
endwhile
|
||||||
|
|
||||||
|
return dist
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
The algorithm iterates until all vertices have been processed or there are no more connected nodes.
|
||||||
|
In each iteration, the algorithm finds the unvisited node with the shortest distance and updates the distance of its neighbors.
|
||||||
|
Then, for each neighboring node, compare the existing distance with the distance going through the current node.
|
||||||
|
If going through the current node is shorter, change the distance.
|
||||||
|
By doing this, the algorithm can find the shortest path from the source to all other vertices.
|
||||||
|
|
||||||
|
\subsection{Time Complexity}
|
||||||
|
|
||||||
|
The total time complexity of this algorithm can be calculated by summing the cost of each operation.
|
||||||
|
First, the main loop repeats once for every vertex, resulting in $V$ iterations.
|
||||||
|
In each interation, it tooks $O(V)$ to find the minimum-distance unvisited vertex.
|
||||||
|
Therefore, the total cost of minimum selection is $O(V^2)$.
|
||||||
|
Additionally, during each iteration, the algorithm iterates all neighboring vertices of the current vertex.
|
||||||
|
As each edge is chosen once, neighbor examinations took total $O(E)$ times.
|
||||||
|
Combining these two, the overall time complexity becomes $O(V^2 + E)$.
|
||||||
|
|
||||||
|
\subsection{Priority Queues}
|
||||||
|
|
||||||
|
The pure dijkstra must scan all vertices to find the smallest distance, which takes $O(V)$ time for each iteration.
|
||||||
|
To efficiently handle this process, a priority queue is typically adopted.
|
||||||
|
|
||||||
|
A priority queue is a data structure that supports efficient extraction of the element with smallest key.
|
||||||
|
This is used in Dijkstra's algorithm to select the vertex with smallest tentative distance.
|
||||||
|
The main operations required by Dijkstra's algorithm are insert, decrease-key, and extract-min.
|
||||||
|
As different queues have distinct time complexities in each operation, the choice of priority queue implementation determines the overall time complexity of the algorithm.
|
||||||
|
|
||||||
|
\subsection{Binary heap}
|
||||||
|
|
||||||
|
A binary heap is a heap data structure that is implemented in a complete binary tree satisfying either the min-heap or max-heap property.
|
||||||
|
|
||||||
|
In Dijkstra's algorithm, it is used as a priority queue that stores vertices with their current tentative distances and supports the operations insert, decrease-key, and extract-min.
|
||||||
|
As a complete binary tree has height of $\log_{2}{V}$, restoring the heap property after an insertion or key modification requires moving a node up or down the tree by at most $\log_{2}{V}$ times.
|
||||||
|
Therefore, the insert, decrease-key, and extract-min operations each run in $O(\log{V})$ time.
|
||||||
|
|
||||||
|
\subsection{Fibonacci Heap}
|
||||||
|
|
||||||
|
To enhance the performance of the priority queue, a fibonacci heap was introduced.
|
||||||
|
|
||||||
|
A fibonacci heap is a collection of trees rather than a single tree.
|
||||||
|
Unlike a binary tree, its trees do not need to be complete binary trees.
|
||||||
|
They only need to satisfy the min-heap or max-heap property.
|
||||||
|
|
||||||
|
The Insert operation simply adds a new node to the root list and therefore run in $O(1)$ time.
|
||||||
|
|
||||||
|
The decrease-key operation cuts the modified node from its parent and move it to the root list.
|
||||||
|
If the parent has previously lost a child, a cascading cut occurs to maintain structural properties.
|
||||||
|
|
||||||
|
The extract-min operation removes the minimum node, which is tracked by a pointer.
|
||||||
|
To trach a new minimum node into the pointer, it performs consolidation process.
|
||||||
|
Although consolidation require significant work, amortized analysis shows that extract-min runs in $O(\log{n})$ time.
|
||||||
|
|
||||||
|
As a result, insert and decrease-key operations take $O(1)$ amortized time, while extract-min takes $O(\log n)$ amortized time.
|
||||||
|
|
||||||
|
\begin{verbatim}
|
||||||
|
dist[v] = ∞ for all vertices v
|
||||||
|
dist[source] = 0
|
||||||
|
|
||||||
|
queue = priority queue containing all vertices
|
||||||
|
decrease-key in queue source to 0
|
||||||
|
|
||||||
|
while queue is not empty: # O(V)
|
||||||
|
cur = extract-min from queue # Extract-min O(a)
|
||||||
|
|
||||||
|
for each neighbor nxt of cur: # Relaxation attempt O(E_cur) <- Sum(O(E_i)) = O(E)
|
||||||
|
cand = dist[cur] + weight(cur, nxt)
|
||||||
|
if cand < dist[nxt]:
|
||||||
|
dist[nxt] = cand
|
||||||
|
decrease-key in queue nxt to cand # Relaxation success O(b)
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
endwhile
|
||||||
|
|
||||||
|
return dist
|
||||||
|
|
||||||
|
The entire process is similar to the pure dijkstra.
|
||||||
|
However, it uses priority queue to select current vertex.
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsection{Time Complexity}
|
||||||
|
|
||||||
|
The time complexity of Dijkstra’s algorithm with a priority queue can be expressed in a general form by separating the cost of key operations.
|
||||||
|
|
||||||
|
As in the pure version, the main loop iterates once for each vertex, resulting in \(V\) iterations. In each iteration, the algorithm performs an extract-min operation to select the current vertex. Let the cost of this operation be \(O(A)\), which depends on the choice of priority queue. Therefore, the total cost of minimum selection is \(O(AV)\).
|
||||||
|
|
||||||
|
In addition, the algorithm performs relaxation on neighboring vertices. Across the entire execution, each edge is examined once, resulting in \(E\) relaxation attempts. When a shorter path is found, a decrease-key operation is performed. Let the cost of this operation be \(O(B)\). Thus, the total cost of neighbor processing becomes \(O(BE)\).
|
||||||
|
|
||||||
|
Combining these components, the overall time complexity can be expressed as:
|
||||||
|
|
||||||
|
\[
|
||||||
|
O(AV + BE)
|
||||||
|
\]
|
||||||
|
|
||||||
|
This formulation allows the effect of different priority queue implementations to be analyzed by substituting their respective operation costs.
|
||||||
|
|
||||||
|
For a binary heap, both extract-min and decrease-key operations require \(O(\log V)\) time.
|
||||||
|
Substituting \(A = \log V\) and \(B = \log V\), the total complexity becomes:
|
||||||
|
|
||||||
|
\[
|
||||||
|
O(V \log V + E \log V)
|
||||||
|
\]
|
||||||
|
|
||||||
|
For a Fibonacci heap, the extract-min operation takes \(O(\log V)\) amortized time, while the decrease-key operation requires only \(O(1)\) amortized time.
|
||||||
|
Substituting \(A = \log V\) and \(B = 1\), the total complexity becomes:
|
||||||
|
|
||||||
|
\[
|
||||||
|
O(V \log V + E)
|
||||||
|
\]
|
||||||
|
|
||||||
|
\begin{table}[H]
|
||||||
|
\begin{tabular}{llll}
|
||||||
|
\hline
|
||||||
|
Structure & Insert & Decrease-key & Extract-min \\ \hline
|
||||||
|
binary heap & $O(\log{n})$ & $O(\log{n})$ & $O(\log{n})$ \\
|
||||||
|
fibonacci heap & $O(1)$ (amortized) & $O(1)$ (amortized) & $O(\log{n})$ (amortized) \\ \hline
|
||||||
|
\end{tabular}
|
||||||
|
\caption{Time complexity of differnent heaps}
|
||||||
|
\label{tab:heaps_time_complexity}
|
||||||
|
\end{table}
|
||||||
|
|
||||||
|
Therfore, as shown in Table~\ref{tab:heaps_time_complexity}, applying binary heaps and fibonacci heaps result in total time complexity of $O(VlogV + ElogV)$ and $O(VlogV + E) amortized$.
|
||||||
|
Eventhough is reduced to , but $E$ becomes $E\log{V}$.
|
||||||
|
The reason that dijkstra with queue is faster is that most of graph data in reality are sparse data.
|
||||||
|
Sparse is opposite of dense.
|
||||||
|
Density of graph is calculated as $E/V(V-1)$.
|
||||||
|
|
||||||
|
There are also time complexity difference between different queue types.
|
||||||
|
dijkstra with binary heap has time complexity of $O(VlogV + ElogV)$ and one with fibonacci heap has time complexity of $O(VlogV + E) amortized$.
|
||||||
|
Looking without the concept of amortized, this difference comes from decrease-key operation.
|
||||||
|
|
||||||
|
However, despite this theoretical advantage, Dijkstra's algorithm implemented with a binary heap often demonstrates better runtime performance in practice.
|
||||||
|
Several empirical studies report that binary heaps outperform Fibonacci heaps in real-world implementations.
|
||||||
|
This discrepancy between theoretical complexity and practical performance motivates further investigation into the factors affecting runtime behaviour.
|
||||||
|
|
||||||
|
% \newpage
|
||||||
|
\section{Methodology}
|
||||||
|
% \begin{itemize}
|
||||||
|
% \item Experimental Environment
|
||||||
|
% \item 데이터
|
||||||
|
% \begin{itemize}
|
||||||
|
% \item Dimacs에서 추출
|
||||||
|
% \item 데이터 개수가 적음 $\rightarrow$ 실제 데이터의 형태만 파악하고 이를 바탕으로 가상 데이터 생성
|
||||||
|
% \end{itemize}
|
||||||
|
|
||||||
|
% \item 그래프 생성
|
||||||
|
% \begin{itemize}
|
||||||
|
% \item outdegree 방식
|
||||||
|
% \item 방향 그래프
|
||||||
|
% \item 평균, 분포, 밀도
|
||||||
|
% \end{itemize}
|
||||||
|
|
||||||
|
% \item 알고리즘 적용
|
||||||
|
% \begin{itemize}
|
||||||
|
% \item dijkstra w/ binary heap
|
||||||
|
% \item dijkstra w/ fibonacci heap
|
||||||
|
% \end{itemize}
|
||||||
|
|
||||||
|
% \item 측정 변수
|
||||||
|
% \begin{itemize}
|
||||||
|
% \item runtime
|
||||||
|
% \item extract\_min\_calls
|
||||||
|
% \item relax\_success (decrease\_key\_call)
|
||||||
|
% \item relax\_attempts
|
||||||
|
% \end{itemize}
|
||||||
|
|
||||||
|
% \item 분석
|
||||||
|
% \begin{itemize}
|
||||||
|
% \item correlation
|
||||||
|
% \item regression
|
||||||
|
% \end{itemize}
|
||||||
|
% \end{itemize}
|
||||||
|
|
||||||
|
\subsection{Experimental Environment}
|
||||||
|
|
||||||
|
All experiments were conducted using Python 3.12 on a Debian virtual machine running in a Proxmox Virtual Environment, configured with 4 CPU cores and 8 GB of RAM.
|
||||||
|
|
||||||
|
Both binary heap and Fibonacci heap implementations were written in Python and executed within the same codebase to ensure a fair comparison.
|
||||||
|
Only the priority queue implementation differed between the two versions of Dijkstra's algorithm.
|
||||||
|
|
||||||
|
Standard Python libraries were used for the experiments, and runtime measurements were obtained using Python's built-in timing functions.
|
||||||
|
|
||||||
|
\subsection{Thesis}
|
||||||
|
|
||||||
|
decrease-key operation takes place when the algorithm finds faster way to go to neibour nodes.
|
||||||
|
Therfore number executed can be explained as relaxation attempt success.
|
||||||
|
This value is affected by two variables; relax-attempts and relax-success-ratio.
|
||||||
|
|
||||||
|
Relaxation attempts is determined by edge numbers.
|
||||||
|
And edge number can be expressed with nodes number and density.
|
||||||
|
|
||||||
|
Relaxation success ratio may be affected by lots of variables, but distribution is significant factor.
|
||||||
|
After finding the distribution of road data, by changing its factor, find the differnce.
|
||||||
|
|
||||||
|
Therefore, the goal is to create various environments by identifying the two variables of variance and density and the correlation between them, and then to analyze whether the time taken for each operation is similar and how different the relax success is.
|
||||||
|
|
||||||
|
\subsection{Real Data}\label{subsec:real_data}
|
||||||
|
|
||||||
|
The real data to analyze is selected to the DIMACS USA dataset.
|
||||||
|
It was selected from the 9th DIMACS Implementation Challenge: Shortest Paths (2005-2006), organized by Rutgers University's Center for Discrete Mathematics and Theoretical Computer Science, with editors from Microsoft Research and AT\&T Labs Research.
|
||||||
|
The USA graph contains 23,947,347 vertices (road intersections) and 58,333,344 directed edges (road segments), derived from the U.S. Census Bureau's official TIGER/Line database. TIGER was developed in collaboration with the U.S. Geological Survey and became the first nationwide digital map of roads in the United States.
|
||||||
|
Due to its scale, real-world structure, and status as the field's de facto standard benchmark, the dataset has facilitated substantial follow-up work and better experimental standards across the shortest path research community. It has since been adopted in hundreds of peer-reviewed studies as the common basis for algorithm comparison.
|
||||||
|
|
||||||
|
Based on the (Aradhana Singh, 2025), most of road data follow log-normal distribution.
|
||||||
|
To investigate whether the edge weight distribution of the DIMACS USA road network follows a log-normal distribution, we visualized the distribution using a histogram and a Q-Q plot against the normal distribution. We additionally applied a log transformation to the edge weights and repeated the same visualizations on the transformed data. To quantitatively assess normality, we computed skewness and excess kurtosis for both the original and log-transformed distributions, using 0 as the theoretical reference value for each metric under a normal distribution.
|
||||||
|
|
||||||
|
Then, mean and vairance are calulated.
|
||||||
|
|
||||||
|
\begin{equation*}
|
||||||
|
\mu = \overline{\text{edge}}
|
||||||
|
\end{equation*}
|
||||||
|
|
||||||
|
variance was calculated using this equation.
|
||||||
|
\begin{equation*}
|
||||||
|
\text{variance} = \frac{\sum_i{(\text{edge}_i - \mu)^2}}{\text{edge}}
|
||||||
|
\end{equation*}
|
||||||
|
|
||||||
|
graph density was calculated using this equation.
|
||||||
|
\begin{equation*}
|
||||||
|
\text{density} = \frac{\text{edge}}{\text{node}\cdot(\text{node}-1)}
|
||||||
|
\end{equation*}
|
||||||
|
|
||||||
|
\subsection{Synthetic Data}
|
||||||
|
|
||||||
|
To investigate the relationship between graph structure and algorithmic behavior, it is necessary to control key variables such as the number of nodes, graph density, and edge weight distribution.
|
||||||
|
However, real-world road network data does not allow independent control of these variables, as they are inherently fixed and interdependent.
|
||||||
|
Therefore, synthetic graph data was generated based on statistical properties extracted from the real dataset.
|
||||||
|
|
||||||
|
The synthetic graphs were designed to preserve the essential characteristics of real-world road networks while enabling systematic variation of individual parameters.
|
||||||
|
In particular, the mean edge weight observed in the real dataset (approximately 2950) was rounded to 3000 for simplicity, as this difference is negligible relative to the overall scale.
|
||||||
|
The standard deviation of edge weights was varied across a range from 1000 to 16000, centered around the observed real-world value (4071), in order to examine the effect of weight dispersion on relaxation behavior.
|
||||||
|
|
||||||
|
To model the edge weight distribution, a lognormal parameterization was adopted. Empirical analysis of the real dataset showed a highly right-skewed distribution of edge weights, and the lognormal distribution provides a reasonable approximation for such positively skewed data.
|
||||||
|
Using this parameterization, edge weights were generated by specifying the mean and standard deviation, allowing controlled variation in variance while maintaining realistic distributional properties.
|
||||||
|
|
||||||
|
Graph topology was generated using an out-degree-based approach. Each vertex was assigned a number of outgoing edges determined by the target density, ensuring that the overall number of edges satisfied $E \approx d \cdot V(V-1)$, where $d$ is the density.
|
||||||
|
This method was chosen because it allows direct control over graph density while maintaining consistent local connectivity across vertices. Compared to purely random edge sampling, the out-degree approach provides a more stable and interpretable structure for analyzing algorithm behavior.
|
||||||
|
|
||||||
|
The number of nodes was varied exponentially as $[2000, 4000, 8000, 16000]$ to evaluate scalability while maintaining computational feasibility.
|
||||||
|
Similarly, density values were selected using logarithmic spacing across multiple orders of magnitude, ranging from $10^{-7}$ to $3 \times 10^{-2}$.
|
||||||
|
This logarithmic sampling was used to efficiently capture behavioral changes across both extremely sparse and moderately dense graphs, while providing sufficient intermediate resolution to identify transitional effects.
|
||||||
|
|
||||||
|
Although real-world road networks exhibit extremely low density (approximately ), such sparse graphs produce limited variation in relaxation behavior and decrease-key frequency.
|
||||||
|
Therefore, density was intentionally expanded beyond real-world values to explore a broader range of algorithmic conditions. This allows the analysis to identify how graph connectivity influences the frequency of key operations such as relaxation and decrease-key, which are central to the theoretical performance differences between heap implementations.
|
||||||
|
|
||||||
|
Overall, this synthetic data generation approach enables controlled experimentation across a wide range of graph conditions, making it possible to isolate and analyze the impact of structural and statistical variables on Dijkstra's algorithm performance.
|
||||||
|
|
||||||
|
\subsection{Algorithm Implementation}
|
||||||
|
|
||||||
|
To ensure a fair and controlled comparison between different priority queue implementations, Dijkstra's algorithm, binary heap, and Fibonacci heap were implemented from scratch in Python.
|
||||||
|
|
||||||
|
Existing library implementations were not used, as they may differ in internal optimizations, data structures, and implementation details.
|
||||||
|
Such differences could introduce uncontrolled variables into the experiment, making it difficult to isolate the effect of the underlying data structure on performance.
|
||||||
|
By implementing all components within a unified environment and following standard algorithmic definitions, the comparison focuses solely on the theoretical characteristics of each data structure.
|
||||||
|
|
||||||
|
All implementations were written using only Python's built-in features without external optimization libraries.
|
||||||
|
This ensures consistency across implementations and minimizes the influence of language-specific optimizations or hidden performance enhancements.
|
||||||
|
|
||||||
|
In addition to measuring overall runtime, several internal operation metrics were recorded to analyze the behavior of the algorithm in detail.
|
||||||
|
These metrics include:
|
||||||
|
|
||||||
|
\begin{itemize}
|
||||||
|
\item \textbf{Runtime}: Total execution time of the algorithm.
|
||||||
|
\item \textbf{Extract-min calls}: The number of times the minimum element is removed from the priority queue.
|
||||||
|
\item \textbf{Relaxation attempts}: The number of edge relaxations attempted during execution.
|
||||||
|
\item \textbf{Relaxation successes}: The number of times a shorter path is found, resulting in a distance update.
|
||||||
|
\item \textbf{Reached nodes}: The number of nodes that were reached from the source node during execution.
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
These measurements allow for a more detailed analysis beyond overall runtime, enabling the investigation of how graph structure influences the frequency of key operations such as extract-min and decrease-key.
|
||||||
|
In particular, relaxation successes correspond directly to decrease-key operations in the priority queue, providing a bridge between theoretical complexity and observed runtime behavior.
|
||||||
|
|
||||||
|
\subsection{Analysis}
|
||||||
|
|
||||||
|
Plot relationship between $E = V(V - 1) \cdot Density$ and relax attempts.
|
||||||
|
Then Find curve that fit the most.
|
||||||
|
Do same thing for variance and relax success ratio.
|
||||||
|
|
||||||
|
Calculate each operation cost using multivariate linear regression.
|
||||||
|
For each type of queue, set add,extract-main,relaxation-attempts, and decrease-key as dependent variables and runtime is independent variable.
|
||||||
|
Using data collected, find the coefficient of each dependent variables.
|
||||||
|
|
||||||
|
% \newpage
|
||||||
|
\section{Experimental results}
|
||||||
|
% \begin{itemize}
|
||||||
|
% \item real data analysis result
|
||||||
|
% \item graph synthesize variable settings
|
||||||
|
% \item graph structure experiment (Ex. sigma Vs. relax\_success\_ratio)
|
||||||
|
% \item runtime comparison
|
||||||
|
% \end{itemize}
|
||||||
|
|
||||||
|
\subsection{Real Data Properties}
|
||||||
|
|
||||||
|
This subsection reports exploratory analysis of edge weights in the DIMACS USA instance described in Section~\ref{subsec:real_data}; the conclusions inform the lognormal edge-weight specification used for synthetic graph generation.
|
||||||
|
|
||||||
|
Figure~\ref{fig:hist_original} displays the marginal distribution on the original scale, and Figure~\ref{fig:q-q_original} compares sample quantiles to those of a reference normal distribution with matching mean and variance.
|
||||||
|
The histogram is strongly right-skewed with a pronounced upper tail.
|
||||||
|
The Q-Q plot shows systematic upward curvature relative to the diagonal, indicating heavier right-tail behavior than a Gaussian model and motivating a monotone transformation of the strictly positive weights.
|
||||||
|
|
||||||
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=0.7\textwidth]{hist_original.png}
|
||||||
|
\caption{Histogram of DIMACS USA edge weights on the original scale.}
|
||||||
|
\label{fig:hist_original}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=0.7\textwidth]{Q-Q_original.png}
|
||||||
|
\caption{Normal Q-Q plot of DIMACS USA edge weights on the original scale.}
|
||||||
|
\label{fig:q-q_original}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
Figure~\ref{fig:hist_log} and Figure~\ref{fig:q-q_log} repeat the diagnostics after applying a logarithmic transformation.
|
||||||
|
The histogram becomes approximately symmetric and unimodal, and the Q-Q plot follows the reference line closely except for minor deviations in the extremes, which is consistent with approximate normality of the transformed weights and hence with a lognormal model on the original scale.
|
||||||
|
|
||||||
|
The Q-Q plot shows strong linearity across the central and upper quantiles, confirming that the log-transformed weights closely follow a normal distribution.
|
||||||
|
The left tail, however, deviates noticeably — sample quantiles cluster near zero rather than tracking the theoretical line.
|
||||||
|
This reflects a boundary effect common in lognormal distributions with large sigma, where probability mass concentrates near zero on the original scale, causing a collapse of low-end values upon log transformation.
|
||||||
|
|
||||||
|
Importantly, this deviation is confined to a small fraction of lower-end observations.
|
||||||
|
The linear trend holds across the bulk of the data, and the alignment with the reference line confirms that the distributional body satisfies the lognormal assumption.
|
||||||
|
The left-tail departure is therefore an artifact of the data generation process, not evidence against lognormality.
|
||||||
|
|
||||||
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=0.7\textwidth]{hist_log.png}
|
||||||
|
\caption{Histogram of DIMACS USA edge weights after a logarithmic transformation.}
|
||||||
|
\label{fig:hist_log}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=0.7\textwidth]{Q-Q_log.png}
|
||||||
|
\caption{Normal Q-Q plot of DIMACS USA edge weights after a logarithmic transformation.}
|
||||||
|
\label{fig:q-q_log}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
\begin{table}[H]
|
||||||
|
\centering
|
||||||
|
\begin{tabular}{lcc}
|
||||||
|
\hline
|
||||||
|
Statistic & Original & Log-transformed \\ \hline
|
||||||
|
Skewness & 4.1154 & 0.0281 \\
|
||||||
|
Excess kurtosis & 39.0225 & 0.2218 \\ \hline
|
||||||
|
\end{tabular}
|
||||||
|
\caption{Sample skewness and excess kurtosis of DIMACS USA edge weights before and after a logarithmic transformation. For a normal distribution, both quantities equal zero.}
|
||||||
|
\label{tab:skew_kurtosis_real}
|
||||||
|
\end{table}
|
||||||
|
|
||||||
|
Table~\ref{tab:skew_kurtosis_real} quantifies the change in shape: skewness and excess kurtosis both move sharply toward the normal benchmarks of zero on the transformed scale, corroborating the graphical evidence.
|
||||||
|
|
||||||
|
The empirical sample mean and sample standard deviation of the edge weights are approximately $2950$ and $4071$, respectively.
|
||||||
|
For ease of exposition and to set round nominal parameters in the synthetic experiments that follow, these estimates are represented by $3000$ and $4000$.
|
||||||
|
|
||||||
|
\subsection{Experimental Implementation}
|
||||||
|
|
||||||
|
\begin{verbatim}
|
||||||
|
nodes,density,std,sigma,trial,seed,time,algorithm,reached,extract_min_calls,relax_attempts,relax_success
|
||||||
|
2000,1e-07,1000,0.32459284597450133,1,60566251,0.0006364700384438038,binary,False,2,0,0
|
||||||
|
2000,1e-07,1000,0.32459284597450133,1,60566251,0.0012478521093726158,fibonacci,False,2,0,0
|
||||||
|
2000,1e-07,1000,0.32459284597450133,2,60566248,0.0004217512905597687,binary,False,2,0,0
|
||||||
|
2000,1e-07,1000,0.32459284597450133,2,60566248,0.0010348870418965816,fibonacci,False,2,0,0
|
||||||
|
2000,1e-07,1000,0.32459284597450133,3,60566249,0.00044644903391599655,binary,False,2,0,0
|
||||||
|
2000,1e-07,1000,0.32459284597450133,3,60566249,0.0013218028470873833,fibonacci,False,2,0,0
|
||||||
|
2000,1e-07,1000,0.32459284597450133,4,60566254,0.0004335441626608372,binary,False,2,0,0
|
||||||
|
2000,1e-07,1000,0.32459284597450133,4,60566254,0.001101895235478878,fibonacci,False,2,0,0
|
||||||
|
2000,1e-07,1000,0.32459284597450133,5,60566255,0.0004320708103477955,binary,False,2,0,0
|
||||||
|
2000,1e-07,1000,0.32459284597450133,5,60566255,0.0010821172036230564,fibonacci,False,2,0,0
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\subsection{Analysis}
|
||||||
|
|
||||||
|
\begin{verbatim}
|
||||||
|
Todo
|
||||||
|
|
||||||
|
1. 상관관계
|
||||||
|
- E <-> Relax attempts
|
||||||
|
- Density, Sigma <-> Relax success ratio
|
||||||
|
- V, Density, Sigma <-> Relax success(Decrease key)
|
||||||
|
- Decrease key <-> runtime ratio
|
||||||
|
|
||||||
|
2. 분포
|
||||||
|
- decrease key up -> runtime ratio > 1 up
|
||||||
|
-> regression result
|
||||||
|
|
||||||
|
3. calculation
|
||||||
|
- 현실 데이터 기반으로 V, Density, Sigma -> Decrease key -> runtime ratio 도출.
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
Edges and relaxation attempts show almost perfect linear relationship.
|
||||||
|
|
||||||
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=0.7\textwidth]{E_vs_relax_attempts.png}
|
||||||
|
\caption{Relationship between edges and relaxation attempts}
|
||||||
|
\label{fig:e_vs_relax_attempts}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=0.7\textwidth]{sigma_vs_relax_ratio.png}
|
||||||
|
\caption{Relationship between variance and relaxation success ratio}
|
||||||
|
\label{fig:sigma_vs_relax_ratio}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
variance and relaxation success ratio shows positve relationship.
|
||||||
|
Specifically, it looks like log or Exponential Saturation function.
|
||||||
|
|
||||||
|
Therefore, it is clear that decrease-key operations occurs more often when density or variance is higher.
|
||||||
|
|
||||||
|
However, unlike this results, in every case binary heap was faster than finonacci heap.
|
||||||
|
Therfore, regression for each operation is considered together.
|
||||||
|
|
||||||
|
Table~\ref{tab:regression_heap_ops} reports the fitted regression, and all operation coefficients except decrease-key are of comparable magnitude across heaps, as expected.
|
||||||
|
However, shockingly, there was high difference in coef decrease key in opposite direction.
|
||||||
|
Fibonacci heap tooks much more time to operate decrease-key.
|
||||||
|
There was almost 10 times difference to finish single decrease-key operation.
|
||||||
|
|
||||||
|
\begin{table}[H]
|
||||||
|
\centering
|
||||||
|
\small
|
||||||
|
\begin{tabular}{lrrrrrrr}
|
||||||
|
\hline
|
||||||
|
Heap & Intercept & Add & Extr.$\cdot\log N$ & Relax & Decrease & $R^2$ & $n$ \\ \hline
|
||||||
|
Binary & $0.000086$ & $-2.449305\times 10^{-7}$ & $2.984790\times 10^{-7}$ & $9.549140\times 10^{-8}$ & $1.762933\times 10^{-7}$ & $0.978281$ & $66972$ \\
|
||||||
|
Fibonacci & $-0.001343$ & $6.499882\times 10^{-7}$ & $3.999607\times 10^{-7}$ & $9.479877\times 10^{-8}$ & $1.579612\times 10^{-6}$ & $0.977307$ & $66972$ \\ \hline
|
||||||
|
\end{tabular}
|
||||||
|
\caption{Multivariate linear regression of wall-clock runtime (seconds) on four predictors: add-call count; extract-min calls multiplied by $\log N$ (natural logarithm of the number of nodes, as in the implementation); relaxation-attempt count; and a decrease-key term that multiplies decrease-key calls by $\log N$ for the binary heap but uses raw decrease-key calls for the Fibonacci heap. Coefficients are seconds per unit of the corresponding predictor; $n$ is the number of observations.}
|
||||||
|
\label{tab:regression_heap_ops}
|
||||||
|
\end{table}
|
||||||
|
|
||||||
|
This cause make binary heap perform better in the practice.
|
||||||
|
The reason this happens is based on how it developed.
|
||||||
|
In python binary heap is made with array. So it has small memory overhead and modifying is fast.
|
||||||
|
However, in fibonacci heap, each node is saved as individual object. This causes huge memory overhead and tooks long to modify.
|
||||||
|
|
||||||
|
Therfore there are no situation that fibonaci heap is faster.
|
||||||
|
|
||||||
|
% \newpage
|
||||||
|
\section{Discussion}
|
||||||
|
% \begin{itemize}
|
||||||
|
% \item asymptotic complexity 한계
|
||||||
|
% \item constant factor 중요성
|
||||||
|
% \item algorithm engineering 관점
|
||||||
|
% \item Python implementation 영향
|
||||||
|
% \item 다른 언어에서는 달라질 가능성
|
||||||
|
% \end{itemize}
|
||||||
|
|
||||||
|
The theoretical advantage of the Fibonacci heap in Dijkstra's algorithm arises from its lower asymptotic complexity for the decrease-key operation.
|
||||||
|
While a binary heap requires \(O(\log V)\) time for this operation, the Fibonacci heap reduces it to \(O(1)\) amortized time. Based on this analysis, the Fibonacci heap is expected to outperform the binary heap, particularly in graphs with a large number of edges.
|
||||||
|
|
||||||
|
However, the experimental results show that the binary heap consistently achieves better runtime performance than the Fibonacci heap under the tested conditions.
|
||||||
|
This discrepancy indicates that asymptotic complexity alone is insufficient to explain practical performance.
|
||||||
|
|
||||||
|
A key explanation for this phenomenon lies in the difference in constant factors associated with each data structure.
|
||||||
|
Although the Fibonacci heap has a better theoretical bound, it relies on a more complex structure involving multiple trees, pointer-based node connections, and cascading operations.
|
||||||
|
These features introduce significant overhead in each operation.
|
||||||
|
In contrast, the binary heap is implemented using a simple array-based structure, allowing efficient memory access and minimal overhead.
|
||||||
|
|
||||||
|
This difference can be interpreted through a more detailed runtime model. The total runtime of Dijkstra's algorithm can be expressed as the sum of operation counts multiplied by their respective costs:
|
||||||
|
|
||||||
|
\[
|
||||||
|
T = c_1 \cdot (\text{extract-min operations}) + c_2 \cdot (\text{decrease-key operations})
|
||||||
|
\]
|
||||||
|
|
||||||
|
where \(c_1\) and \(c_2\) represent the actual cost of each operation. Although the Fibonacci heap reduces the asymptotic cost of the decrease-key operation, the corresponding constant \(c_2\) is significantly larger due to implementation overhead.
|
||||||
|
As a result, the practical runtime is dominated by these constant factors rather than asymptotic differences.
|
||||||
|
|
||||||
|
From the perspective of algorithm engineering, this result highlights an important limitation of asymptotic analysis.
|
||||||
|
Big-O notation describes the growth rate of an algorithm but ignores constant factors and low-level implementation details, which can have a substantial impact on performance in real-world environments.
|
||||||
|
Therefore, an algorithm with better theoretical complexity does not necessarily guarantee superior practical performance.
|
||||||
|
|
||||||
|
In addition, the programming environment further amplifies these effects.
|
||||||
|
In Python, object-oriented structures and pointer-based data manipulation incur additional overhead compared to contiguous array-based structures.
|
||||||
|
The Fibonacci heap, which heavily relies on such operations, becomes less efficient in this context.
|
||||||
|
On the other hand, the binary heap benefits from Python's optimized list operations and memory locality.
|
||||||
|
|
||||||
|
It is important to note that these findings may not generalize across all programming languages.
|
||||||
|
In lower-level languages such as C or C++, where memory management and pointer operations can be more efficiently controlled, the relative performance of Fibonacci heaps may differ.
|
||||||
|
Therefore, the observed performance gap is influenced not only by the algorithm itself but also by the implementation environment.
|
||||||
|
|
||||||
|
Overall, the results suggest that the practical inefficiency of the Fibonacci heap arises not from its asymptotic complexity, but from large constant factors and implementation overhead.
|
||||||
|
This explains why binary heaps often outperform Fibonacci heaps in real-world applications of Dijkstra's algorithm, despite their inferior theoretical complexity.
|
||||||
|
|
||||||
|
% \newpage
|
||||||
|
\section{Conclusion}
|
||||||
|
% \begin{itemize}
|
||||||
|
% \item main result summary
|
||||||
|
% \item answer RQ
|
||||||
|
% \item ending
|
||||||
|
% \end{itemize}
|
||||||
|
|
||||||
|
I tried to figure about the gap between empirical practice and the time complexity theory.
|
||||||
|
|
||||||
|
Extract properties from real data and synthesize various situation.
|
||||||
|
Run dijkstra with each heap type.
|
||||||
|
|
||||||
|
In result, binary heaps outperform everytime.
|
||||||
|
This is due to the constant(coefficient).
|
||||||
|
|
||||||
|
Thererfore, it shows limitation of asymptotic time complexity theory.
|
||||||
|
|
||||||
|
However, there are limitation of the study too.
|
||||||
|
- Environment
|
||||||
|
- Data
|
||||||
|
|
||||||
|
\newpage
|
||||||
|
\printbibliography[
|
||||||
|
heading=bibintoc,
|
||||||
|
]
|
||||||
|
|
||||||
|
\end{document}
|
||||||
+101
@@ -0,0 +1,101 @@
|
|||||||
|
\documentclass{article}
|
||||||
|
\usepackage{kotex}
|
||||||
|
\usepackage{float}
|
||||||
|
\usepackage{hyperref}
|
||||||
|
\hypersetup{
|
||||||
|
pdfborder={0 0 0}
|
||||||
|
}
|
||||||
|
\usepackage{graphicx}
|
||||||
|
\graphicspath{{images/}}
|
||||||
|
|
||||||
|
\usepackage{amsmath}
|
||||||
|
|
||||||
|
\usepackage[style=apa,backend=biber]{biblatex} % 출처
|
||||||
|
\addbibresource{references.bib}
|
||||||
|
|
||||||
|
\setlength{\parindent}{0pt}
|
||||||
|
\setlength{\parskip}{0.6em}
|
||||||
|
\linespread{1.08}
|
||||||
|
|
||||||
|
\title{When Asymptotic Complexity Fails: An Empirical and Cost-Based Study of Binary and Fibonacci Heaps in Python}
|
||||||
|
\author{Seungjun Lee}
|
||||||
|
\date{\today}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
\maketitle
|
||||||
|
|
||||||
|
\newpage
|
||||||
|
|
||||||
|
\tableofcontents
|
||||||
|
|
||||||
|
\newpage
|
||||||
|
|
||||||
|
\section{Introduction}
|
||||||
|
최단 경로 문제는
|
||||||
|
|
||||||
|
\newpage
|
||||||
|
\section{Background}
|
||||||
|
|
||||||
|
\subsection{Dijkstra's algorithm}
|
||||||
|
|
||||||
|
\subsubsection*{Time Complexity}
|
||||||
|
|
||||||
|
\subsection{Priority queue}
|
||||||
|
|
||||||
|
\subsubsection*{Time Complexity}
|
||||||
|
|
||||||
|
\subsection{Runtime}
|
||||||
|
|
||||||
|
\newpage
|
||||||
|
\section{Methodology}
|
||||||
|
|
||||||
|
\subsection{Experimental Environment}
|
||||||
|
|
||||||
|
\subsection{Real data}
|
||||||
|
|
||||||
|
\subsection{Synthetic Graph Generation }
|
||||||
|
|
||||||
|
\subsection{Analysis Strategy}
|
||||||
|
|
||||||
|
\subsubsection{Decrease-key call count modeling}
|
||||||
|
|
||||||
|
\subsubsection{Operation unit cost modeling}
|
||||||
|
|
||||||
|
\subsubsection{Integrated prediction}
|
||||||
|
|
||||||
|
\subsection{Validation Metrics}
|
||||||
|
|
||||||
|
\newpage
|
||||||
|
\section{Results}
|
||||||
|
|
||||||
|
\subsection{Real data properties}
|
||||||
|
|
||||||
|
\subsection{Decrease-key Call Number Prediction}
|
||||||
|
|
||||||
|
\subsection{Operation Unit Cost Analysis}
|
||||||
|
|
||||||
|
\subsection{Integrated Runtime Prediction}
|
||||||
|
|
||||||
|
\newpage
|
||||||
|
\section{Discussion}
|
||||||
|
|
||||||
|
\subsection{Phase Transition as Regime Boundary}
|
||||||
|
|
||||||
|
\subsection{Cache Effects in Unit Cost}
|
||||||
|
|
||||||
|
\subsection{Asymptotic vs Empirical Cost}
|
||||||
|
|
||||||
|
\subsection{Limitations}
|
||||||
|
|
||||||
|
|
||||||
|
\newpage
|
||||||
|
\section{Conclustion}
|
||||||
|
|
||||||
|
\subsection{Summary of Contributions}
|
||||||
|
|
||||||
|
\subsection{Practical Implications}
|
||||||
|
|
||||||
|
\subsection{Future Work}
|
||||||
|
|
||||||
|
\end{document}
|
||||||
+308
-516
@@ -1,626 +1,418 @@
|
|||||||
\documentclass{article}
|
\documentclass{article}
|
||||||
\usepackage{kotex}
|
|
||||||
\usepackage{float}
|
\usepackage{float}
|
||||||
\usepackage{hyperref}
|
\usepackage{hyperref}
|
||||||
\hypersetup{
|
\hypersetup{
|
||||||
pdfborder={0 0 0}
|
pdfborder={0 0 0}
|
||||||
}
|
}
|
||||||
\usepackage{graphicx}
|
\usepackage{graphicx}
|
||||||
\graphicspath{{images/}}
|
\graphicspath{
|
||||||
|
{images/}
|
||||||
|
{../codes/results/synthetic_data/derived/20260421_031740/}
|
||||||
|
{../codes/results/real_data/derived/}
|
||||||
|
}
|
||||||
|
|
||||||
\usepackage{amsmath}
|
\usepackage{amsmath}
|
||||||
|
\usepackage{booktabs}
|
||||||
|
\usepackage{geometry}
|
||||||
|
\geometry{margin=2.5cm}
|
||||||
|
|
||||||
\usepackage[style=apa,backend=biber]{biblatex} % 출처
|
\usepackage[style=apa,backend=biber]{biblatex}
|
||||||
\addbibresource{references.bib}
|
\addbibresource{references.bib}
|
||||||
|
|
||||||
\setlength{\parindent}{0pt}
|
\setlength{\parindent}{0pt}
|
||||||
\setlength{\parskip}{0.6em}
|
\setlength{\parskip}{0.6em}
|
||||||
\linespread{1.08}
|
\linespread{1.08}
|
||||||
|
|
||||||
\title{When Asymptotic Complexity Fails: An Empirical and Cost-Based Study of Binary and Fibonacci Heaps in Python}
|
|
||||||
\author{Seungjun Lee}
|
|
||||||
\date{\today}
|
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
|
|
||||||
\maketitle
|
\begin{titlepage}
|
||||||
|
\centering
|
||||||
|
\vspace*{\fill}
|
||||||
|
|
||||||
|
% Title
|
||||||
|
{\Huge\bfseries Predicting Dijkstra Runtime\\[0.3em]
|
||||||
|
from Graph Properties\par}
|
||||||
|
|
||||||
|
\vspace{0.8cm}
|
||||||
|
|
||||||
|
% Subtitle
|
||||||
|
{\Large An Operation-Decomposed Model with Binary Heap\par}
|
||||||
|
|
||||||
|
\vspace{10cm}
|
||||||
|
|
||||||
|
% Author
|
||||||
|
{\large\scshape Seungjun Lee\par}
|
||||||
|
|
||||||
|
\vspace{0.4cm}
|
||||||
|
|
||||||
|
% Date
|
||||||
|
{\large April 14, 2026\par}
|
||||||
|
|
||||||
|
\vspace*{\fill}
|
||||||
|
\end{titlepage}
|
||||||
|
|
||||||
|
% \begin{abstract}
|
||||||
|
% This paper proposes an empirical model for predicting the wall-clock runtime of binary-heap-accelerated Dijkstra's algorithm using only three graph properties: node count $N$, edge density $d$, and the log-scale standard deviation of edge weights $\sigma$. The runtime is decomposed into four operation classes (add, extract-min, relax-attempt, decrease-key), each modeled separately. The relax-success ratio (RSR) --- the fraction of edge relaxations that trigger a decrease-key --- exhibits a sharp phase transition at average degree $\overline{k} = 1$, consistent with Erdős–Rényi percolation theory. Above this threshold, RSR is well described by $\mathrm{RSR} = (\sigma^2)^{a}(b\ln\overline{k} + c)$, achieving $R^2 = 0.9947$ on synthetic graphs. Operation unit costs are modeled as functions of $N$, capturing empirically observed cache effects. The integrated prediction attains $R^2 = 0.9691$, RMSE $= 57.6$~ms, and MAPE $= 30.9\%$ on the synthetic test set. Validation on DIMACS USA road-network benchmarks shows accurate decrease-key count predictions (relative error $\approx 12\%$), although total runtime is overestimated by roughly a factor of two, attributed to memory-hierarchy differences between training and validation environments.
|
||||||
|
% \end{abstract}
|
||||||
|
|
||||||
\newpage
|
\newpage
|
||||||
|
|
||||||
\tableofcontents
|
\tableofcontents
|
||||||
|
|
||||||
\newpage
|
\newpage
|
||||||
|
|
||||||
|
% ---------------------------------------------------------------
|
||||||
\section{Introduction}
|
\section{Introduction}
|
||||||
% \begin{itemize}
|
% ---------------------------------------------------------------
|
||||||
% \item Dijkstra 알고리즘 소개
|
|
||||||
% \item Priority queue 소개
|
|
||||||
% \item Binary heap 소개 (간단한 설명과 시간 복잡도)
|
|
||||||
% \item Fibonacci heap 소개 (간단한 설명과 시간 복잡도)
|
|
||||||
% \item 현실과 이론의 괴리 설명
|
|
||||||
% \item 연구 질문 명시
|
|
||||||
% \item Why does the theoretical asymptotic advantage of Fibonacci heap in Dijkstra's algorithm not translate into practical runtime improvements in Python implementations?
|
|
||||||
% \end{itemize}
|
|
||||||
|
|
||||||
Dijkstra's algorithm is widely used for finding the shortest path in graphs.
|
Shortest-path computation is fundamental to a broad class of real-world applications. Autonomous navigation in robotic systems relies on optimal path planning as a core primitive \parencite{Waga2025}, and intelligent transportation systems require fast, accurate routing for in-vehicle guidance and automated vehicle dispatch \parencite{FU20063324}. As graph sizes grow, the tension between solution quality and computation time becomes critical: exact algorithms guarantee optimality but scale poorly, while heuristic methods such as A* \parencite{4082128} sacrifice optimality for speed.
|
||||||
Its performance can be improved by implementing a priority queue.
|
|
||||||
Binary heaps and Fibonacci heaps are commonly used priority queue implementations.
|
|
||||||
Theoretically, Fibonacci heaps have a lower asymptotic time complexity than binary heaps.
|
|
||||||
However, empirical studies often show that binary heaps achieve better practical runtime performance.
|
|
||||||
Asymptotic time complexity is widely used to evaluate algorithm performance.
|
|
||||||
Investigating the gap between theoretical complexity and practical performance is therefore important.
|
|
||||||
Therefore, this study investigates why does the theoretical asymptotic advantage of Fibonacci heap in Dijkstra's algorithm not translate into practical runtime improvements in Python implementations.
|
|
||||||
|
|
||||||
% \newpage
|
Dijkstra's algorithm \parencite{Dijkstra1959} remains the canonical exact method for single-source shortest paths on non-negative-weight graphs. Despite its theoretical guarantees, practical deployment is hindered by the difficulty of predicting its runtime before execution. When graphs are large, memory consumption and processing time can be prohibitive \parencite{5359145}, yet practitioners must decide in advance whether Dijkstra is feasible for a given instance. Heuristic approaches such as A* are therefore preferred in many transportation applications \parencite{FU20063324}, even when the optimality guarantee of Dijkstra would be desirable.
|
||||||
|
|
||||||
\section{Theoretical Background}
|
This asymmetry motivates a different question: rather than replacing Dijkstra, can its runtime be predicted from observable graph properties alone, enabling informed pre-execution decisions? If so, practitioners could determine whether Dijkstra is viable for a specific instance before committing computational resources.
|
||||||
% \begin{itemize}
|
|
||||||
% \item Dijkstra 알고리즘 원리
|
|
||||||
% \begin{itemize}
|
|
||||||
% \item 특정 노드로 갈 수 있는 최단거리 계속 수정
|
|
||||||
% \item 현재 기준 가장 이동거리 짧은 노드 (여기서 priority queue 연결)
|
|
||||||
% \end{itemize}
|
|
||||||
|
|
||||||
% \item Priority queue
|
This study addresses the following research question:
|
||||||
% \begin{itemize}
|
|
||||||
% \item 이게 뭔지 설명. add, extract\_min, decrease\_key 3개 설명
|
|
||||||
% \item Binary tree
|
|
||||||
% \item Fibonacci tree
|
|
||||||
% \end{itemize}
|
|
||||||
|
|
||||||
% \item 시간 복잡도
|
\begin{quote}
|
||||||
% \begin{itemize}
|
\textit{Can the wall-clock runtime of binary-heap Dijkstra be predicted using only $N$ (node count), $d$ (edge density), and $\sigma$ (log-scale standard deviation of edge weights)?}
|
||||||
% \item 어떤 부분에서 차이가 나는지
|
\end{quote}
|
||||||
% \end{itemize}
|
|
||||||
% \end{itemize}
|
The proposed model decomposes runtime into distinct operation categories, models each component as a function of graph properties or $N$, and combines them into a closed-form prediction formula. A critical structural discovery is a phase transition at average degree $\overline{k} = 1$ that defines two fundamentally different operating regimes.
|
||||||
|
|
||||||
|
% ---------------------------------------------------------------
|
||||||
|
\section{Background}
|
||||||
|
% ---------------------------------------------------------------
|
||||||
|
|
||||||
\subsection{Dijkstra's Algorithm}
|
\subsection{Dijkstra's Algorithm}
|
||||||
|
|
||||||
Dijkstra's algorithm solves the \emph{single-source shortest-path} problem on a finite graph whose edges are assigned nonnegative real weights.
|
Dijkstra's algorithm \parencite{Dijkstra1959} solves the single-source shortest-path problem on a directed weighted graph $G = (V, E)$ with non-negative edge weights. Starting from a source vertex, it maintains a priority queue of tentative distances and iteratively extracts the minimum-distance vertex, relaxing all outgoing edges. An edge relaxation succeeds --- triggering an update --- when a shorter path to the neighbor is discovered.
|
||||||
Given a designated source vertex, the algorithm computes, for every vertex reachable from the source, the minimum total weight of any path from the source to that vertex.
|
|
||||||
The pseudocode below records a standard sequential formulation in which each iteration selects the next vertex by scanning the entire unvisited set.
|
|
||||||
|
|
||||||
\begin{verbatim}
|
\subsubsection{Time Complexity}
|
||||||
dist[v] = ∞ for all vertices v
|
|
||||||
unvisited = set of all vertices
|
|
||||||
|
|
||||||
dist[source] = 0
|
In its original array-based form, the algorithm requires $O(V^2)$ time. The bottleneck is the repeated minimum extraction, which costs $O(V)$ per iteration over $V$ iterations \parencite{Dijkstra1959}.
|
||||||
|
|
||||||
while unvisited is not empty:
|
\subsection{Priority Queue}
|
||||||
# Main loop executes once per vertex → total O(V)
|
|
||||||
|
|
||||||
cur = unvisited vertex with minimum dist[cur]
|
Replacing the linear scan with a priority queue reduces the cost of minimum extraction. Two well-studied options are the binary heap \parencite{williams1964algorithm} and the Fibonacci heap. Although Fibonacci heaps achieve superior asymptotic complexity for decrease-key ($O(1)$ amortised versus $O(\log V)$), empirical benchmarks consistently show that binary heaps outperform Fibonacci heaps in practice due to lower constant factors and better cache behaviour \parencite{Idowu2025Comparative}. This study therefore uses a binary heap implementation.
|
||||||
# Select vertex with smallest tentative distance
|
|
||||||
# Linear scan over unvisited → O(V) per iteration
|
|
||||||
|
|
||||||
if dist[cur] = ∞:
|
\subsubsection{Time Complexity}
|
||||||
break
|
|
||||||
remove cur from unvisited
|
|
||||||
|
|
||||||
for each neighbor nxt of cur:
|
With a binary heap, the standard complexity analysis yields $O((V + E)\log V)$. More precisely: each of the $V$ vertices is added once ($O(\log V)$ per add), extracted once ($O(\log V)$ per extraction), and each of the $E$ edges is relaxed. Each successful relaxation triggers a decrease-key at $O(\log V)$. Assuming every relaxation succeeds and counting $V$ decrease-keys yields $O((V + E)\log V)$.
|
||||||
# Iterate over all adjacent edges
|
|
||||||
# Total number of iterations across algorithm = O(E)
|
|
||||||
# Each iteration is counted as a relaxation attempt
|
|
||||||
|
|
||||||
cand = dist[cur] + weight(cur, nxt)
|
\subsection{Runtime Model}
|
||||||
if cand < dist[nxt]:
|
|
||||||
dist[nxt] = cand
|
|
||||||
# Relaxation success
|
|
||||||
endif
|
|
||||||
endfor
|
|
||||||
endwhile
|
|
||||||
|
|
||||||
return dist
|
The standard $O((V+E)\log V)$ bound conflates four operationally distinct contributions, omits the fraction of relax attempts that actually succeed, and absorbs all constants. This study proposes the following additive decomposition:
|
||||||
\end{verbatim}
|
|
||||||
|
|
||||||
The algorithm iterates until all vertices have been processed or there are no more connected nodes.
|
\begin{equation}
|
||||||
In each iteration, the algorithm finds the unvisited node with the shortest distance and updates the distance of its neighbors.
|
\mathrm{Runtime} = V \cdot \mathrm{UC}_1 + E \cdot \mathrm{UC}_2 + \alpha \cdot \mathrm{UC}_3
|
||||||
Then, for each neighboring node, compare the existing distance with the distance going through the current node.
|
\label{eq:runtime}
|
||||||
If going through the current node is shorter, change the distance.
|
\end{equation}
|
||||||
By doing this, the algorithm can find the shortest path from the source to all other vertices.
|
|
||||||
|
|
||||||
\subsection{Time Complexity}
|
where:
|
||||||
|
\begin{itemize}
|
||||||
|
\item $\mathrm{UC}_1 = (k_1 + k_2)\log V$: combined unit cost of one add and one extract-min (each called exactly $V$ times);
|
||||||
|
\item $\mathrm{UC}_2 = k_3$: unit cost per relax-attempt iteration (called exactly $E$ times);
|
||||||
|
\item $\mathrm{UC}_3 = k_4 \log V$: unit cost per decrease-key call;
|
||||||
|
\item $\alpha = E \times \mathrm{RSR}$: total number of decrease-key calls, where $\mathrm{RSR} \in [0,1]$ is the relax-success ratio.
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
The total time complexity of this algorithm can be calculated by summing the cost of each operation.
|
The quantities $\mathrm{RSR}$ and the three unit costs are unknowns to be estimated from data. Unlike the asymptotic bound, this model explicitly accounts for the fact that not every relax attempt triggers a decrease-key, and treats per-operation costs as functions of $N$ to capture empirical hardware effects.
|
||||||
First, the main loop repeats once for every vertex, resulting in $V$ iterations.
|
|
||||||
In each interation, it tooks $O(V)$ to find the minimum-distance unvisited vertex.
|
|
||||||
Therefore, the total cost of minimum selection is $O(V^2)$.
|
|
||||||
Additionally, during each iteration, the algorithm iterates all neighboring vertices of the current vertex.
|
|
||||||
As each edge is chosen once, neighbor examinations took total $O(E)$ times.
|
|
||||||
Combining these two, the overall time complexity becomes $O(V^2 + E)$.
|
|
||||||
|
|
||||||
\subsection{Priority Queues}
|
% ---------------------------------------------------------------
|
||||||
|
|
||||||
The pure dijkstra must scan all vertices to find the smallest distance, which takes $O(V)$ time for each iteration.
|
|
||||||
To efficiently handle this process, a priority queue is typically adopted.
|
|
||||||
|
|
||||||
A priority queue is a data structure that supports efficient extraction of the element with smallest key.
|
|
||||||
This is used in Dijkstra's algorithm to select the vertex with smallest tentative distance.
|
|
||||||
The main operations required by Dijkstra's algorithm are insert, decrease-key, and extract-min.
|
|
||||||
As different queues have distinct time complexities in each operation, the choice of priority queue implementation determines the overall time complexity of the algorithm.
|
|
||||||
|
|
||||||
\subsection{Binary heap}
|
|
||||||
|
|
||||||
A binary heap is a heap data structure that is implemented in a complete binary tree satisfying either the min-heap or max-heap property.
|
|
||||||
|
|
||||||
In Dijkstra's algorithm, it is used as a priority queue that stores vertices with their current tentative distances and supports the operations insert, decrease-key, and extract-min.
|
|
||||||
As a complete binary tree has height of $\log_{2}{V}$, restoring the heap property after an insertion or key modification requires moving a node up or down the tree by at most $\log_{2}{V}$ times.
|
|
||||||
Therefore, the insert, decrease-key, and extract-min operations each run in $O(\log{V})$ time.
|
|
||||||
|
|
||||||
\subsection{Fibonacci Heap}
|
|
||||||
|
|
||||||
To enhance the performance of the priority queue, a fibonacci heap was introduced.
|
|
||||||
|
|
||||||
A fibonacci heap is a collection of trees rather than a single tree.
|
|
||||||
Unlike a binary tree, its trees do not need to be complete binary trees.
|
|
||||||
They only need to satisfy the min-heap or max-heap property.
|
|
||||||
|
|
||||||
The Insert operation simply adds a new node to the root list and therefore run in $O(1)$ time.
|
|
||||||
|
|
||||||
The decrease-key operation cuts the modified node from its parent and move it to the root list.
|
|
||||||
If the parent has previously lost a child, a cascading cut occurs to maintain structural properties.
|
|
||||||
|
|
||||||
The extract-min operation removes the minimum node, which is tracked by a pointer.
|
|
||||||
To trach a new minimum node into the pointer, it performs consolidation process.
|
|
||||||
Although consolidation require significant work, amortized analysis shows that extract-min runs in $O(\log{n})$ time.
|
|
||||||
|
|
||||||
As a result, insert and decrease-key operations take $O(1)$ amortized time, while extract-min takes $O(\log n)$ amortized time.
|
|
||||||
|
|
||||||
\begin{verbatim}
|
|
||||||
dist[v] = ∞ for all vertices v
|
|
||||||
dist[source] = 0
|
|
||||||
|
|
||||||
queue = priority queue containing all vertices
|
|
||||||
decrease-key in queue source to 0
|
|
||||||
|
|
||||||
while queue is not empty: # O(V)
|
|
||||||
cur = extract-min from queue # Extract-min O(a)
|
|
||||||
|
|
||||||
for each neighbor nxt of cur: # Relaxation attempt O(E_cur) <- Sum(O(E_i)) = O(E)
|
|
||||||
cand = dist[cur] + weight(cur, nxt)
|
|
||||||
if cand < dist[nxt]:
|
|
||||||
dist[nxt] = cand
|
|
||||||
decrease-key in queue nxt to cand # Relaxation success O(b)
|
|
||||||
endif
|
|
||||||
endfor
|
|
||||||
endwhile
|
|
||||||
|
|
||||||
return dist
|
|
||||||
|
|
||||||
The entire process is similar to the pure dijkstra.
|
|
||||||
However, it uses priority queue to select current vertex.
|
|
||||||
\end{verbatim}
|
|
||||||
|
|
||||||
\subsection{Time Complexity}
|
|
||||||
|
|
||||||
The time complexity of Dijkstra’s algorithm with a priority queue can be expressed in a general form by separating the cost of key operations.
|
|
||||||
|
|
||||||
As in the pure version, the main loop iterates once for each vertex, resulting in \(V\) iterations. In each iteration, the algorithm performs an extract-min operation to select the current vertex. Let the cost of this operation be \(O(A)\), which depends on the choice of priority queue. Therefore, the total cost of minimum selection is \(O(AV)\).
|
|
||||||
|
|
||||||
In addition, the algorithm performs relaxation on neighboring vertices. Across the entire execution, each edge is examined once, resulting in \(E\) relaxation attempts. When a shorter path is found, a decrease-key operation is performed. Let the cost of this operation be \(O(B)\). Thus, the total cost of neighbor processing becomes \(O(BE)\).
|
|
||||||
|
|
||||||
Combining these components, the overall time complexity can be expressed as:
|
|
||||||
|
|
||||||
\[
|
|
||||||
O(AV + BE)
|
|
||||||
\]
|
|
||||||
|
|
||||||
This formulation allows the effect of different priority queue implementations to be analyzed by substituting their respective operation costs.
|
|
||||||
|
|
||||||
For a binary heap, both extract-min and decrease-key operations require \(O(\log V)\) time.
|
|
||||||
Substituting \(A = \log V\) and \(B = \log V\), the total complexity becomes:
|
|
||||||
|
|
||||||
\[
|
|
||||||
O(V \log V + E \log V)
|
|
||||||
\]
|
|
||||||
|
|
||||||
For a Fibonacci heap, the extract-min operation takes \(O(\log V)\) amortized time, while the decrease-key operation requires only \(O(1)\) amortized time.
|
|
||||||
Substituting \(A = \log V\) and \(B = 1\), the total complexity becomes:
|
|
||||||
|
|
||||||
\[
|
|
||||||
O(V \log V + E)
|
|
||||||
\]
|
|
||||||
|
|
||||||
\begin{table}[H]
|
|
||||||
\begin{tabular}{llll}
|
|
||||||
\hline
|
|
||||||
Structure & Insert & Decrease-key & Extract-min \\ \hline
|
|
||||||
binary heap & $O(\log{n})$ & $O(\log{n})$ & $O(\log{n})$ \\
|
|
||||||
fibonacci heap & $O(1)$ (amortized) & $O(1)$ (amortized) & $O(\log{n})$ (amortized) \\ \hline
|
|
||||||
\end{tabular}
|
|
||||||
\caption{Time complexity of differnent heaps}
|
|
||||||
\label{tab:heaps_time_complexity}
|
|
||||||
\end{table}
|
|
||||||
|
|
||||||
Therfore, as shown in Table~\ref{tab:heaps_time_complexity}, applying binary heaps and fibonacci heaps result in total time complexity of $O(VlogV + ElogV)$ and $O(VlogV + E) amortized$.
|
|
||||||
Eventhough is reduced to , but $E$ becomes $E\log{V}$.
|
|
||||||
The reason that dijkstra with queue is faster is that most of graph data in reality are sparse data.
|
|
||||||
Sparse is opposite of dense.
|
|
||||||
Density of graph is calculated as $E/V(V-1)$.
|
|
||||||
|
|
||||||
There are also time complexity difference between different queue types.
|
|
||||||
dijkstra with binary heap has time complexity of $O(VlogV + ElogV)$ and one with fibonacci heap has time complexity of $O(VlogV + E) amortized$.
|
|
||||||
Looking without the concept of amortized, this difference comes from decrease-key operation.
|
|
||||||
|
|
||||||
However, despite this theoretical advantage, Dijkstra's algorithm implemented with a binary heap often demonstrates better runtime performance in practice.
|
|
||||||
Several empirical studies report that binary heaps outperform Fibonacci heaps in real-world implementations.
|
|
||||||
This discrepancy between theoretical complexity and practical performance motivates further investigation into the factors affecting runtime behaviour.
|
|
||||||
|
|
||||||
% \newpage
|
|
||||||
\section{Methodology}
|
\section{Methodology}
|
||||||
% \begin{itemize}
|
% ---------------------------------------------------------------
|
||||||
% \item Experimental Environment
|
|
||||||
% \item 데이터
|
|
||||||
% \begin{itemize}
|
|
||||||
% \item Dimacs에서 추출
|
|
||||||
% \item 데이터 개수가 적음 $\rightarrow$ 실제 데이터의 형태만 파악하고 이를 바탕으로 가상 데이터 생성
|
|
||||||
% \end{itemize}
|
|
||||||
|
|
||||||
% \item 그래프 생성
|
\subsection{Research Hypotheses}
|
||||||
% \begin{itemize}
|
|
||||||
% \item outdegree 방식
|
|
||||||
% \item 방향 그래프
|
|
||||||
% \item 평균, 분포, 밀도
|
|
||||||
% \end{itemize}
|
|
||||||
|
|
||||||
% \item 알고리즘 적용
|
Three hierarchical hypotheses guide the analysis:
|
||||||
% \begin{itemize}
|
|
||||||
% \item dijkstra w/ binary heap
|
|
||||||
% \item dijkstra w/ fibonacci heap
|
|
||||||
% \end{itemize}
|
|
||||||
|
|
||||||
% \item 측정 변수
|
\begin{description}
|
||||||
% \begin{itemize}
|
\item[H1] The relax-success ratio RSR is a deterministic function of $(N, d, \sigma)$.
|
||||||
% \item runtime
|
\item[H2] Operation unit costs are functions of $N$ alone.
|
||||||
% \item extract\_min\_calls
|
\item[H3] Combining the RSR model and the unit-cost models yields accurate runtime predictions.
|
||||||
% \item relax\_success (decrease\_key\_call)
|
\end{description}
|
||||||
% \item relax\_attempts
|
|
||||||
% \end{itemize}
|
|
||||||
|
|
||||||
% \item 분석
|
|
||||||
% \begin{itemize}
|
|
||||||
% \item correlation
|
|
||||||
% \item regression
|
|
||||||
% \end{itemize}
|
|
||||||
% \end{itemize}
|
|
||||||
|
|
||||||
\subsection{Experimental Environment}
|
\subsection{Experimental Environment}
|
||||||
|
|
||||||
All experiments were conducted using Python 3.12 on a Debian virtual machine running in a Proxmox Virtual Environment, configured with 4 CPU cores and 8 GB of RAM.
|
All experiments were conducted on a Debian virtual machine with four CPU cores and 8~GB RAM. Dijkstra's algorithm and the binary heap were implemented from scratch in Python~3.12 to avoid library-level optimisations that would obscure per-operation costs. Wall-clock time was measured for the complete execution of each Dijkstra call.
|
||||||
|
|
||||||
Both binary heap and Fibonacci heap implementations were written in Python and executed within the same codebase to ensure a fair comparison.
|
\subsection{Real Data}
|
||||||
Only the priority queue implementation differed between the two versions of Dijkstra's algorithm.
|
|
||||||
|
|
||||||
Standard Python libraries were used for the experiments, and runtime measurements were obtained using Python's built-in timing functions.
|
The DIMACS USA road-distance benchmark \parencite{SINGH2025130901} provides eleven road-network graphs ranging from 264,346 nodes (New York) to 23,947,347 nodes (full USA). These graphs served as a validation target representing real-world conditions.
|
||||||
|
|
||||||
\subsection{Thesis}
|
Edge-weight distributions were characterised for each graph. As shown in Figure~\ref{fig:hist_log}, the log-transformed weights closely follow a normal distribution, confirming lognormal structure \parencite{SINGH2025130901}. The Q--Q plot in Figure~\ref{fig:qq_log} corroborates this finding. Summary statistics across graphs yield a typical log-scale standard deviation $\sigma \approx 0.75$--$1.12$ and density $d \approx 10^{-7}$--$10^{-5}$, parameters that fall within the synthetic training range.
|
||||||
|
|
||||||
decrease-key operation takes place when the algorithm finds faster way to go to neibour nodes.
|
\begin{figure}[H]
|
||||||
Therfore number executed can be explained as relaxation attempt success.
|
\centering
|
||||||
This value is affected by two variables; relax-attempts and relax-success-ratio.
|
\begin{minipage}{0.45\textwidth}
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=\linewidth]{hist_log.png}
|
||||||
|
\caption{Histogram of log-transformed edge weights for a representative DIMACS graph (BAY). The distribution closely follows a normal curve, confirming lognormal structure.}
|
||||||
|
\label{fig:hist_log}
|
||||||
|
\end{minipage}
|
||||||
|
\hfill
|
||||||
|
\begin{minipage}{0.45\textwidth}
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=\linewidth]{Q-Q_log.png}
|
||||||
|
\caption{Q--Q plot of log-transformed weights against the normal quantiles. Points align tightly with the diagonal, further supporting lognormality.}
|
||||||
|
\label{fig:qq_log}
|
||||||
|
\end{minipage}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
Relaxation attempts is determined by edge numbers.
|
\subsection{Synthetic Graph Generation}
|
||||||
And edge number can be expressed with nodes number and density.
|
|
||||||
|
|
||||||
Relaxation success ratio may be affected by lots of variables, but distribution is significant factor.
|
|
||||||
After finding the distribution of road data, by changing its factor, find the differnce.
|
|
||||||
|
|
||||||
Therefore, the goal is to create various environments by identifying the two variables of variance and density and the correlation between them, and then to analyze whether the time taken for each operation is similar and how different the relax success is.
|
|
||||||
|
|
||||||
\subsection{Real Data}\label{subsec:real_data}
|
|
||||||
|
|
||||||
The real data to analyze is selected to the DIMACS USA dataset.
|
|
||||||
It was selected from the 9th DIMACS Implementation Challenge: Shortest Paths (2005-2006), organized by Rutgers University's Center for Discrete Mathematics and Theoretical Computer Science, with editors from Microsoft Research and AT\&T Labs Research.
|
|
||||||
The USA graph contains 23,947,347 vertices (road intersections) and 58,333,344 directed edges (road segments), derived from the U.S. Census Bureau's official TIGER/Line database. TIGER was developed in collaboration with the U.S. Geological Survey and became the first nationwide digital map of roads in the United States.
|
|
||||||
Due to its scale, real-world structure, and status as the field's de facto standard benchmark, the dataset has facilitated substantial follow-up work and better experimental standards across the shortest path research community. It has since been adopted in hundreds of peer-reviewed studies as the common basis for algorithm comparison.
|
|
||||||
|
|
||||||
Based on the (Aradhana Singh, 2025), most of road data follow log-normal distribution.
|
|
||||||
To investigate whether the edge weight distribution of the DIMACS USA road network follows a log-normal distribution, we visualized the distribution using a histogram and a Q-Q plot against the normal distribution. We additionally applied a log transformation to the edge weights and repeated the same visualizations on the transformed data. To quantitatively assess normality, we computed skewness and excess kurtosis for both the original and log-transformed distributions, using 0 as the theoretical reference value for each metric under a normal distribution.
|
|
||||||
|
|
||||||
Then, mean and vairance are calulated.
|
|
||||||
|
|
||||||
\begin{equation*}
|
|
||||||
\mu = \overline{\text{edge}}
|
|
||||||
\end{equation*}
|
|
||||||
|
|
||||||
variance was calculated using this equation.
|
|
||||||
\begin{equation*}
|
|
||||||
\text{variance} = \frac{\sum_i{(\text{edge}_i - \mu)^2}}{\text{edge}}
|
|
||||||
\end{equation*}
|
|
||||||
|
|
||||||
graph density was calculated using this equation.
|
|
||||||
\begin{equation*}
|
|
||||||
\text{density} = \frac{\text{edge}}{\text{node}\cdot(\text{node}-1)}
|
|
||||||
\end{equation*}
|
|
||||||
|
|
||||||
\subsection{Synthetic Data}
|
|
||||||
|
|
||||||
To investigate the relationship between graph structure and algorithmic behavior, it is necessary to control key variables such as the number of nodes, graph density, and edge weight distribution.
|
|
||||||
However, real-world road network data does not allow independent control of these variables, as they are inherently fixed and interdependent.
|
|
||||||
Therefore, synthetic graph data was generated based on statistical properties extracted from the real dataset.
|
|
||||||
|
|
||||||
The synthetic graphs were designed to preserve the essential characteristics of real-world road networks while enabling systematic variation of individual parameters.
|
|
||||||
In particular, the mean edge weight observed in the real dataset (approximately 2950) was rounded to 3000 for simplicity, as this difference is negligible relative to the overall scale.
|
|
||||||
The standard deviation of edge weights was varied across a range from 1000 to 16000, centered around the observed real-world value (4071), in order to examine the effect of weight dispersion on relaxation behavior.
|
|
||||||
|
|
||||||
To model the edge weight distribution, a lognormal parameterization was adopted. Empirical analysis of the real dataset showed a highly right-skewed distribution of edge weights, and the lognormal distribution provides a reasonable approximation for such positively skewed data.
|
|
||||||
Using this parameterization, edge weights were generated by specifying the mean and standard deviation, allowing controlled variation in variance while maintaining realistic distributional properties.
|
|
||||||
|
|
||||||
Graph topology was generated using an out-degree-based approach. Each vertex was assigned a number of outgoing edges determined by the target density, ensuring that the overall number of edges satisfied $E \approx d \cdot V(V-1)$, where $d$ is the density.
|
|
||||||
This method was chosen because it allows direct control over graph density while maintaining consistent local connectivity across vertices. Compared to purely random edge sampling, the out-degree approach provides a more stable and interpretable structure for analyzing algorithm behavior.
|
|
||||||
|
|
||||||
The number of nodes was varied exponentially as $[2000, 4000, 8000, 16000]$ to evaluate scalability while maintaining computational feasibility.
|
|
||||||
Similarly, density values were selected using logarithmic spacing across multiple orders of magnitude, ranging from $10^{-7}$ to $3 \times 10^{-2}$.
|
|
||||||
This logarithmic sampling was used to efficiently capture behavioral changes across both extremely sparse and moderately dense graphs, while providing sufficient intermediate resolution to identify transitional effects.
|
|
||||||
|
|
||||||
Although real-world road networks exhibit extremely low density (approximately ), such sparse graphs produce limited variation in relaxation behavior and decrease-key frequency.
|
|
||||||
Therefore, density was intentionally expanded beyond real-world values to explore a broader range of algorithmic conditions. This allows the analysis to identify how graph connectivity influences the frequency of key operations such as relaxation and decrease-key, which are central to the theoretical performance differences between heap implementations.
|
|
||||||
|
|
||||||
Overall, this synthetic data generation approach enables controlled experimentation across a wide range of graph conditions, making it possible to isolate and analyze the impact of structural and statistical variables on Dijkstra's algorithm performance.
|
|
||||||
|
|
||||||
\subsection{Algorithm Implementation}
|
|
||||||
|
|
||||||
To ensure a fair and controlled comparison between different priority queue implementations, Dijkstra's algorithm, binary heap, and Fibonacci heap were implemented from scratch in Python.
|
|
||||||
|
|
||||||
Existing library implementations were not used, as they may differ in internal optimizations, data structures, and implementation details.
|
|
||||||
Such differences could introduce uncontrolled variables into the experiment, making it difficult to isolate the effect of the underlying data structure on performance.
|
|
||||||
By implementing all components within a unified environment and following standard algorithmic definitions, the comparison focuses solely on the theoretical characteristics of each data structure.
|
|
||||||
|
|
||||||
All implementations were written using only Python's built-in features without external optimization libraries.
|
|
||||||
This ensures consistency across implementations and minimizes the influence of language-specific optimizations or hidden performance enhancements.
|
|
||||||
|
|
||||||
In addition to measuring overall runtime, several internal operation metrics were recorded to analyze the behavior of the algorithm in detail.
|
|
||||||
These metrics include:
|
|
||||||
|
|
||||||
|
Synthetic Erdős–Rényi random graphs were generated with the following parameter grid:
|
||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
\item \textbf{Runtime}: Total execution time of the algorithm.
|
\item $N \in \{2000, 4000, 6000, \ldots, 20000\}$ (10 levels);
|
||||||
\item \textbf{Extract-min calls}: The number of times the minimum element is removed from the priority queue.
|
\item $d \in \{10^{-7}, 3 \times 10^{-7}, 10^{-6}, \ldots, 0.03\}$ (12 levels, logarithmically spaced);
|
||||||
\item \textbf{Relaxation attempts}: The number of edge relaxations attempted during execution.
|
\item $\sigma \in \{0.32, 0.47, 0.61, 0.83, 1.01, 1.27, 1.45, 1.68, 1.84\}$ (9 levels, corresponding to raw-scale standard deviations $\{1000, 1700, 2000, 3000, 4000, 6000, 8000, 12000, 16000\}$ at mean~3000).
|
||||||
\item \textbf{Relaxation successes}: The number of times a shorter path is found, resulting in a distance update.
|
|
||||||
\item \textbf{Reached nodes}: The number of nodes that were reached from the source node during execution.
|
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
|
|
||||||
These measurements allow for a more detailed analysis beyond overall runtime, enabling the investigation of how graph structure influences the frequency of key operations such as extract-min and decrease-key.
|
Edge weights were drawn from a lognormal distribution with the specified $\sigma$ and mean~3000. Each $(N, d, \sigma)$ combination was tested with 400 independent trials, yielding a total of 864,000 measurements. The parameter ranges were chosen to bracket the DIMACS graphs and cover both sparse and moderately dense regimes. Graphs with fewer than two connected components were retained to ensure Dijkstra visits a substantial fraction of vertices.
|
||||||
In particular, relaxation successes correspond directly to decrease-key operations in the priority queue, providing a bridge between theoretical complexity and observed runtime behavior.
|
|
||||||
|
|
||||||
\subsection{Analysis}
|
\subsection{Analysis Strategy}
|
||||||
|
|
||||||
Plot relationship between $E = V(V - 1) \cdot Density$ and relax attempts.
|
\subsubsection{Decrease-Key Call Count ($\alpha$) Modelling}
|
||||||
Then Find curve that fit the most.
|
|
||||||
Do same thing for variance and relax success ratio.
|
|
||||||
|
|
||||||
Calculate each operation cost using multivariate linear regression.
|
The decrease-key call count $\alpha$ is decomposed as $\alpha = E \times \mathrm{RSR}$. Since $E = d \cdot N(N-1)$ is exactly determined by $d$ and $N$, the modelling task reduces to estimating RSR.
|
||||||
For each type of queue, set add,extract-main,relaxation-attempts, and decrease-key as dependent variables and runtime is independent variable.
|
|
||||||
Using data collected, find the coefficient of each dependent variables.
|
|
||||||
|
|
||||||
% \newpage
|
Plotting RSR against average degree $\overline{k} = (N-1) \cdot d$ reveals a sharp phase transition at $\overline{k} = 1$ (Figure~\ref{fig:phase_hist}): for $\overline{k} \ll 1$ (subcritical regime), graphs are nearly trees or disconnected, so almost every relaxation succeeds and RSR $\approx 1$; for $\overline{k} \gg 1$ (supercritical regime), the graph is well-connected and RSR decays with increasing density and edge-weight spread.
|
||||||
\section{Experimental results}
|
|
||||||
% \begin{itemize}
|
This transition corresponds directly to the Erdős–Rényi percolation threshold \parencite{erdos1960evolution}, where a giant connected component emerges at $\overline{k} = 1$.
|
||||||
% \item real data analysis result
|
|
||||||
% \item graph synthesize variable settings
|
In the supercritical regime ($\overline{k} \geq 1$), controlled experiments confirm that $\sigma$ and $\overline{k}$ act independently on RSR. Their effects are combined multiplicatively:
|
||||||
% \item graph structure experiment (Ex. sigma Vs. relax\_success\_ratio)
|
|
||||||
% \item runtime comparison
|
\begin{equation}
|
||||||
% \end{itemize}
|
\mathrm{RSR} = (\sigma^2)^{a} \cdot (b \ln \overline{k} + c), \quad \overline{k} \geq 1
|
||||||
|
\label{eq:rsr}
|
||||||
|
\end{equation}
|
||||||
|
|
||||||
|
Nonlinear least-squares regression on the supercritical subset yields $R^2 = 0.9947$.
|
||||||
|
|
||||||
|
\subsubsection{Operation Unit Cost Modelling}
|
||||||
|
|
||||||
|
Fitting a single regression of Runtime on $V$, $E$, and $\alpha$ across all $N$ causes severe multicollinearity (VIF $> 10$) because $V$, $E$, and $\alpha$ are all functions of $N$. To circumvent this, a separate linear regression is fitted for each distinct $N$:
|
||||||
|
|
||||||
|
\begin{equation}
|
||||||
|
\mathrm{Runtime}(N) = \beta_0(N) + E \cdot k_3(N) + \alpha \cdot k_4(N)
|
||||||
|
\end{equation}
|
||||||
|
|
||||||
|
This extracts per-$N$ estimates of $k_3$ and $k_4$, verifying VIF $< 3.5$ within each stratum.
|
||||||
|
|
||||||
|
The extracted coefficients are then regressed against $N$:
|
||||||
|
\begin{itemize}
|
||||||
|
\item $k_3(N)$: the relax-attempt cost decreases with $N$ following an exponential-decay model $k_3 = a_3 e^{-N/N_0} + c_3$ ($R^2 = 0.953$), attributed to CPU cache effects at small $N$.
|
||||||
|
\item $k_4(N)$: the decrease-key cost grows with heap height as $k_4 \log V$, confirming the theoretical $O(\log V)$ scaling ($R^2 = 0.951$).
|
||||||
|
\item $\beta_0(N)$ (intercept capturing $V \cdot \mathrm{UC}_1$): noisy due to collinearity with $V$; a per-$N$ median is used as a constant.
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
\subsubsection{Integrated Prediction}
|
||||||
|
|
||||||
|
The final predictor combines Equations~\eqref{eq:runtime} and~\eqref{eq:rsr}:
|
||||||
|
|
||||||
|
\begin{equation}
|
||||||
|
\hat{t} = V \cdot \hat{\mathrm{UC}}_1 + E \cdot \hat{k}_3(N) + \hat{\alpha} \cdot \hat{k}_4(N) \cdot \log V
|
||||||
|
\end{equation}
|
||||||
|
|
||||||
|
where $\hat{\alpha} = E \times \widehat{\mathrm{RSR}}(N, d, \sigma)$ and each unit-cost function is evaluated at the query $N$.
|
||||||
|
|
||||||
|
\subsection{Validation Metrics}
|
||||||
|
|
||||||
|
Model performance is reported using four metrics: coefficient of determination ($R^2$), root mean squared error (RMSE), mean absolute error (MAE), and mean absolute percentage error (MAPE). MAPE is included because runtime values span several orders of magnitude across the parameter grid.
|
||||||
|
|
||||||
|
% ---------------------------------------------------------------
|
||||||
|
\section{Results}
|
||||||
|
% ---------------------------------------------------------------
|
||||||
|
|
||||||
\subsection{Real Data Properties}
|
\subsection{Real Data Properties}
|
||||||
|
|
||||||
This subsection reports exploratory analysis of edge weights in the DIMACS USA instance described in Section~\ref{subsec:real_data}; the conclusions inform the lognormal edge-weight specification used for synthetic graph generation.
|
Table~\ref{tab:dimacs} summarises key statistics for the DIMACS road graphs. All eleven graphs exhibit lognormal edge-weight distributions (Figures~\ref{fig:hist_log} and~\ref{fig:qq_log}). Log-scale standard deviations range from $\sigma = 0.75$ (New York) to $\sigma = 1.12$ (California), with densities $d \approx 10^{-7}$--$10^{-5}$. All graphs fall in the supercritical regime ($\overline{k} \gg 1$), making Equation~\eqref{eq:rsr} directly applicable.
|
||||||
|
|
||||||
Figure~\ref{fig:hist_original} displays the marginal distribution on the original scale, and Figure~\ref{fig:q-q_original} compares sample quantiles to those of a reference normal distribution with matching mean and variance.
|
|
||||||
The histogram is strongly right-skewed with a pronounced upper tail.
|
|
||||||
The Q-Q plot shows systematic upward curvature relative to the diagonal, indicating heavier right-tail behavior than a Gaussian model and motivating a monotone transformation of the strictly positive weights.
|
|
||||||
|
|
||||||
\begin{figure}[H]
|
|
||||||
\centering
|
|
||||||
\includegraphics[width=0.7\textwidth]{hist_original.png}
|
|
||||||
\caption{Histogram of DIMACS USA edge weights on the original scale.}
|
|
||||||
\label{fig:hist_original}
|
|
||||||
\end{figure}
|
|
||||||
|
|
||||||
\begin{figure}[H]
|
|
||||||
\centering
|
|
||||||
\includegraphics[width=0.7\textwidth]{Q-Q_original.png}
|
|
||||||
\caption{Normal Q-Q plot of DIMACS USA edge weights on the original scale.}
|
|
||||||
\label{fig:q-q_original}
|
|
||||||
\end{figure}
|
|
||||||
|
|
||||||
Figure~\ref{fig:hist_log} and Figure~\ref{fig:q-q_log} repeat the diagnostics after applying a logarithmic transformation.
|
|
||||||
The histogram becomes approximately symmetric and unimodal, and the Q-Q plot follows the reference line closely except for minor deviations in the extremes, which is consistent with approximate normality of the transformed weights and hence with a lognormal model on the original scale.
|
|
||||||
|
|
||||||
The Q-Q plot shows strong linearity across the central and upper quantiles, confirming that the log-transformed weights closely follow a normal distribution.
|
|
||||||
The left tail, however, deviates noticeably — sample quantiles cluster near zero rather than tracking the theoretical line.
|
|
||||||
This reflects a boundary effect common in lognormal distributions with large sigma, where probability mass concentrates near zero on the original scale, causing a collapse of low-end values upon log transformation.
|
|
||||||
|
|
||||||
Importantly, this deviation is confined to a small fraction of lower-end observations.
|
|
||||||
The linear trend holds across the bulk of the data, and the alignment with the reference line confirms that the distributional body satisfies the lognormal assumption.
|
|
||||||
The left-tail departure is therefore an artifact of the data generation process, not evidence against lognormality.
|
|
||||||
|
|
||||||
\begin{figure}[H]
|
|
||||||
\centering
|
|
||||||
\includegraphics[width=0.7\textwidth]{hist_log.png}
|
|
||||||
\caption{Histogram of DIMACS USA edge weights after a logarithmic transformation.}
|
|
||||||
\label{fig:hist_log}
|
|
||||||
\end{figure}
|
|
||||||
|
|
||||||
\begin{figure}[H]
|
|
||||||
\centering
|
|
||||||
\includegraphics[width=0.7\textwidth]{Q-Q_log.png}
|
|
||||||
\caption{Normal Q-Q plot of DIMACS USA edge weights after a logarithmic transformation.}
|
|
||||||
\label{fig:q-q_log}
|
|
||||||
\end{figure}
|
|
||||||
|
|
||||||
\begin{table}[H]
|
\begin{table}[H]
|
||||||
\centering
|
\centering
|
||||||
\begin{tabular}{lcc}
|
\caption{Summary statistics for selected DIMACS road-network graphs.}
|
||||||
\hline
|
\label{tab:dimacs}
|
||||||
Statistic & Original & Log-transformed \\ \hline
|
\begin{tabular}{lrrrr}
|
||||||
Skewness & 4.1154 & 0.0281 \\
|
\toprule
|
||||||
Excess kurtosis & 39.0225 & 0.2218 \\ \hline
|
Graph & $N$ & $d$ & $\sigma$ & $\overline{k}$ \\
|
||||||
\end{tabular}
|
\midrule
|
||||||
\caption{Sample skewness and excess kurtosis of DIMACS USA edge weights before and after a logarithmic transformation. For a normal distribution, both quantities equal zero.}
|
NY & 264,346 & $1.05 \times 10^{-5}$ & 0.75 & 2.78 \\
|
||||||
\label{tab:skew_kurtosis_real}
|
BAY & 321,270 & $7.75 \times 10^{-6}$ & 1.07 & 2.49 \\
|
||||||
|
COL & 435,666 & $5.57 \times 10^{-6}$ & 1.10 & 2.43 \\
|
||||||
|
FLA & 1,070,376 & $2.37 \times 10^{-6}$ & 1.05 & 2.53 \\
|
||||||
|
NE & 1,524,453 & $1.68 \times 10^{-6}$ & 0.93 & 2.56 \\
|
||||||
|
CAL & 1,890,815 & $1.30 \times 10^{-6}$ & 1.12 & 2.46 \\
|
||||||
|
\bottomrule
|
||||||
|
\end{tabular}
|
||||||
\end{table}
|
\end{table}
|
||||||
|
|
||||||
Table~\ref{tab:skew_kurtosis_real} quantifies the change in shape: skewness and excess kurtosis both move sharply toward the normal benchmarks of zero on the transformed scale, corroborating the graphical evidence.
|
\subsection{Decrease-Key Call Number Prediction}
|
||||||
|
|
||||||
The empirical sample mean and sample standard deviation of the edge weights are approximately $2950$ and $4071$, respectively.
|
\textbf{Step 1: Phase transition.}
|
||||||
For ease of exposition and to set round nominal parameters in the synthetic experiments that follow, these estimates are represented by $3000$ and $4000$.
|
Figure~\ref{fig:phase_hist} shows the distribution of samples across the two regimes. The subcritical regime ($\overline{k} < 1$) comprises a minority of the experimental grid; most practically relevant graphs (including all DIMACS instances) are supercritical.
|
||||||
|
|
||||||
\subsection{Experimental Implementation}
|
|
||||||
|
|
||||||
\begin{verbatim}
|
|
||||||
nodes,density,std,sigma,trial,seed,time,algorithm,reached,extract_min_calls,relax_attempts,relax_success
|
|
||||||
2000,1e-07,1000,0.32459284597450133,1,60566251,0.0006364700384438038,binary,False,2,0,0
|
|
||||||
2000,1e-07,1000,0.32459284597450133,1,60566251,0.0012478521093726158,fibonacci,False,2,0,0
|
|
||||||
2000,1e-07,1000,0.32459284597450133,2,60566248,0.0004217512905597687,binary,False,2,0,0
|
|
||||||
2000,1e-07,1000,0.32459284597450133,2,60566248,0.0010348870418965816,fibonacci,False,2,0,0
|
|
||||||
2000,1e-07,1000,0.32459284597450133,3,60566249,0.00044644903391599655,binary,False,2,0,0
|
|
||||||
2000,1e-07,1000,0.32459284597450133,3,60566249,0.0013218028470873833,fibonacci,False,2,0,0
|
|
||||||
2000,1e-07,1000,0.32459284597450133,4,60566254,0.0004335441626608372,binary,False,2,0,0
|
|
||||||
2000,1e-07,1000,0.32459284597450133,4,60566254,0.001101895235478878,fibonacci,False,2,0,0
|
|
||||||
2000,1e-07,1000,0.32459284597450133,5,60566255,0.0004320708103477955,binary,False,2,0,0
|
|
||||||
2000,1e-07,1000,0.32459284597450133,5,60566255,0.0010821172036230564,fibonacci,False,2,0,0
|
|
||||||
\end{verbatim}
|
|
||||||
|
|
||||||
\subsection{Analysis}
|
|
||||||
|
|
||||||
\begin{verbatim}
|
|
||||||
Todo
|
|
||||||
|
|
||||||
1. 상관관계
|
|
||||||
- E <-> Relax attempts
|
|
||||||
- Density, Sigma <-> Relax success ratio
|
|
||||||
- V, Density, Sigma <-> Relax success(Decrease key)
|
|
||||||
- Decrease key <-> runtime ratio
|
|
||||||
|
|
||||||
2. 분포
|
|
||||||
- decrease key up -> runtime ratio > 1 up
|
|
||||||
-> regression result
|
|
||||||
|
|
||||||
3. calculation
|
|
||||||
- 현실 데이터 기반으로 V, Density, Sigma -> Decrease key -> runtime ratio 도출.
|
|
||||||
\end{verbatim}
|
|
||||||
|
|
||||||
Edges and relaxation attempts show almost perfect linear relationship.
|
|
||||||
|
|
||||||
\begin{figure}[H]
|
\begin{figure}[H]
|
||||||
\centering
|
\centering
|
||||||
\includegraphics[width=0.7\textwidth]{E_vs_relax_attempts.png}
|
\includegraphics[width=0.6\linewidth]{call_number_analysis/regime_distribution/phase_histogram.png}
|
||||||
\caption{Relationship between edges and relaxation attempts}
|
\caption{Distribution of $(N, d, \sigma)$ samples across subcritical ($\overline{k} < 1$) and supercritical ($\overline{k} \geq 1$) regimes. The vertical dashed line marks the phase-transition threshold at $\overline{k} = 1$.}
|
||||||
\label{fig:e_vs_relax_attempts}
|
\label{fig:phase_hist}
|
||||||
\end{figure}
|
\end{figure}
|
||||||
|
|
||||||
|
\textbf{Step 2: $E$ as a function of $d$ and $N$.}
|
||||||
|
By construction, $E = d \cdot N(N-1)$, yielding $R^2 = 1.000$ (Figure~\ref{fig:e_relax}). No modelling is required for this component.
|
||||||
|
|
||||||
\begin{figure}[H]
|
\begin{figure}[H]
|
||||||
\centering
|
\centering
|
||||||
\includegraphics[width=0.7\textwidth]{sigma_vs_relax_ratio.png}
|
\includegraphics[width=0.55\linewidth]{E_vs_relax_attempts.png}
|
||||||
\caption{Relationship between variance and relaxation success ratio}
|
\caption{Total edge count $E$ versus total relax attempts. The relationship is exact ($R^2 = 1.00$), confirming that every edge is relaxed exactly once.}
|
||||||
\label{fig:sigma_vs_relax_ratio}
|
\label{fig:e_relax}
|
||||||
\end{figure}
|
\end{figure}
|
||||||
|
|
||||||
variance and relaxation success ratio shows positve relationship.
|
\textbf{Step 3: RSR model.}
|
||||||
Specifically, it looks like log or Exponential Saturation function.
|
In the supercritical regime, RSR is modelled by Equation~\eqref{eq:rsr}. Figure~\ref{fig:rsr_model} compares predicted and observed RSR values. The nonlinear model captures $97\%$ of variance ($R^2 = 0.9947$), demonstrating that $\sigma$ and $\overline{k}$ together explain RSR with high fidelity.
|
||||||
|
|
||||||
Therefore, it is clear that decrease-key operations occurs more often when density or variance is higher.
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=0.6\linewidth]{call_number_analysis/nonlinear_regression/predicted_vs_actual.png}
|
||||||
|
\caption{Predicted versus actual RSR under the nonlinear model (Eq.~\ref{eq:rsr}). Points cluster tightly around the diagonal ($R^2 = 0.9947$).}
|
||||||
|
\label{fig:rsr_model}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
However, unlike this results, in every case binary heap was faster than finonacci heap.
|
\textbf{Step 4: Sigma effect.}
|
||||||
Therfore, regression for each operation is considered together.
|
Figure~\ref{fig:sigma_rsr} illustrates the monotone decrease of RSR with $\sigma$, holding $\overline{k}$ fixed: higher weight variance creates more opportunities for distance improvements, paradoxically resulting in fewer successful updates because early paths to most nodes are already near-optimal.
|
||||||
|
|
||||||
Table~\ref{tab:regression_heap_ops} reports the fitted regression, and all operation coefficients except decrease-key are of comparable magnitude across heaps, as expected.
|
\begin{figure}[H]
|
||||||
However, shockingly, there was high difference in coef decrease key in opposite direction.
|
\centering
|
||||||
Fibonacci heap tooks much more time to operate decrease-key.
|
\includegraphics[width=0.55\linewidth]{sigma_vs_relax_ratio.png}
|
||||||
There was almost 10 times difference to finish single decrease-key operation.
|
\caption{RSR as a function of $\sigma$ (fixed $\overline{k}$). RSR decreases monotonically as $\sigma$ increases, consistent with the power-law component in Equation~\eqref{eq:rsr}.}
|
||||||
|
\label{fig:sigma_rsr}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
\subsection{Operation Unit Cost Analysis}
|
||||||
|
|
||||||
|
\textbf{Relax-attempt cost $k_3(N)$.}
|
||||||
|
Figure~\ref{fig:k3} shows $k_3$ estimates plotted against $N$. Despite the $O(1)$ theoretical prediction, $k_3$ decreases with $N$ and levels off, well described by the exponential-decay model ($R^2 = 0.953$). This counter-intuitive finding is interpreted as a cache warm-up effect: for small $N$ the heap fits entirely in L1/L2 cache, while for larger $N$ cache effects approach saturation, yielding a constant marginal cost.
|
||||||
|
|
||||||
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=0.55\linewidth]{processing_time_analysis/k3_vs_N.png}
|
||||||
|
\caption{Per-$N$ estimates of the relax-attempt unit cost $k_3$ with the fitted exponential-decay curve. The monotone decrease with $N$ is attributed to cache effects.}
|
||||||
|
\label{fig:k3}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
\textbf{Decrease-key cost $k_4(N)$.}
|
||||||
|
The decrease-key cost grows proportionally to $\log V$, as Figure~\ref{fig:k4} confirms ($R^2 = 0.951$). This is consistent with binary-heap theory: each decrease-key performs at most $\lceil \log_2 V \rceil$ comparisons and swaps.
|
||||||
|
|
||||||
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=0.55\linewidth]{processing_time_analysis/l_vs_N.png}
|
||||||
|
\caption{Decrease-key unit cost coefficient $k_4$ as a function of $N$, with the fitted $a \log V + b$ curve ($R^2 = 0.951$), consistent with the $O(\log V)$ theoretical prediction.}
|
||||||
|
\label{fig:k4}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
\textbf{Operation contribution.}
|
||||||
|
Figure~\ref{fig:contribution} decomposes total runtime into three components across $N$. The relax-attempt term $E \cdot k_3$ contributes 55--65\% of total runtime and dominates throughout. The decrease-key term $\alpha \cdot k_4 \log V$ contributes 22--44\%, increasing with $N$ as the heap height grows. The add-plus-extract term $V \cdot \mathrm{UC}_1$ contributes only 1--15\%.
|
||||||
|
|
||||||
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=0.6\linewidth]{processing_time_analysis/contribution_vs_N.png}
|
||||||
|
\caption{Fractional contribution of each operation class to total runtime as a function of $N$. The relax-attempt term dominates at all sizes.}
|
||||||
|
\label{fig:contribution}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
\subsection{Integrated Runtime Prediction}
|
||||||
|
|
||||||
|
\textbf{Synthetic validation.}
|
||||||
|
Figure~\ref{fig:synth_pred} plots predicted against measured runtimes for all synthetic test instances. The integrated model achieves $R^2 = 0.9691$, RMSE $= 57.6$~ms, MAE $= 35.1$~ms, and MAPE $= 30.9\%$. Predictions are reliable across most of the parameter space; the largest relative errors occur at very small $N$ (where the intercept term is least stable) and at the phase-transition boundary.
|
||||||
|
|
||||||
|
\begin{figure}[H]
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=0.6\linewidth]{prediction_result/predicted_vs_real.png}
|
||||||
|
\caption{Predicted versus actual runtime (ms) on the synthetic test set ($R^2 = 0.9691$, RMSE $= 57.6$~ms). The dashed line is the ideal prediction ($\hat{t} = t$).}
|
||||||
|
\label{fig:synth_pred}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
\textbf{DIMACS validation.}
|
||||||
|
Table~\ref{tab:dimacs_pred} compares predicted and measured runtimes for DIMACS graphs. Decrease-key call counts are predicted with a relative error of approximately 12\% (mean across graphs), indicating that the RSR model generalises well beyond the training distribution. However, total runtime is overestimated by roughly a factor of two. Figure~\ref{fig:comparison} illustrates this systematic overestimation.
|
||||||
|
|
||||||
\begin{table}[H]
|
\begin{table}[H]
|
||||||
\centering
|
\centering
|
||||||
\small
|
\caption{Runtime prediction on DIMACS validation graphs. Relax count relative error $\approx 12\%$; runtime overestimated by $\sim 2\times$.}
|
||||||
\begin{tabular}{lrrrrrrr}
|
\label{tab:dimacs_pred}
|
||||||
\hline
|
\begin{tabular}{lrrrrr}
|
||||||
Heap & Intercept & Add & Extr.$\cdot\log N$ & Relax & Decrease & $R^2$ & $n$ \\ \hline
|
\toprule
|
||||||
Binary & $0.000086$ & $-2.449305\times 10^{-7}$ & $2.984790\times 10^{-7}$ & $9.549140\times 10^{-8}$ & $1.762933\times 10^{-7}$ & $0.978281$ & $66972$ \\
|
Graph & $N$ & Actual $t$ (s) & Predicted $t$ (s) & Runtime rel.\ err. & Relax rel.\ err.\\
|
||||||
Fibonacci & $-0.001343$ & $6.499882\times 10^{-7}$ & $3.999607\times 10^{-7}$ & $9.479877\times 10^{-8}$ & $1.579612\times 10^{-6}$ & $0.977307$ & $66972$ \\ \hline
|
\midrule
|
||||||
\end{tabular}
|
NY & 264K & 1.23 & 2.70 & 1.20 & 0.08 \\
|
||||||
\caption{Multivariate linear regression of wall-clock runtime (seconds) on four predictors: add-call count; extract-min calls multiplied by $\log N$ (natural logarithm of the number of nodes, as in the implementation); relaxation-attempt count; and a decrease-key term that multiplies decrease-key calls by $\log N$ for the binary heap but uses raw decrease-key calls for the Fibonacci heap. Coefficients are seconds per unit of the corresponding predictor; $n$ is the number of observations.}
|
BAY & 321K & 1.45 & 3.37 & 1.33 & 0.12 \\
|
||||||
\label{tab:regression_heap_ops}
|
COL & 436K & 2.11 & 4.79 & 1.28 & 0.13 \\
|
||||||
|
FLA & 1.07M & 5.88 & 13.67 & 1.32 & 0.11 \\
|
||||||
|
NE & 1.52M & 9.24 & 20.36 & 1.20 & 0.11 \\
|
||||||
|
CAL & 1.89M & 11.77 & 26.03 & 1.21 & 0.12 \\
|
||||||
|
\bottomrule
|
||||||
|
\end{tabular}
|
||||||
\end{table}
|
\end{table}
|
||||||
|
|
||||||
This cause make binary heap perform better in the practice.
|
\begin{figure}[H]
|
||||||
The reason this happens is based on how it developed.
|
\centering
|
||||||
In python binary heap is made with array. So it has small memory overhead and modifying is fast.
|
\includegraphics[width=0.6\linewidth]{comparison/comparison_plot.png}
|
||||||
However, in fibonacci heap, each node is saved as individual object. This causes huge memory overhead and tooks long to modify.
|
\caption{Predicted versus actual runtime on DIMACS validation graphs. The model systematically overestimates by $\approx 2\times$, attributed to memory-hierarchy effects not captured in training.}
|
||||||
|
\label{fig:comparison}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
Therfore there are no situation that fibonaci heap is faster.
|
% ---------------------------------------------------------------
|
||||||
|
|
||||||
% \newpage
|
|
||||||
\section{Discussion}
|
\section{Discussion}
|
||||||
% \begin{itemize}
|
% ---------------------------------------------------------------
|
||||||
% \item asymptotic complexity 한계
|
|
||||||
% \item constant factor 중요성
|
|
||||||
% \item algorithm engineering 관점
|
|
||||||
% \item Python implementation 영향
|
|
||||||
% \item 다른 언어에서는 달라질 가능성
|
|
||||||
% \end{itemize}
|
|
||||||
|
|
||||||
The theoretical advantage of the Fibonacci heap in Dijkstra's algorithm arises from its lower asymptotic complexity for the decrease-key operation.
|
\subsection{Phase Transition as Regime Boundary}
|
||||||
While a binary heap requires \(O(\log V)\) time for this operation, the Fibonacci heap reduces it to \(O(1)\) amortized time. Based on this analysis, the Fibonacci heap is expected to outperform the binary heap, particularly in graphs with a large number of edges.
|
|
||||||
|
|
||||||
However, the experimental results show that the binary heap consistently achieves better runtime performance than the Fibonacci heap under the tested conditions.
|
The discovery that $\overline{k} = 1$ separates two qualitatively different RSR behaviours is not accidental. Erdős and Rényi \parencite{erdos1960evolution} proved that random graphs undergo a structural phase transition at this threshold: below $\overline{k} = 1$ the graph consists of small isolated components, while above it a giant connected component of size $\Theta(N)$ emerges. In the subcritical regime, Dijkstra visits few vertices and almost every relaxation discovers a genuinely shorter path, so RSR $\approx 1$. In the supercritical regime, the algorithm traverses a large connected component and encounters many redundant relaxation attempts, driving RSR below 1.
|
||||||
This discrepancy indicates that asymptotic complexity alone is insufficient to explain practical performance.
|
|
||||||
|
|
||||||
A key explanation for this phenomenon lies in the difference in constant factors associated with each data structure.
|
This structural boundary has practical implications: a separate model is necessary for the subcritical regime. Road networks universally satisfy $\overline{k} > 1$ (typical values 2--3 as shown in Table~\ref{tab:dimacs}), so Equation~\eqref{eq:rsr} is directly applicable without regime detection.
|
||||||
Although the Fibonacci heap has a better theoretical bound, it relies on a more complex structure involving multiple trees, pointer-based node connections, and cascading operations.
|
|
||||||
These features introduce significant overhead in each operation.
|
|
||||||
In contrast, the binary heap is implemented using a simple array-based structure, allowing efficient memory access and minimal overhead.
|
|
||||||
|
|
||||||
This difference can be interpreted through a more detailed runtime model. The total runtime of Dijkstra's algorithm can be expressed as the sum of operation counts multiplied by their respective costs:
|
\subsection{Cache Effects in Unit Cost}
|
||||||
|
|
||||||
\[
|
The empirical finding that $k_3$ \textit{decreases} with $N$ contradicts the $O(1)$ asymptotic prediction. For small $N$, the heap is small enough to reside in CPU cache, enabling rapid access; however, the overhead of Python interpreter dispatch is proportionally larger relative to the actual heap work. As $N$ increases, per-element memory access costs stabilise, yielding a lower effective $k_3$. The exponential-decay fit captures this transition well ($R^2 = 0.953$), but the inferred curve is specific to the Python~3.12 interpreter and the 8~GB VM environment. In compiled languages or on machines with different cache hierarchies, $k_3$ would follow a different trajectory.
|
||||||
T = c_1 \cdot (\text{extract-min operations}) + c_2 \cdot (\text{decrease-key operations})
|
|
||||||
\]
|
|
||||||
|
|
||||||
where \(c_1\) and \(c_2\) represent the actual cost of each operation. Although the Fibonacci heap reduces the asymptotic cost of the decrease-key operation, the corresponding constant \(c_2\) is significantly larger due to implementation overhead.
|
\subsection{Asymptotic vs Empirical Cost}
|
||||||
As a result, the practical runtime is dominated by these constant factors rather than asymptotic differences.
|
|
||||||
|
|
||||||
From the perspective of algorithm engineering, this result highlights an important limitation of asymptotic analysis.
|
The standard complexity $O((V+E)\log V)$ implicitly assumes: (i) every relax attempt succeeds, (ii) all $V$ decrease-keys occur, and (iii) unit costs are constant. The results challenge all three assumptions. RSR can be as low as 0.05 in dense, high-variance graphs, reducing decrease-key calls by a factor of 20 relative to the pessimistic bound. Furthermore, both $k_3$ and $k_4$ vary with $N$, reflecting hardware-level phenomena absent from asymptotic analysis. The decomposed model in Equation~\eqref{eq:runtime} captures these realities and achieves substantially better predictive accuracy than the asymptotic formula alone would permit.
|
||||||
Big-O notation describes the growth rate of an algorithm but ignores constant factors and low-level implementation details, which can have a substantial impact on performance in real-world environments.
|
|
||||||
Therefore, an algorithm with better theoretical complexity does not necessarily guarantee superior practical performance.
|
|
||||||
|
|
||||||
In addition, the programming environment further amplifies these effects.
|
\subsection{Limitations}
|
||||||
In Python, object-oriented structures and pointer-based data manipulation incur additional overhead compared to contiguous array-based structures.
|
|
||||||
The Fibonacci heap, which heavily relies on such operations, becomes less efficient in this context.
|
|
||||||
On the other hand, the binary heap benefits from Python's optimized list operations and memory locality.
|
|
||||||
|
|
||||||
It is important to note that these findings may not generalize across all programming languages.
|
Several limitations constrain the generalisability of the results:
|
||||||
In lower-level languages such as C or C++, where memory management and pointer operations can be more efficiently controlled, the relative performance of Fibonacci heaps may differ.
|
|
||||||
Therefore, the observed performance gap is influenced not only by the algorithm itself but also by the implementation environment.
|
|
||||||
|
|
||||||
Overall, the results suggest that the practical inefficiency of the Fibonacci heap arises not from its asymptotic complexity, but from large constant factors and implementation overhead.
|
\textbf{Language and environment.} All measurements were obtained with a Python~3.12 implementation on a single Debian VM. The unit-cost coefficients $k_3$ and $k_4$ are environment-specific. The RSR model (Equation~\ref{eq:rsr}) is implementation-independent and should transfer across languages, but the runtime prediction requires re-fitting unit costs in any new environment.
|
||||||
This explains why binary heaps often outperform Fibonacci heaps in real-world applications of Dijkstra's algorithm, despite their inferior theoretical complexity.
|
|
||||||
|
|
||||||
% \newpage
|
\textbf{Node-count range.} Training was conducted for $N \leq 20{,}000$, while DIMACS graphs contain up to 23 million nodes. Extrapolation of the unit-cost curves beyond the training range introduces systematic bias, as evidenced by the $\approx 2\times$ overestimation on DIMACS.
|
||||||
|
|
||||||
|
\textbf{Memory hierarchy.} Training graphs fit comfortably in RAM with no paging, while large DIMACS graphs may trigger memory pressure effects. The training unit costs therefore underestimate real hardware costs at scale, resulting in overestimated predicted runtimes when the unit-cost model infers lower cost per operation than actually observed.
|
||||||
|
|
||||||
|
\textbf{Graph model.} Synthetic graphs follow the Erdős–Rényi random model. Real road networks possess spatial embedding, planarity, and degree-distribution properties \parencite{SINGH2025130901} that the random model does not capture. The RSR model nonetheless generalises well to DIMACS, suggesting robustness to structural differences at this level.
|
||||||
|
|
||||||
|
% ---------------------------------------------------------------
|
||||||
\section{Conclusion}
|
\section{Conclusion}
|
||||||
% \begin{itemize}
|
% ---------------------------------------------------------------
|
||||||
% \item main result summary
|
|
||||||
% \item answer RQ
|
|
||||||
% \item ending
|
|
||||||
% \end{itemize}
|
|
||||||
|
|
||||||
I tried to figure about the gap between empirical practice and the time complexity theory.
|
\subsection{Summary of Contributions}
|
||||||
|
|
||||||
Extract properties from real data and synthesize various situation.
|
This study demonstrates that the wall-clock runtime of binary-heap Dijkstra can be predicted from three graph properties $(N, d, \sigma)$ through an operation-decomposed model. Three main findings emerge:
|
||||||
Run dijkstra with each heap type.
|
|
||||||
|
|
||||||
In result, binary heaps outperform everytime.
|
\begin{enumerate}
|
||||||
This is due to the constant(coefficient).
|
\item \textbf{Phase transition as structural boundary.} Average degree $\overline{k} = 1$ determines the operating regime of RSR, consistent with Erdős–Rényi percolation theory. This boundary must be respected by any runtime model.
|
||||||
|
\item \textbf{Accurate RSR prediction.} The multiplicative model $\mathrm{RSR} = (\sigma^2)^a(b\ln\overline{k} + c)$ achieves $R^2 = 0.9947$ on synthetic data and generalises to DIMACS road networks with approximately 12\% relative error on decrease-key counts.
|
||||||
|
\item \textbf{Empirically calibrated unit costs.} Per-operation costs deviate systematically from theoretical $O(1)$ predictions due to cache effects, necessitating environment-specific calibration.
|
||||||
|
\end{enumerate}
|
||||||
|
|
||||||
Thererfore, it shows limitation of asymptotic time complexity theory.
|
\subsection{Practical Implications}
|
||||||
|
|
||||||
However, there are limitation of the study too.
|
The most practically transferable result is the RSR model. Because decrease-key call counts depend only on graph topology and weight distribution --- not on implementation language or hardware --- the model provides a portable tool for estimating algorithmic workload before execution. A practitioner with knowledge of $N$, $d$, and $\sigma$ can compute $\hat{\alpha}$ and assess whether Dijkstra is feasible, independent of the execution environment.
|
||||||
- Environment
|
|
||||||
- Data
|
For environments where unit costs can be calibrated through short benchmark runs, the full integrated model offers runtime estimates with MAPE of approximately 31\% on the synthetic domain. While this precision may be insufficient for hard real-time scheduling, it is adequate for coarse feasibility assessment and resource allocation decisions.
|
||||||
|
|
||||||
|
\subsection{Future Work}
|
||||||
|
|
||||||
|
Four directions merit further investigation. First, extending the training range to $N > 100{,}000$ would allow direct calibration at scales relevant to real road networks, potentially closing the factor-of-two gap observed on DIMACS. Second, profiling cache-miss rates alongside runtime measurements would enable explicit modelling of memory-hierarchy effects, yielding hardware-portable cost functions. Third, the subcritical regime ($\overline{k} < 1$) requires a separate model; developing a unified formulation across both regimes would broaden applicability. Fourth, extending the framework to compiled implementations (C++, Java) would test whether the RSR model transfers while confirming that only unit costs require recalibration.
|
||||||
|
|
||||||
\newpage
|
\newpage
|
||||||
\printbibliography[
|
\printbibliography
|
||||||
heading=bibintoc,
|
|
||||||
]
|
|
||||||
|
|
||||||
\end{document}
|
\end{document}
|
||||||
|
|||||||
+100
-3
@@ -1,8 +1,105 @@
|
|||||||
@article{idowu_2025,
|
@Article{Dijkstra1959,
|
||||||
|
author = {Dijkstra, E. W.},
|
||||||
|
title = {A note on two problems in connexion with graphs},
|
||||||
|
journal = {Numerische Mathematik},
|
||||||
|
year = {1959},
|
||||||
|
month = {Dec},
|
||||||
|
volume = {1},
|
||||||
|
number = {1},
|
||||||
|
pages = {269--271},
|
||||||
|
issn = {0945-3245},
|
||||||
|
doi = {10.1007/BF01386390},
|
||||||
|
url = {https://doi.org/10.1007/BF01386390}
|
||||||
|
}
|
||||||
|
|
||||||
|
@article{williams1964algorithm,
|
||||||
|
title = {Algorithm 232: heapsort},
|
||||||
|
author = {Williams, John William Joseph},
|
||||||
|
journal = {Communications of the ACM},
|
||||||
|
volume = {7},
|
||||||
|
number = {6},
|
||||||
|
pages = {347--348},
|
||||||
|
year = {1964},
|
||||||
|
publisher = {ACM New York, NY, USA}
|
||||||
|
}
|
||||||
|
|
||||||
|
@article{Idowu2025Comparative,
|
||||||
author = {Idowu, Abel Iyanda and Olabiyisi, Stephen Olatunde and Alo, Oluwaseun Olubisi and Adeleke, Israel Adewale and Jokotoye, Ayoade Alade and Omotade, Adedotun Lawrence},
|
author = {Idowu, Abel Iyanda and Olabiyisi, Stephen Olatunde and Alo, Oluwaseun Olubisi and Adeleke, Israel Adewale and Jokotoye, Ayoade Alade and Omotade, Adedotun Lawrence},
|
||||||
number = {8},
|
|
||||||
title = {Comparative Performance Analysis of Some Priority Queue Variants in Dijkstra's Algorithm},
|
title = {Comparative Performance Analysis of Some Priority Queue Variants in Dijkstra's Algorithm},
|
||||||
|
journal = {International Journal of Research and Scientific Innovation},
|
||||||
volume = {12},
|
volume = {12},
|
||||||
|
number = {8},
|
||||||
year = {2025},
|
year = {2025},
|
||||||
|
doi = {10.51244/IJRSI.2025.120800078},
|
||||||
url = {https://doi.org/10.51244/IJRSI.2025.120800078}
|
url = {https://doi.org/10.51244/IJRSI.2025.120800078}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@article{SINGH2025130901,
|
||||||
|
title = {Role of spatial embedding and planarity in shaping the topology of the Street Networks},
|
||||||
|
journal = {Physica A: Statistical Mechanics and its Applications},
|
||||||
|
volume = {677},
|
||||||
|
pages = {130901},
|
||||||
|
year = {2025},
|
||||||
|
issn = {0378-4371},
|
||||||
|
doi = {10.1016/j.physa.2025.130901},
|
||||||
|
url = {https://www.sciencedirect.com/science/article/pii/S0378437125005539},
|
||||||
|
author = {Aradhana Singh and Ritish Khetarpal and Amod Rai}
|
||||||
|
}
|
||||||
|
|
||||||
|
@article{FU20063324,
|
||||||
|
title = {Heuristic shortest path algorithms for transportation applications: State of the art},
|
||||||
|
journal = {Computers \& Operations Research},
|
||||||
|
volume = {33},
|
||||||
|
number = {11},
|
||||||
|
pages = {3324--3343},
|
||||||
|
year = {2006},
|
||||||
|
issn = {0305-0548},
|
||||||
|
doi = {10.1016/j.cor.2005.03.027},
|
||||||
|
url = {https://www.sciencedirect.com/science/article/pii/S030505480500122X},
|
||||||
|
author = {L. Fu and D. Sun and L.R. Rilett}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Article{Waga2025,
|
||||||
|
author = {Waga, Abderrahim and Benhlima, Said and Bekri, Ali and Abdouni, Jawad and Saber, Fatima Zahrae},
|
||||||
|
title = {A survey on autonomous navigation for mobile robots: From traditional techniques to deep learning and large language models},
|
||||||
|
journal = {Journal of King Saud University Computer and Information Sciences},
|
||||||
|
year = {2025},
|
||||||
|
month = {Aug},
|
||||||
|
volume = {37},
|
||||||
|
number = {7},
|
||||||
|
pages = {198},
|
||||||
|
issn = {2213-1248},
|
||||||
|
doi = {10.1007/s44443-025-00216-x},
|
||||||
|
url = {https://doi.org/10.1007/s44443-025-00216-x}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ARTICLE{4082128,
|
||||||
|
author = {Hart, Peter E. and Nilsson, Nils J. and Raphael, Bertram},
|
||||||
|
journal = {IEEE Transactions on Systems Science and Cybernetics},
|
||||||
|
title = {A Formal Basis for the Heuristic Determination of Minimum Cost Paths},
|
||||||
|
year = {1968},
|
||||||
|
volume = {4},
|
||||||
|
number = {2},
|
||||||
|
pages = {100--107},
|
||||||
|
doi = {10.1109/TSSC.1968.300136}
|
||||||
|
}
|
||||||
|
|
||||||
|
@INPROCEEDINGS{5359145,
|
||||||
|
author = {Fuhao, Zhang and Jiping, Liu},
|
||||||
|
booktitle = {2009 Sixth International Conference on Fuzzy Systems and Knowledge Discovery},
|
||||||
|
title = {An Algorithm of Shortest Path Based on Dijkstra for Huge Data},
|
||||||
|
year = {2009},
|
||||||
|
volume = {4},
|
||||||
|
pages = {244--247},
|
||||||
|
doi = {10.1109/FSKD.2009.848}
|
||||||
|
}
|
||||||
|
|
||||||
|
@article{erdos1960evolution,
|
||||||
|
author = {P. Erd{\H{o}}s and A. R{\'e}nyi},
|
||||||
|
title = {On the Evolution of Random Graphs},
|
||||||
|
journal = {Publications of the Mathematical Institute of the Hungarian Academy of Sciences},
|
||||||
|
volume = {5},
|
||||||
|
number = {1},
|
||||||
|
pages = {17--60},
|
||||||
|
year = {1960}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user