Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

CS 542 Quiz 3: Analysis of Data Structures and Algorithms, Exercises of Data Structures and Algorithms

Two questions from a cs 542 quiz focused on advanced data structures and algorithms. The first question deals with the concept of find steps and dominant nodes in the context of a partition data structure. The second question involves identifying open and closed nodes during a depth-first search of a tree.

Typology: Exercises

2012/2013

Uploaded on 03/23/2013

saruy
saruy 🇮🇳

4.5

(114)

132 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
- 1 -
1. (6 points) In the analysis of the number of find steps performed by the partition data
structure, we defined the function Δ(x) and the concept of a dominant node. In the diagram
below, what is the value of Δ(e)? Which nodes are dominant?
CS 542 – Advanced Data Structures and Algorithms
Quiz 3
Jonathan Turner 2/29/2012
y 16
7 17
x 8
1 a
b
2
c
3
g
21
f
18
e
14
d
5
j
rank=27
i
26
h
23
pf2

Partial preview of the text

Download CS 542 Quiz 3: Analysis of Data Structures and Algorithms and more Exercises Data Structures and Algorithms in PDF only on Docsity!

  1. ( 6 points) In the analysis of the number of find steps performed by the partition data structure, we defined the function Δ( x ) and the concept of a dominant node. In the diagram below, what is the value of Δ( e )? Which nodes are dominant?

CS 542 – Advanced Data Structures and Algorithms

Quiz 3

Jonathan Turner 2/29/

y^16

7^17

x^8

1 a

2 b

3 c

g

18 f

14 e

5 d

rank=27 j

26 i

h

  1. ( 4 points) In the analysis of the nearest-common ancestor, we defined three categories of nodes, relative to a depth-first tree traversal: open , closed or unreached. Consider a depth-first search of the tree shown below that has reached node j. Which nodes are open? Which nodes are closed? Assume that subtrees are searched in left-to-right order. b k a d i j h e f c n p g m