diff options
| author | Navid Samanghoon <nsama24@student.sdu.dk> | 2025-10-29 11:12:33 +0100 |
|---|---|---|
| committer | mithe24 <mithe24@student.sdu.dk> | 2025-10-29 13:49:57 +0100 |
| commit | 4f32bac5784b7f4676115e07693d64139080c287 (patch) | |
| tree | c55385c6f3f85b24d1e59ad867f805991e992d49 /report | |
| parent | 60b51d9d651765afd440556289235efd60d2858b (diff) | |
| download | sorter-4f32bac5784b7f4676115e07693d64139080c287.tar.gz sorter-4f32bac5784b7f4676115e07693d64139080c287.zip | |
Why insertion-sort and quick-sort
Diffstat (limited to '')
| -rw-r--r-- | report/report.tex | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/report/report.tex b/report/report.tex index b14fcab..83eee63 100644 --- a/report/report.tex +++ b/report/report.tex @@ -60,9 +60,7 @@ instruction level execution, making Assembly an excellent environment for benchmarking and performance analysis. Two sorting algorithms quicksort and insertionsort will be implemented and -compared against each other. Quicksort is expected to excel on large random -datasets, while insertionsort is more suitable for small or nearly sorted -cases. Several test instances consisting of uniformly random coordinates will be +compared against each other. Several test instances consisting of uniformly random coordinates will be created with the goal of comparing the implementations actual runtime to their theoretical runtimes and evaluate each implementation. @@ -87,6 +85,17 @@ good with random data, but bad when the data is sorted, and that reason, and beause it makes testing different algorithms easiers, the program will be able to run with different algorithms passed as arguments. +\subsection{Why Insertion-sort and Quick-sort?} +Insertion sort and quick sort have been handpicked to research the trade-offs +between algorithmic simplicity and computational efficiency. Furthermore, +these algorithms are widely different in nature. Insertion sort is an iterative +algorithm, depending primarily on memory usage, registers, and program flow, +while quick sort is a recursive algorithm using the divide and conquer approach. +This is interesting, because a Quicksort is expected to excel on large random +datasets, while insertion sort is more suitable for small or nearly sorted +cases, which is another great motivation to understand what is really +happening when these algorithms are executed, and how the dataset affects them. + \subsection{Format when sorting} In order to be a little more general, and make our program easily expandable to different types of data, we wanted to create our own array datatype, that @@ -149,7 +158,7 @@ summary of the design. \begin{figure}[H] \centering - \includegraphics[width=\linewidth]{design.drawio.png} + \includegraphics[width=\linewidth]{Design.drawio.png} \caption{Program flow} \label{fig:flowchart} \end{figure} |