Imports
Chapter 10 - Elementary Data Structures
Chapter 10 introduces stacks, queues, linked lists, and rooted-tree representations. The current CLRS-Lean pass uses functional lists as the mathematical model for the first three structures, and a purely functional tree/forest model for the §10.4 rooted-tree encoding. This intentionally avoids pointer mutation while preserving the algebraic claims that the textbook uses when reasoning about the operations.
Sections
-
10.1 Stacks and queues:
provedfor the functional-list and array-backed models. Main results:CLRS.Chapter10.pop_push,CLRS.Chapter10.dequeue_enqueue_empty,CLRS.Chapter10.dequeue_enqueue_nonempty, and the array-backed round-trip and overflow/underflow theoremsCLRS.Chapter10.arrayPop_arrayPush,CLRS.Chapter10.arrayDequeue_arrayEnqueue_empty. -
10.2 Linked lists:
provedfor the functional-list model. Main results:CLRS.Chapter10.listSearch_sound,CLRS.Chapter10.mem_listDeleteAll_iff. -
10.4 Representing rooted trees:
provedfor the functional rose-tree / left-child-right-sibling model. Main results: the round-trip isomorphismCLRS.Chapter10.ofLCRSForest_toLCRSForestandCLRS.Chapter10.toLCRSForest_ofLCRSForest(packaged as the bijectionCLRS.Chapter10.lcrsEquiv), the single-tree round tripCLRS.Chapter10.ofLCRS_toLCRS, and structure preservationCLRS.Chapter10.toLCRSForest_preorder.
Current Gaps
The chapter does not yet formalize pointer-level linked lists or free-list allocation, and the array-backed stack/queue interface defers a concrete RAM execution layer (real memory bounds and operation costs). Section 10.3 ("Implementing pointers and objects") is tracked separately as pure imperative-memory / allocator work.
namespace CLRSnamespace Chapter10end Chapter10end CLRS