Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Disjoint difference We can also define a version of rectangle difference which returns a set of disjoint rectangles. The idea is this. Let the two

Disjoint difference
We can also define a version of rectangle difference which returns a set of disjoint rectangles. The idea is this. Let the two rectangles be R=(I1,dots,In) and S=(J1,dots,Jn), where I1,dots,In and J1,dots,Jn are the intervals forming the two rectangles R and S.
To compute the difference R??S as a list of disjoint rectangles, we reason by induction (thus writing a recursive solution). Consider the coordinate k=1.
Let I1-J1=A, so that A is a list consisting of 0,1, or 2 intervals. Cleady, for any interval LinA, we have that (L,I2,dots,In) is part of the result.
As for the remaining part of the result, let I1J1=H.H can be empty, or consist of one interval.
The rest of the result is given by
H,I2,dots,In??(J1,J2,dots,Jn)=H[I2,dots,In??(J2,dots,Jn)]
It is easier thus to define a generator, which yields all the rectangles in the difference.
Computation of disjoint difference
metitle Computation of disjoint difference
def disjoint_minus(r,s :
"un"R and S are equal-length lists of intervals, representing
two rectangles R and S. The function returns, or better, yields,
all the rectangles in the disjoint difference of R and S."w."
AIHI YOUR SOLUTION MERE
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transactions On Large Scale Data And Knowledge Centered Systems X Special Issue On Database And Expert Systems Applications Lncs 8220

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Stephen W. Liddle ,Klaus-Dieter Schewe ,Xiaofang Zhou

2013th Edition

3642412203, 978-3642412202

More Books

Students also viewed these Databases questions

Question

Write the difference between sexual and asexual reproduction.

Answered: 1 week ago

Question

What your favourite topic in mathematics?

Answered: 1 week ago

Question

Briefly describe vegetative reproduction in plants.

Answered: 1 week ago

Question

Describe the appropriate use of supplementary parts of a letter.

Answered: 1 week ago