PFDS 8.4.1

443 views

Published on

Published in: Business, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
443
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

PFDS 8.4.1

  1. 1. PFDS 8.4.1Output-Restricted Deques @rf0444
  2. 2. Stack cons tailQueue tail snoc
  3. 3. Deque cons snoc tail initOutput-Restricted Deque cons snoc tail
  4. 4. banker’s queuesnoc ((lenf, f, lenr, r), x) = check (lenf, f, lenr + 1, $CONS(x, r))cons (x, (lenf, f, lenr, r)) = (lenf + 1, $CONS(x, f), lenr, r)
  5. 5. real-time queuesnoc ((f, r, s), x) = exec (f, x :: r, s)cons (x, (f, r, s)) = ($CONS(x, f), r, $CONS(x, s))

×