Advertisement
josell

Untitled

Oct 1st, 2012
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 55.73 KB | None | 0 0
  1. I INTRODUCTION 1
  2. 1 Design Principles 3
  3. 1.1 Object-Oriented Design and This Book . . . . . . . . . . . . . . . . . . . . . . . 4
  4. 1.2 Encapsulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
  5. 1.3 Invariants and Representation Properties . . . . . . . . . . . . . . . . . . . . . . 6
  6. 1.4 Interfaces and Data Abstraction . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
  7. 1.5 Case Study on Conceptual Design: Historical Event Collection . . . . . . . . . . 8
  8. 1.6 Case Study on Structural Design: Trees . . . . . . . . . . . . . . . . . . . . . . . 10
  9. 1.7 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
  10. 2 Selecting an Abstract Data Type 15
  11. 2.1 An Illustrative Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
  12. 2.2 Broad ADT groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
  13. 2.3 Partition of a Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
  14. 2.4 A Collection of Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
  15. 2.5 Markers and Trackers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
  16. 2.6 Positioning and Finding Elements . . . . . . . . . . . . . . . . . . . . . . . . . . 24
  17. 2.6.1 Manually Positioned Collections . . . . . . . . . . . . . . . . . . . . . . 26
  18. 2.6.2 Algorithmically Positioned Collections . . . . . . . . . . . . . . . . . . 26
  19. 2.7 Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
  20. 3 How to Use This Book 35
  21. 3.1 Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
  22. 3.2 Parts II and III Presentation Structure . . . . . . . . . . . . . . . . . . . . . . . . 36
  23. 3.2.1 ADT Chapters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
  24. 3.2.2 Data Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
  25. 3.2.3 Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
  26. 3.3 Appendices and CD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
  27. II COLLECTION DATA STRUCTURES AND ALGORITHMS 43
  28. 4 Part II Organization 45
  29. 5 Foundations 49
  30. 5.1 Wrappers for Delegation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
  31. 5.2 Objects Abstract Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
  32. 5.2.1 Singleton Classes: Empty and Deleted . . . . . . . . . . . . . . . . . . . 51
  33. 5.2.2 Object Equivalence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
  34. 5.2.3 Object Comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
  35. vii
  36. © 2008 by Taylor & Francis Group, LLC
  37. viii
  38. 5.3 Digitizer Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
  39. 5.4 Bucketizer Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
  40. 5.5 Object Pool to Reduce Garbage Collection Overhead . . . . . . . . . . . . . . . . 59
  41. 5.6 Concurrency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
  42. 5.7 Iterators for Traversing Data Structures . . . . . . . . . . . . . . . . . . . . . . . 62
  43. 5.8 Locator Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
  44. 5.8.1 Case Study: Maintaining Request Quorums for Byzantine Agreement . . 63
  45. 5.8.2 Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
  46. 5.8.3 Markers and Trackers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
  47. 5.8.4 Iteration Using Locators . . . . . . . . . . . . . . . . . . . . . . . . . . 67
  48. 5.8.5 Iteration Order and Concurrent Modifications . . . . . . . . . . . . . . . 68
  49. 5.9 Version Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
  50. 5.10 Visitors for Traversing Data Structures . . . . . . . . . . . . . . . . . . . . . . . 71
  51. 6 Partition ADT and the Union-Find Data Structure 73
  52. 6.1 Partition Element Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
  53. 6.2 Selecting a Data Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
  54. 6.3 Union-Find Data Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
  55. 6.4 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
  56. 6.5 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
  57. 6.6 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
  58. 6.7 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
  59. 6.8 Case Study: Preserving Locators When Merging Data Structures . . . . . . . . . 81
  60. 6.9 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
  61. 6.10 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
  62. 7 Collection of Elements 89
  63. 7.1 Collection Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
  64. 7.2 Tracked Collection Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
  65. 7.3 ADTs Implementing the Collection Interface . . . . . . . . . . . . . . . . . . . . 92
  66. 7.3.1 Manually Positioned Collections . . . . . . . . . . . . . . . . . . . . . . 92
  67. 7.3.2 Algorithmically Positioned Untagged Collections . . . . . . . . . . . . . 92
  68. 7.3.3 Algorithmically Positioned Tagged Ungrouped Collections . . . . . . . . 93
  69. 7.3.4 Algorithmically Positioned Tagged Grouped Collections . . . . . . . . . 94
  70. 8 Abstract Collection 95
  71. 8.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
  72. 8.2 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
  73. 8.3 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
  74. 8.3.1 Trivial Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
  75. 8.3.2 Algorithmic Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
  76. 8.3.3 Representation Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . 99
  77. 8.3.4 Content Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
  78. 8.4 Abstract Locater Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
  79. 8.5 Visiting Iterator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
  80. 8.6 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
  81. 8.7 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
  82. © 2008 by Taylor & Francis Group, LLC
  83. ix
  84. 9 Positional Collection ADT 107
  85. 9.1 Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
  86. 9.2 Positional Collection Locator Interface . . . . . . . . . . . . . . . . . . . . . . . 109
  87. 9.3 Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
  88. 9.4 Competing ADTs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
  89. 9.5 Selecting a Data Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
  90. 9.5.1 Tradeoffs among Array-Based Data Structures . . . . . . . . . . . . . . 114
  91. 9.5.2 Tradeoffs among List-Based Data Structures . . . . . . . . . . . . . . . 115
  92. 9.6 Summary of Positional Collection Data Structures . . . . . . . . . . . . . . . . . 116
  93. 9.7 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
  94. 10 Abstract Positional Collection 121
  95. 10.1 Abstract Positional Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
  96. 10.2 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
  97. 10.3 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
  98. 11 Array Data Structure 125
  99. 11.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
  100. 11.2 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
  101. 11.3 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
  102. 11.3.1 Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
  103. 11.3.2 Trivial Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
  104. 11.3.3 Representation Accessors . . . . . . . . . . . . . . . . . . . . . . . . . 130
  105. 11.3.4 Algorithmic Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
  106. 11.3.5 Representation Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . 132
  107. 11.3.6 Content Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
  108. 11.3.7 Locator Initializers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
  109. 11.4 SortingAlgorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
  110. 11.4.1 Insertion Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
  111. 11.4.2 Mergesort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
  112. 11.4.3 Heap Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
  113. 11.4.4 Tree Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
  114. 11.4.5 Quicksort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
  115. 11.4.6 Radix Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
  116. 11.4.7 Bucket Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
  117. 11.5 Selection and Median Finding . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
  118. 11.6 Basic Marker Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
  119. 11.7 Marker Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
  120. 11.8 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
  121. 11.9 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
  122. 11.10 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
  123. 12 Circular Array Data Structure 171
  124. 12.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
  125. 12.2 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
  126. 12.3 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
  127. 12.3.1 Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
  128. 12.3.2 Representation Accessors . . . . . . . . . . . . . . . . . . . . . . . . . 174
  129. 12.3.3 Representation Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . 175
  130. 12.3.4 Content Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
  131. 12.4 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
  132. 12.5 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
  133. © 2008 by Taylor & Francis Group, LLC
  134. x
  135. 13 Dynamic Array and Dynamic Circular Array Data Structures 185
  136. 13.1 Dynamic Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
  137. 13.2 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
  138. 13.3 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
  139. 13.4 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
  140. 13.4.1 Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
  141. 13.4.2 Representation Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . 188
  142. 13.4.3 Content Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
  143. 13.5 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
  144. 13.6 Dynamic Circular Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
  145. 14 Tracked Array Data Structure 193
  146. 14.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
  147. 14.2 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
  148. 14.3 Node Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
  149. 14.4 Tracked Array Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
  150. 14.4.1 Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
  151. 14.4.2 Representation Accessors . . . . . . . . . . . . . . . . . . . . . . . . . 199
  152. 14.4.3 Algorithmic Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
  153. 14.4.4 Representation Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . 200
  154. 14.4.5 Content Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
  155. 14.4.6 Locator Initializers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
  156. 14.5 Wrappers for Sorting Tracked Arrays . . . . . . . . . . . . . . . . . . . . . . . . 205
  157. 14.6 Tracker Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
  158. 14.7 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
  159. 14.8 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
  160. 15 Singly Linked List Data Structure 217
  161. 15.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
  162. 15.2 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
  163. 15.3 List Item Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
  164. 15.4 Singly Linked List Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
  165. 15.4.1 Constructors and Factory Methods . . . . . . . . . . . . . . . . . . . . . 221
  166. 15.4.2 Representation Accessors . . . . . . . . . . . . . . . . . . . . . . . . . 222
  167. 15.4.3 Algorithmic Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
  168. 15.4.4 Representation Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . 224
  169. 15.4.5 Content Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
  170. 15.4.6 Locator Initializers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
  171. 15.5 SortingAlgorithmsRevisited . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
  172. 15.5.1 Insertion Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
  173. 15.5.2 Mergesort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
  174. 15.5.3 Heap Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
  175. 15.5.4 Tree Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
  176. 15.5.5 Quicksort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
  177. 15.5.6 Radix Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
  178. 15.5.7 Bucket Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
  179. 15.6 Selection and Median Finding . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
  180. 15.7 Tracker Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
  181. 15.8 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
  182. 15.9 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
  183. © 2008 by Taylor & Francis Group, LLC
  184. xi
  185. 16 Doubly Linked List Data Structure 257
  186. 16.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
  187. 16.2 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
  188. 16.3 Doubly Linked List Item Inner Class . . . . . . . . . . . . . . . . . . . . . . . . 259
  189. 16.4 Doubly Linked List Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
  190. 16.4.1 Constructors and Factory Methods . . . . . . . . . . . . . . . . . . . . . 259
  191. 16.4.2 Representation Accessors . . . . . . . . . . . . . . . . . . . . . . . . . 260
  192. 16.4.3 Algorithmic Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
  193. 16.4.4 Representation Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . 261
  194. 16.5 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
  195. 16.6 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
  196. 17 Buffer ADT and Its Implementation 265
  197. 17.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
  198. 17.2 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
  199. 17.3 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
  200. 17.3.1 Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
  201. 17.3.2 Trivial Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
  202. 17.3.3 Algorithmic Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
  203. 17.3.4 Content Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
  204. 17.3.5 Locator Initializers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
  205. 17.4 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
  206. 17.5 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
  207. 18 Queue ADT and Implementation 271
  208. 18.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
  209. 18.2 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
  210. 18.3 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
  211. 18.4 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
  212. 19 Stack ADT and Implementation 275
  213. 19.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
  214. 19.2 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
  215. 19.3 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
  216. 19.4 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
  217. 20 Set ADT 279
  218. 20.1 Case Study: Airline Travel Agent . . . . . . . . . . . . . . . . . . . . . . . . . . 279
  219. 20.2 Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
  220. 20.3 Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
  221. 20.4 Hasher Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
  222. 20.5 Competing ADTs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
  223. 20.6 Selecting a Data Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
  224. 20.7 Summary of Set Data Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
  225. 20.8 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
  226. 21 Direct Addressing Data Structure 291
  227. 21.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
  228. 21.2 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
  229. 21.3 Default Direct Addressing Hasher Class . . . . . . . . . . . . . . . . . . . . . . . 293
  230. 21.4 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
  231. © 2008 by Taylor & Francis Group, LLC
  232. xii
  233. 21.4.1 Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
  234. 21.4.2 Trivial Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
  235. 21.4.3 Representation Accessors . . . . . . . . . . . . . . . . . . . . . . . . . 294
  236. 21.4.4 Algorithmic Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
  237. 21.4.5 Representation Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . 296
  238. 21.4.6 Content Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
  239. 21.4.7 Locator Initializers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
  240. 21.5 Marker Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
  241. 21.6 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
  242. 21.7 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
  243. 22 Open Addressing Data Structure 305
  244. 22.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
  245. 22.2 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
  246. 22.3 Default Open Addressing Hasher Class . . . . . . . . . . . . . . . . . . . . . . . 309
  247. 22.4 Open Addressing Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
  248. 22.4.1 Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
  249. 22.4.2 Trivial Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
  250. 22.4.3 Representation Accessors . . . . . . . . . . . . . . . . . . . . . . . . . 311
  251. 22.4.4 Selecting a Hash Function . . . . . . . . . . . . . . . . . . . . . . . . . 312
  252. 22.4.5 Algorithmic Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
  253. 22.4.6 Representation Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . 314
  254. 22.4.7 Content Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
  255. 22.5 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
  256. 22.6 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
  257. 23 Separate Chaining Data Structure 321
  258. 23.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
  259. 23.2 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
  260. 23.3 Chain Item Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
  261. 23.4 Default Separate Chaining Hasher Class . . . . . . . . . . . . . . . . . . . . . . 326
  262. 23.5 Separate Chaining Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
  263. 23.5.1 Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
  264. 23.5.2 Trivial Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
  265. 23.5.3 Algorithmic Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
  266. 23.5.4 Representation Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . 329
  267. 23.5.5 Content Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
  268. 23.5.6 Locator Initializers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
  269. 23.6 Marker Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
  270. 23.7 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
  271. 23.8 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
  272. 24 Priority Queue ADT 343
  273. 24.1 Case Study: Huffman Compression . . . . . . . . . . . . . . . . . . . . . . . . . 343
  274. 24.2 Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
  275. 24.3 Priority Queue Locator Interface . . . . . . . . . . . . . . . . . . . . . . . . . . 345
  276. 24.4 Selecting a Data Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
  277. 24.5 Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
  278. 24.6 Competing ADTs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
  279. 24.7 Summary of Priority Queue Data Structures . . . . . . . . . . . . . . . . . . . . 348
  280. 24.8 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
  281. © 2008 by Taylor & Francis Group, LLC
  282. xiii
  283. 25 Binary Heap Data Structure 353
  284. 25.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
  285. 25.2 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
  286. 25.3 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
  287. 25.3.1 Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
  288. 25.3.2 Trivial Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
  289. 25.3.3 Representation Accessors . . . . . . . . . . . . . . . . . . . . . . . . . 357
  290. 25.3.4 Algorithmic Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
  291. 25.3.5 Representation Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . 358
  292. 25.3.6 Content Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
  293. 25.3.7 Locator Initializers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
  294. 25.4 Locator Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
  295. 25.5 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
  296. 25.6 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
  297. 26 Leftist Heap Data Structure 373
  298. 26.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
  299. 26.2 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
  300. 26.3 Leftist Heap Node Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
  301. 26.4 Leftist Heap Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
  302. 26.4.1 Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
  303. 26.4.2 Algorithmic Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
  304. 26.4.3 Content Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
  305. 26.4.4 Locator Initializers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
  306. 26.5 Tracker Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
  307. 26.6 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
  308. 26.7 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
  309. 27 Pairing Heap Data Structure 399
  310. 27.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
  311. 27.2 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
  312. 27.3 Heap Node Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
  313. 27.4 Pairing Heap Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
  314. 27.4.1 Constructors and Factory Methods . . . . . . . . . . . . . . . . . . . . . 406
  315. 27.4.2 Algorithmic Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . 406
  316. 27.4.3 Representation Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . 407
  317. 27.4.4 Content Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
  318. 27.4.5 Locator Initializers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414
  319. 27.5 Tracker Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
  320. 27.6 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418
  321. 27.7 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419
  322. 28 Fibonacci Heap Data Structure 423
  323. 28.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
  324. 28.2 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426
  325. 28.3 Fibonacci Heap Node Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . 426
  326. 28.4 Fibonacci Heap Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428
  327. 28.4.1 Constructors and Factory Methods . . . . . . . . . . . . . . . . . . . . . 428
  328. 28.4.2 Representation Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . 429
  329. 28.4.3 Content Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
  330. 28.5 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
  331. 28.6 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441
  332. © 2008 by Taylor & Francis Group, LLC
  333. xiv
  334. 29 Ordered Collection ADT 443
  335. 29.1 Case Study: Historical Event Collection (Range Queries) . . . . . . . . . . . . . 443
  336. 29.2 Case Study: Linux Virtual Memory Map . . . . . . . . . . . . . . . . . . . . . . 444
  337. 29.3 Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445
  338. 29.4 Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
  339. 29.5 Competing ADTs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447
  340. 29.6 Selecting a Data Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447
  341. 29.7 Summary of Ordered Collection Data Structures . . . . . . . . . . . . . . . . . . 449
  342. 29.8 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452
  343. 30 Sorted Array Data Structure 455
  344. 30.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
  345. 30.2 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456
  346. 30.3 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
  347. 30.3.1 Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
  348. 30.3.2 Trivial Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
  349. 30.3.3 Binary Search Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . 458
  350. 30.3.4 Algorithmic Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . 460
  351. 30.3.5 Content Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464
  352. 30.3.6 Utilities for the B-Tree and B+-Tree Classes . . . . . . . . . . . . . . . . 465
  353. 30.3.7 Locator Initializers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467
  354. 30.4 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467
  355. 30.5 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469
  356. 31 Abstract Search Tree Class 471
  357. 31.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471
  358. 31.2 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
  359. 31.3 Abstract Tree Node Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . 474
  360. 31.4 Abstract Search Tree Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
  361. 31.5 Abstract Search Tree Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
  362. 31.5.1 Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
  363. 31.5.2 Algorithmic Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
  364. 31.5.3 Content Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
  365. 31.6 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480
  366. 32 Binary Search Tree Data Structure 481
  367. 32.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481
  368. 32.2 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485
  369. 32.3 BSTNode Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485
  370. 32.4 Binary Search Tree Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489
  371. 32.4.1 Constructors and Factory Methods . . . . . . . . . . . . . . . . . . . . . 490
  372. 32.4.2 Algorithmic Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . 490
  373. 32.4.3 Content Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496
  374. 32.4.4 Locator Initializers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500
  375. 32.5 Tracker Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501
  376. 32.6 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504
  377. 32.7 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506
  378. 33 Balanced Binary Search Trees 509
  379. 33.1 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 510
  380. 33.2 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512
  381. © 2008 by Taylor & Francis Group, LLC
  382. xv
  383. 34 Red-Black Tree Data Structure 513
  384. 34.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514
  385. 34.2 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515
  386. 34.3 RBNode Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515
  387. 34.4 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517
  388. 34.4.1 Constructors and Factory Methods . . . . . . . . . . . . . . . . . . . . . 517
  389. 34.4.2 Content Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517
  390. 34.5 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528
  391. 34.6 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528
  392. 35 Splay Tree Data Structure 531
  393. 35.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531
  394. 35.2 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532
  395. 35.2.1 Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532
  396. 35.2.2 Representation Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . 533
  397. 35.2.3 Algorithmic Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . 533
  398. 35.2.4 Content Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537
  399. 35.2.5 Locator Initializers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541
  400. 35.3 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541
  401. 35.4 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543
  402. 36 B-Tree Data Structure 545
  403. 36.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546
  404. 36.2 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549
  405. 36.3 B-Tree Node Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549
  406. 36.3.1 B-Tree Node Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . 550
  407. 36.3.2 B-Tree Node Representation Mutators . . . . . . . . . . . . . . . . . . . 551
  408. 36.3.3 B-Tree Node Content Mutators . . . . . . . . . . . . . . . . . . . . . . . 555
  409. 36.4 B-Tree Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 557
  410. 36.4.1 Constructors and Factory Methods . . . . . . . . . . . . . . . . . . . . . 557
  411. 36.4.2 Algorithmic Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . 558
  412. 36.4.3 Representation Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . 562
  413. 36.4.4 Content Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 563
  414. 36.4.5 Locator Initializers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567
  415. 36.5 Marker Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568
  416. 36.6 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 570
  417. 36.7 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573
  418. 37 B+-Tree Data Structure 575
  419. 37.1 Case Study: A Web Search Engine . . . . . . . . . . . . . . . . . . . . . . . . . 576
  420. 37.2 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577
  421. 37.3 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 578
  422. 37.4 Leaf Node Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579
  423. 37.5 B+-Tree Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 583
  424. 37.5.1 Constructors and Factory Methods . . . . . . . . . . . . . . . . . . . . . 584
  425. 37.5.2 Representation Accessors . . . . . . . . . . . . . . . . . . . . . . . . . 584
  426. 37.5.3 Algorithmic Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . 585
  427. 37.5.4 Content Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588
  428. 37.6 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589
  429. 37.7 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 591
  430. © 2008 by Taylor & Francis Group, LLC
  431. xvi
  432. 38 Skip List Data Structure 593
  433. 38.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593
  434. 38.2 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 596
  435. 38.3 Tower Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597
  436. 38.4 Skip List Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598
  437. 38.4.1 Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 598
  438. 38.4.2 Algorithmic Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . 600
  439. 38.4.3 Representation Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . 604
  440. 38.4.4 Content Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 605
  441. 38.4.5 Locator Initializers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 610
  442. 38.5 Tracker Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 610
  443. 38.6 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613
  444. 38.7 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 617
  445. 39 Digitized Ordered Collection ADT 619
  446. 39.1 Case Study: Packet Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619
  447. 39.2 Case Study: Inverted Index for Text Retrieval . . . . . . . . . . . . . . . . . . . . 620
  448. 39.3 Digitized Ordered Collection Interface . . . . . . . . . . . . . . . . . . . . . . . 621
  449. 39.4 Selecting a Data Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622
  450. 39.5 Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 623
  451. 39.6 Competing ADTs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624
  452. 39.7 Summary of Digitized Ordered Collection Data Structures . . . . . . . . . . . . . 625
  453. 39.8 TrieVariations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 630
  454. 39.9 Suffix Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 630
  455. 39.10 Indexing Tries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631
  456. 39.11 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 633
  457. 40 Trie Node Types 635
  458. 40.1 Trie Node Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635
  459. 40.2 Abstract Trie Node Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635
  460. 40.3 Trie Leaf Node Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 636
  461. 40.4 Abstract Trie Leaf Node Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637
  462. 41 Trie Data Structure 639
  463. 41.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 639
  464. 41.2 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642
  465. 41.3 Internal Node Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642
  466. 41.4 Leaf Node Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644
  467. 41.5 Search Data Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644
  468. 41.6 FindResult Enumerated Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . 649
  469. 41.7 Trie Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 650
  470. 41.7.1 Constructors and Factory Methods . . . . . . . . . . . . . . . . . . . . . 650
  471. 41.7.2 Algorithmic Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . 651
  472. 41.7.3 Content Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 657
  473. 41.7.4 Locator Initializers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661
  474. 41.8 Trie Tracker Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 662
  475. 41.9 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 664
  476. 41.10 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667
  477. © 2008 by Taylor & Francis Group, LLC
  478. xvii
  479. 42 Compact Trie Data Structure 671
  480. 42.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671
  481. 42.2 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672
  482. 42.3 Compact Trie Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 672
  483. 42.3.1 Constructors and Factory Methods . . . . . . . . . . . . . . . . . . . . . 673
  484. 42.3.2 Algorithmic Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . 673
  485. 42.3.3 Content Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675
  486. 42.4 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 679
  487. 42.5 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 680
  488. 43 Compressed Trie Data Structure 683
  489. 43.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683
  490. 43.2 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 685
  491. 43.3 Compressed Trie Node Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 686
  492. 43.4 Internal Node Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 686
  493. 43.5 Compressed Trie Leaf Node Inner Class . . . . . . . . . . . . . . . . . . . . . . 687
  494. 43.6 Compressed Trie Search Data Inner Class . . . . . . . . . . . . . . . . . . . . . . 687
  495. 43.7 Compressed Trie Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688
  496. 43.7.1 Constructors and Factory Methods . . . . . . . . . . . . . . . . . . . . . 688
  497. 43.7.2 Algorithmic Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . 689
  498. 43.7.3 Content Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 690
  499. 43.8 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 693
  500. 43.9 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 694
  501. 44 Patricia Trie Data Structure 697
  502. 44.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697
  503. 44.2 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 699
  504. 44.3 Patricia Trie Node Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . 700
  505. 44.4 Patricia Trie Search Data Inner Class . . . . . . . . . . . . . . . . . . . . . . . . 702
  506. 44.5 Patricia Trie Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705
  507. 44.5.1 Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 705
  508. 44.5.2 Content Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706
  509. 44.6 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 717
  510. 44.7 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 717
  511. 45 Ternary Search Trie Data Structure 719
  512. 45.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 719
  513. 45.2 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721
  514. 45.3 Ternary Search Trie Internal Node Inner Class . . . . . . . . . . . . . . . . . . . 722
  515. 45.4 Ternary Search Trie Search Data Inner Class . . . . . . . . . . . . . . . . . . . . 722
  516. 45.5 Ternary Search Trie Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723
  517. 45.5.1 Constructors and Factory Methods . . . . . . . . . . . . . . . . . . . . . 723
  518. 45.5.2 Algorithmic Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . 724
  519. 45.6 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725
  520. 45.7 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725
  521. 46 Spatial Collection ADT 729
  522. 46.1 Case Study: Collision Detection in Video Games . . . . . . . . . . . . . . . . . . 729
  523. 46.2 Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 730
  524. 46.3 Competing ADTs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 731
  525. 46.4 Summary of Spatial Collection Data Structures . . . . . . . . . . . . . . . . . . . 732
  526. 46.5 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 732
  527. © 2008 by Taylor & Francis Group, LLC
  528. xviii
  529. 47 KD-Tree Data Structure 735
  530. 47.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 736
  531. 47.2 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 739
  532. 47.3 Alternating Comparator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 739
  533. 47.4 KDNode Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 742
  534. 47.5 KDTreeImpl Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 747
  535. 47.6 KD-Tree Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 750
  536. 47.7 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 752
  537. 47.8 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 754
  538. 48 Quad Tree Data Structure 757
  539. 48.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757
  540. 48.2 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 760
  541. 48.3 Partitioning a Two-Dimensional Space . . . . . . . . . . . . . . . . . . . . . . . 761
  542. 48.4 QTNode Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 762
  543. 48.5 Box Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 765
  544. 48.6 Quad Tree Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 767
  545. 48.6.1 Constructors and Factory Methods . . . . . . . . . . . . . . . . . . . . . 767
  546. 48.6.2 Representation Accessors . . . . . . . . . . . . . . . . . . . . . . . . . 768
  547. 48.6.3 Algorithmic Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . 768
  548. 48.6.4 Content Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 772
  549. 48.6.5 Locator Initializers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 781
  550. 48.7 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 782
  551. 48.8 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 782
  552. 49 Tagged Collection ADTs 785
  553. 49.1 Tagged Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 786
  554. 49.1.1 Mutable Tagged Element . . . . . . . . . . . . . . . . . . . . . . . . . . 787
  555. 49.1.2 Tagged Element Comparator . . . . . . . . . . . . . . . . . . . . . . . . 787
  556. 49.1.3 Tagged Element Digitizer . . . . . . . . . . . . . . . . . . . . . . . . . 788
  557. 49.1.4 Tagged Element XY Comparator . . . . . . . . . . . . . . . . . . . . . . 788
  558. 49.2 Tagged Collection Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789
  559. 49.3 Tracked Tagged Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 791
  560. 49.4 Competing ADTs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 791
  561. 49.5 Selecting a Tagged Collection ADT . . . . . . . . . . . . . . . . . . . . . . . . . 792
  562. 49.6 Tagged Collection Wrapper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 793
  563. 49.7 Mapping ADT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 797
  564. 49.7.1 Direct Addressing Mapping . . . . . . . . . . . . . . . . . . . . . . . . 799
  565. 49.7.2 Open Addressing Mapping . . . . . . . . . . . . . . . . . . . . . . . . . 799
  566. 49.7.3 Separate Chaining Mapping . . . . . . . . . . . . . . . . . . . . . . . . 801
  567. 49.8 Tagged Priority Queue ADT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 801
  568. 49.8.1 Tagged Priority Queue Wrapper . . . . . . . . . . . . . . . . . . . . . . 803
  569. 49.8.2 Tagged Binary Heap . . . . . . . . . . . . . . . . . . . . . . . . . . . . 806
  570. 49.8.3 Tagged Leftist Heap . . . . . . . . . . . . . . . . . . . . . . . . . . . . 806
  571. 49.8.4 Tagged Pairing Heap . . . . . . . . . . . . . . . . . . . . . . . . . . . . 807
  572. 49.8.5 Tagged Fibonacci Heap . . . . . . . . . . . . . . . . . . . . . . . . . . . 807
  573. 49.9 Tagged Ordered Collection ADT . . . . . . . . . . . . . . . . . . . . . . . . . . 807
  574. 49.9.1 Tagged Ordered Collection Wrapper . . . . . . . . . . . . . . . . . . . . 811
  575. 49.9.2 Tagged Sorted Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . 812
  576. 49.9.3 Tagged Binary Search Tree . . . . . . . . . . . . . . . . . . . . . . . . . 813
  577. 49.9.4 Tagged Splay Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 813
  578. © 2008 by Taylor & Francis Group, LLC
  579. xix
  580. 49.9.5 Tagged Red-Black Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . 813
  581. 49.9.6 Tagged B-Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 813
  582. 49.9.7 Tagged B+-Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 814
  583. 49.9.8 Tagged Skip List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 814
  584. 49.10 Tagged Digitized Ordered Collection ADT . . . . . . . . . . . . . . . . . . . . . 814
  585. 49.10.1 Tagged Digitized Ordered Collection Wrapper . . . . . . . . . . . . . . 818
  586. 49.10.2 Tagged Trie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 818
  587. 49.10.3 Tagged Compact Trie . . . . . . . . . . . . . . . . . . . . . . . . . . . . 819
  588. 49.10.4 Tagged Compressed Trie . . . . . . . . . . . . . . . . . . . . . . . . . . 819
  589. 49.10.5 Tagged Patricia Trie . . . . . . . . . . . . . . . . . . . . . . . . . . . . 819
  590. 49.10.6 Tagged Ternary Search Trie . . . . . . . . . . . . . . . . . . . . . . . . 819
  591. 49.11 Tagged Spatial Collection ADT . . . . . . . . . . . . . . . . . . . . . . . . . . . 820
  592. 49.11.1 Tagged Spatial Collection Wrapper . . . . . . . . . . . . . . . . . . . . 821
  593. 49.11.2 Tagged KD-Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 822
  594. 49.11.3 Tagged Quad Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 823
  595. 50 Tagged Bucket Collection ADTs 825
  596. 50.1 Case Study: Historical Event Collection (Indexing) . . . . . . . . . . . . . . . . . 826
  597. 50.2 Case Study: Biosequence Comparison . . . . . . . . . . . . . . . . . . . . . . . 828
  598. 50.3 Bucket Factory Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 829
  599. 50.4 Tagged Bucket Collection Interface . . . . . . . . . . . . . . . . . . . . . . . . . 829
  600. 50.5 Selecting a Tagged Bucket Collection ADT . . . . . . . . . . . . . . . . . . . . . 831
  601. 50.6 Selecting a Data Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 832
  602. 50.7 Tagged Bucket Collection Wrapper . . . . . . . . . . . . . . . . . . . . . . . . . 832
  603. III GRAPH DATA STRUCTURES AND ALGORITHMS 839
  604. 51 Part III Organization 841
  605. 52 Graph ADT 843
  606. 52.1 Case Study: Task Scheduler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 844
  607. 52.2 Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 845
  608. 52.3 Edge Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 848
  609. 52.4 Graph Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 848
  610. 52.5 Graph Representation Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 850
  611. 52.6 Selecting a Data Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 851
  612. 52.7 Summary of Graph Data Structures . . . . . . . . . . . . . . . . . . . . . . . . . 854
  613. 53 Abstract Graph and Graph Algorithms 857
  614. 53.1 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 858
  615. 53.2 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 858
  616. 53.3 In-Tree Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 861
  617. 53.4 Finding Shortest Paths with Breadth-First Search . . . . . . . . . . . . . . . . . . 865
  618. 53.5 Finding Cycles and Connected Components with Depth-First Search . . . . . . . 867
  619. 53.6 Topological Sort . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 873
  620. 53.7 Strongly Connected Components . . . . . . . . . . . . . . . . . . . . . . . . . . 875
  621. 53.8 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 878
  622. 53.9 Case Study: Garbage Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . 878
  623. 53.10 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 880
  624. 53.11 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 881
  625. © 2008 by Taylor & Francis Group, LLC
  626. xx
  627. 54 Adjacency Matrix Data Structure 883
  628. 54.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 883
  629. 54.2 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 886
  630. 54.3 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 887
  631. 54.3.1 Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 887
  632. 54.3.2 Trivial Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 888
  633. 54.3.3 Algorithmic Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . 888
  634. 54.3.4 Representation Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . 889
  635. 54.3.5 Content Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 890
  636. 54.4 Edge Iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 893
  637. 54.5 Incident Edge Iterator Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . 893
  638. 54.6 Adjacency Matrix Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 896
  639. 54.7 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 897
  640. 54.8 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 898
  641. 55 Adjacency List Data Structure 901
  642. 55.1 Internal Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 902
  643. 55.2 Representation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 905
  644. 55.3 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 906
  645. 55.3.1 Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 906
  646. 55.3.2 Trivial Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 906
  647. 55.3.3 Algorithmic Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . 906
  648. 55.3.4 Content Mutators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 908
  649. 55.4 Edge Iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 910
  650. 55.5 Edge Iterator Inner Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 910
  651. 55.6 Adjacency List Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 912
  652. 55.7 Performance Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 912
  653. 55.8 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 915
  654. 56 Weighted Graph ADT 917
  655. 56.1 Case Study: Airline Travel Agent (Revisited) . . . . . . . . . . . . . . . . . . . . 917
  656. 56.2 Case Study: Image Segmentation . . . . . . . . . . . . . . . . . . . . . . . . . . 919
  657. 56.3 Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 921
  658. 56.4 Weighted Edge Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 922
  659. 56.5 Simple Weighted Edge Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . 922
  660. 56.6 Weighted Graph Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 923
  661. 56.7 Selecting a Data Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 923
  662. 56.8 Weighted Adjacency Matrix Data Structure . . . . . . . . . . . . . . . . . . . . . 924
  663. 56.9 Weighted Adjacency List Data Structure . . . . . . . . . . . . . . . . . . . . . . 924
  664. 57 Abstract Weighted Graph andWeighted Graph Algorithms 925
  665. 57.1 Greedy Tree Builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 926
  666. 57.2 Dijkstra’s Single-Source Shortest Path Algorithm . . . . . . . . . . . . . . . . . . 931
  667. 57.3 Prim’s Minimum Spanning Tree Algorithm . . . . . . . . . . . . . . . . . . . . . 935
  668. 57.4 Kruskal’s Minimum Spanning Tree Algorithm . . . . . . . . . . . . . . . . . . . 938
  669. 57.5 Bellman-Ford’s Single-Source Shortest Path Algorithm . . . . . . . . . . . . . . 941
  670. 57.6 Shortest Path Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 943
  671. 57.7 Floyd-Warshall’s All-Pairs Shortest Path Algorithm . . . . . . . . . . . . . . . . 945
  672. 57.8 Edmonds-Karp Maximum Flow Algorithm . . . . . . . . . . . . . . . . . . . . . 948
  673. 57.9 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 954
  674. 57.10 Quick Method Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 955
  675. © 2008 by Taylor & Francis Group, LLC
  676. xxi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement