When viewed graphically, each node in a 2-d tree partitions the plane into regions.For | StudySoup

Textbook Solutions for Data Structures and Algorithm Analysis in Java

Chapter 12 Problem 12.32

Question

When viewed graphically, each node in a 2-d tree partitions the plane into regions.For instance, Figure 12.51 shows the first five insertions into the 2-d tree inFigure 12.51 The plane partitioned by a 2-d tree after the insertion of p1 = (53, 14),p2 = (27, 28), p3 = (30, 11), p4 = (67, 51), p5 = (70, 3)Figure 12.52 The plane partitioned by a quad tree after the insertion of p1 = (53, 14),p2 = (27, 28), p3 = (30, 11), p4 = (67, 51), p5 = (70, 3)Figure 12.39. The first insertion, of p1, splits the plane into a left part and aright part. The second insertion, of p2, splits the left part into a top part and abottom part, and so on.a. For a given set of N items, does the order of insertion affect the final partition?b. If two different insertion sequences result in the same tree, is the same partitionproduced?c. Give a formula for the number of regions that result from the partition after Ninsertions.d. Show the final partition for the 2-d tree in Figure 12.39.

Solution

Step 1 of 5)

The first step in solving 12 problem number 32 trying to solve the problem we have to refer to the textbook question: When viewed graphically, each node in a 2-d tree partitions the plane into regions.For instance, Figure 12.51 shows the first five insertions into the 2-d tree inFigure 12.51 The plane partitioned by a 2-d tree after the insertion of p1 = (53, 14),p2 = (27, 28), p3 = (30, 11), p4 = (67, 51), p5 = (70, 3)Figure 12.52 The plane partitioned by a quad tree after the insertion of p1 = (53, 14),p2 = (27, 28), p3 = (30, 11), p4 = (67, 51), p5 = (70, 3)Figure 12.39. The first insertion, of p1, splits the plane into a left part and aright part. The second insertion, of p2, splits the left part into a top part and abottom part, and so on.a. For a given set of N items, does the order of insertion affect the final partition?b. If two different insertion sequences result in the same tree, is the same partitionproduced?c. Give a formula for the number of regions that result from the partition after Ninsertions.d. Show the final partition for the 2-d tree in Figure 12.39.
From the textbook chapter Advanced Data Structures and Implementation you will find a few key concepts needed to solve this.

Step 2 of 7)

Visible to paid subscribers only

Step 3 of 7)

Visible to paid subscribers only

Subscribe to view the
full solution

Title Data Structures and Algorithm Analysis in Java 3 
Author Mark A. Weiss
ISBN 9780132576277

When viewed graphically, each node in a 2-d tree partitions the plane into regions.For

Chapter 12 textbook questions

×

Login

Organize all study tools for free

Or continue with
×

Register

Sign up for access to all content on our site!

Or continue with

Or login if you already have an account

×

Reset password

If you have an active account we’ll send you an e-mail for password recovery

Or login if you have your password back