This preview shows pages 1–6. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Click to edit Master subtitle style 2/7/11 Sundar B. CS C341 / I S C361 Data Structures & Algorithms Partially Ordered Data Totally Ordered Data vs. Partially Ordered Data ADT Priority Queue Data Structure for Priority Queue A Heap Representation (Binary Trees and Arrays) Implementation of Operations Other Applications of Heaps Heap Sort: Algorithm, Complexity, Comparisons 11 2/7/11 Sundar B. 2/7/11 Sundar B. Partial Order A (binary) relation R, subset of S x S,&is said to be a partial order if (it is reflexive: x R x for all x in S) it is transitive: x R y and y R z implies x R z for x,y,z in S it is antisymmetric: x R y and y R x implies x = y Example is an ancestor of on persons underwrites on companies Question: 2/7/11 22 Sundar B. 2/7/11 Sundar B. Total Order A (binary) relation R, subset of S x S, is said to be a total order if x R y OR y R x for any x and y in S. Examples: <= on real numbers is at least as old as on persons 2/7/11 33 Sundar B. 2/7/11 Sundar B. Total Order vs. Partial Order Implications: 5th element? Minimum element? Linear Order Refer Discrete Structures Least common ancestor Join and Meet Refer Discrete Structures E.g. Tournament Trees: For a Tennis tournament (or any knockout pairing based tournament) Given pairing information predict who may meet whom at a later stage 2/7/11 44 Sundar B. 2/7/11 Sundar B. Total Order vs. Partial Order Application: Consider a multiprocessing operating system More than one process could be waiting (for CPU) Processes are to be scheduled No self knowledge or coordination among processes Need a queue for ready processes Need a strategy for adding/deleting processes 2/7/11 55 Sundar B. 2/7/11...
View
Full
Document
This note was uploaded on 02/07/2011 for the course CS 123 taught by Professor Murali during the Spring '11 term at Birla Institute of Technology & Science, Pilani  Hyderabad.
 Spring '11
 Murali
 Algorithms, Data Structures

Click to edit the document details