- PowerPoint PPT Presentation

About This Presentation
Title:

Description:

... Chapter 3 Leftist Heap Binomial Heap Red-Black Tree Leftist ... – PowerPoint PPT presentation

Number of Views:36
Avg rating:3.0/5.0
Slides: 14
Provided by: kmonosNet
Category:
Tags: binomial | heap

less

Transcript and Presenter's Notes

Title:


1
Purely Functional Data Structures????
  • ???
  • 2006/05/12

2
?????
  • Chapter 1. Introduction
  • Chapter 2. Persistence
  • Chapter 3. Some Familiar Data Structures in a
    Functional Setting

3
??????????
  • ??? (functional) ??????????
  • ???? (imperative) ???????????
  • ?????????
  • ?????(destructive update)??????(assignment)?????
  • ?????????
  • ??? (persistent) ???

4
?1 List
  • (?????)
  • append xs ys ??????
  • Functional ???O( xs )
  • Imperative ?????? O(1) ????
  • ????? xs ????
  • Functional ????xs,ys?xs_at_ys????????
  • Persistant
  • update
  • ??

5
?2 Binary Search Tree
  • (MySet.ml)

6
???? Strict vs. Lazy
  • ?? (Strict) ??
  • ????????????????????
  • ?????
  • ?? (Lazy) ??
  • ????????????????????????????
  • ??(amortized)???
  • ???? Chapter 4 ???

7
?????
  • Abstraction
  • ??????????????
  • Abstract Data Type
  • ML ?????????? signature
  • Implementation
  • ADT???????????????????
  • ML ?????????? structure ? functor
  • Object / Version
  • Implementation ??????????
  • ML ??????? value
  • Persistent Identity
  • Informal ? ??????????

8
Chapter 3
  • ???????????????????
  • Leftist Heap
  • Binomial Heap
  • Red-Black Tree

9
Leftist Heap
  • Priority Queue
  • ??????(????)?????????????
  • ???????
  • ???????
  • ????????
  • Heap / ????
  • ???
  • ?????? ? ?????? ?????
  • ?????? O(1) ??????
  • Leftist Heap
  • ????rank ? ????rank ????Heap
  • rank right spine ???
  • ????n?Leftist Heap?Right Spine???????? log(n1)?

10
Leftist Heap
  • (MyHeap.ml)
  • insert O(log n)
  • merge O(log n)
  • deleteMin O(log n)
  • findMin O(1)

11
Binomial Heap
  • Tree ? List ??? Priority Queue ???
  • ?????2????????
  • ????????? Chapter9 ????
  • (?????)
  • (MyHeap.ml)
  • insert O(log n)
  • merge O(log n)
  • deleteMin O(log n)
  • findMin O(log n)
  • ExplicitMin
  • findMin O(1)

12
Red Black Tree
  • Binary Search Tree ??????????
  • ?????????????
  • ??????????????????
  • ???????????????????????
  • Prop. ?????????2?
  • (MySet.ml)

13
????
Write a Comment
User Comments (0)
About PowerShow.com