initReport.tex 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. \documentclass[11pt]{article}
  2. \usepackage{enumerate}
  3. \begin{document}
  4. \begin{center}
  5. {\Large \textbf{CS41 Final Project Online Algorithms}}\\
  6. {\large \textbf{Initial Report and Proposed Action Plan}} \\
  7. \textbf{Tahmid Rahman, Dylan Jeffers}
  8. \end{center}
  9. \vspace{4 mm}
  10. {\textbf{Initial Report}}
  11. \vspace{2mm}
  12. Splay trees are an interesting binary search tree variant that
  13. self-adjusts to minimize the lookup time for recently accessed items by moving frequently used nodes nearer to its root, taking
  14. advantage of locality of reference. In industry, this tree provides
  15. practical advantages for important cache and garbage collection
  16. algorithms.
  17. Splay trees are part of a field known as online algorithms because the
  18. algorithms that govern their behavior don’t generally know the entire
  19. input beforehand (how can a tree know exactly what items will be
  20. searched for?). When analyzing online algorithms, its common to
  21. look at how the offline counterpart to the algorithm compares.
  22. Such a comparison is maintained via the competitive ratio. Splay
  23. trees have an interesting and yet unproven fact regarding their
  24. competitive ratio to binary search trees. Known as the Dynamic
  25. Optimality conjecture and formalized by Sleator and Tarjan,
  26. splay trees are thought to be O(1) competitive
  27. to any offline rotational-based search trees for long enough
  28. search sequences.
  29. Our final project does not necessarily involve proving this
  30. conjecture. Instead, we will work to provide experimental
  31. data backing up this conjecture by creating our own
  32. version of a splay tree. We will then theoretically analyze
  33. our splay tree and give an argument more akin to the
  34. kinds of arguments we’ve been making in class so far
  35. as to why our data shows what it shows.\\
  36. \textbf{Detailed motivation for our plan:}
  37. \vspace{2mm}
  38. Splay trees, as mentioned above, have many advantages.
  39. For example, they require little bookkeeping data, and it's
  40. possible to use past versions after an update, requiring amortized
  41. $O(\log n)$ space per update. However, they also come
  42. with the significant disadvantage of having a worst case linear height,
  43. which can occur if all n elements are accessed in
  44. non-decreasing order. Our primary objective for this final project is to
  45. design and implement a new splay tree that solves this issue by decreasing
  46. its overall height to some factor of $\log n$. To do so, we plan to incorporate an
  47. AVL-Tree implementation into our splay tree to help balance the lower
  48. sections of our tree, minimizing the total height.\\
  49. Once implemented, we will run tests to determine the query speed between
  50. a traditional Splay tree, a traditional AVL Tree, and our Splay/AVL Tree.
  51. To test each tree's performance, we plan to systematically vary each tree's
  52. input size and it's level of randomness. Finally we will plot these
  53. performances and determine the sets of input that each tree performs best.
  54. We hope to see our algorithm smooth the edges between the positives of a
  55. traditional splay tree and AVL tree, giving an overall runtime faster than
  56. most AVL trees that can work over a larger set of inputs than a traditional
  57. Splay tree.\\
  58. \textbf{Further Research:}
  59. \vspace{2mm}
  60. For our project, we designed a splay tree that minimizes worst case height using an AVL tree implementation. We also will show how different binary trees perform better given different input. Such data could determine just how beneficial (or feasible) it might be to have a preprocessing pattern recognition algorithm. If there’s a way to efficiently run a pattern recognition algorithm as queries are made, then it might be possible to implement a tree that goes back and forth between activating splaying options (for example, if we’re accessing all the nodes, one after the other, there’s really no point in moving the previously accessed nodes further up). In essence, someone could create a data structure containing multiple tree algorithms that could alternate control to take advantage of this variance.\\
  61. {\textbf{Proposed Action Plan}}
  62. \vspace{2mm}
  63. \begin{enumerate}[I]
  64. \item {Week 1: April 10th - April 17th
  65. \begin{enumerate}[(a)]
  66. \item Read one to two academic papers on online algorithms: \emph{"Dyamic Optimality--Almost"}
  67. \item Create outline for our paper
  68. \item Implement the foundation of splay tree data structure.
  69. \end{enumerate}
  70. }
  71. \item {Week 2: April 17th - April 24th
  72. \begin{enumerate}[(a)]
  73. \item Read another one to two academic papers.
  74. \item Write rough draft of main sections of paper.
  75. \item Understand MIT professor Erik Demaine’s Online BST implementation.
  76. \item Finish standard splay tree implementation, including testing.
  77. \item Consider ways of making our splay tree faster.
  78. \item (We might go to you with a lot of questions/ seek advice around this time)
  79. \end{enumerate}}
  80. \item{Week 3: April 24th - May 1st
  81. \begin{enumerate}[(a)]
  82. \item Read another one academic paper.
  83. \item Test our new splay/ALV tree, comparing it against other BSTs
  84. \item Compile and analyze our data
  85. \item Final Draft including out testing conclusions.
  86. \item Commented splay tree code
  87. \end{enumerate}}
  88. \end{enumerate}
  89. \end{document}