BuyFindarrow_forward

Discrete Mathematics With Applicat...

5th Edition
EPP + 1 other
ISBN: 9781337694193

Solutions

Chapter
Section
BuyFindarrow_forward

Discrete Mathematics With Applicat...

5th Edition
EPP + 1 other
ISBN: 9781337694193
Textbook Problem
1 views

The documentation for the computer language Java recommends that when an equals method” is defined for an object, it be an equivalence relation. That is, if R is defined as follows: x R y x . e q u a l s ( y ) equals for all objects in the class, then R should be an equivalence relation. Suppose that in trying to optimize some of the mathematics of a graphics application, a programmer creates an object called a point, consisting of two coordinates in the plane. The programmer defines an equals method as follows: If p and q are any points, then p . e q u a l s ( q ) the distance from p to q is less than or equal to c where c is a small positive number that depends on the resolution of the computer display. Is the programmer’s equals method an equivalence relation? Justify your answer.

To determine

To justify if the programmer’s equals method is an equivalence relation.

Explanation

Given information:

The documentation for the computer language Java recommends that when an “equals method” is defined for an object, it be an equivalence relation. That is, if R is defined as follows:

x R y ⇔ x.equals ( y ) for all objects in the class ,

Then R should be an equivalence relation. Suppose that in trying to optimize some of the mathematics of a graphics application, a programmer creates an object called a point, consisting of two coordinates in the plane. The programmer defines an equals method as follows: If p and q are any points, then

p.equals(q) ⇔ the distance from p to q is less than or equal to c

Where c is a small positive number that depends on the resolution of the computer display

Calculation:

P=All objects in the classR={(p,q)P×P|distance from p to q is less than or equal to c}

Let c be some small positive number

Reflexive:

Let xP

Since the distance from an object to itself is always 0 and since 0c (as c is positive), (x,x)R.

Since (x,x)R for all xP,R is indeed reflexive.

Symmetric:

Let us assume that (x,y)R

Still sussing out bartleby?

Check out a sample textbook solution.

See a sample solution

The Solution to Your Study Problems

Bartleby provides explanations to thousands of textbook problems written by our experts, many with advanced degrees!

Get Started
Sect-8.1 P-6ESSect-8.1 P-7ESSect-8.1 P-8ESSect-8.1 P-9ESSect-8.1 P-10ESSect-8.1 P-11ESSect-8.1 P-12ESSect-8.1 P-13ESSect-8.1 P-14ESSect-8.1 P-15ESSect-8.1 P-16ESSect-8.1 P-17ESSect-8.1 P-18ESSect-8.1 P-19ESSect-8.1 P-20ESSect-8.1 P-21ESSect-8.1 P-22ESSect-8.1 P-23ESSect-8.1 P-24ESSect-8.2 P-1TYSect-8.2 P-2TYSect-8.2 P-3TYSect-8.2 P-4TYSect-8.2 P-5TYSect-8.2 P-6TYSect-8.2 P-7TYSect-8.2 P-8TYSect-8.2 P-9TYSect-8.2 P-10TYSect-8.2 P-1ESSect-8.2 P-2ESSect-8.2 P-3ESSect-8.2 P-4ESSect-8.2 P-5ESSect-8.2 P-6ESSect-8.2 P-7ESSect-8.2 P-8ESSect-8.2 P-9ESSect-8.2 P-10ESSect-8.2 P-11ESSect-8.2 P-12ESSect-8.2 P-13ESSect-8.2 P-14ESSect-8.2 P-15ESSect-8.2 P-16ESSect-8.2 P-17ESSect-8.2 P-18ESSect-8.2 P-19ESSect-8.2 P-20ESSect-8.2 P-21ESSect-8.2 P-22ESSect-8.2 P-23ESSect-8.2 P-24ESSect-8.2 P-25ESSect-8.2 P-26ESSect-8.2 P-27ESSect-8.2 P-28ESSect-8.2 P-29ESSect-8.2 P-30ESSect-8.2 P-31ESSect-8.2 P-32ESSect-8.2 P-33ESSect-8.2 P-34ESSect-8.2 P-35ESSect-8.2 P-36ESSect-8.2 P-37ESSect-8.2 P-38ESSect-8.2 P-39ESSect-8.2 P-40ESSect-8.2 P-41ESSect-8.2 P-42ESSect-8.2 P-43ESSect-8.2 P-44ESSect-8.2 P-45ESSect-8.2 P-46ESSect-8.2 P-47ESSect-8.2 P-48ESSect-8.2 P-49ESSect-8.2 P-50ESSect-8.2 P-51ESSect-8.2 P-52ESSect-8.2 P-53ESSect-8.2 P-54ESSect-8.2 P-55ESSect-8.2 P-56ESSect-8.3 P-1TYSect-8.3 P-2TYSect-8.3 P-3TYSect-8.3 P-4TYSect-8.3 P-5TYSect-8.3 P-6TYSect-8.3 P-1ESSect-8.3 P-2ESSect-8.3 P-3ESSect-8.3 P-4ESSect-8.3 P-5ESSect-8.3 P-6ESSect-8.3 P-7ESSect-8.3 P-8ESSect-8.3 P-9ESSect-8.3 P-10ESSect-8.3 P-11ESSect-8.3 P-12ESSect-8.3 P-13ESSect-8.3 P-14ESSect-8.3 P-15ESSect-8.3 P-16ESSect-8.3 P-17ESSect-8.3 P-18ESSect-8.3 P-19ESSect-8.3 P-20ESSect-8.3 P-21ESSect-8.3 P-22ESSect-8.3 P-23ESSect-8.3 P-24ESSect-8.3 P-25ESSect-8.3 P-26ESSect-8.3 P-27ESSect-8.3 P-28ESSect-8.3 P-29ESSect-8.3 P-30ESSect-8.3 P-31ESSect-8.3 P-32ESSect-8.3 P-33ESSect-8.3 P-34ESSect-8.3 P-35ESSect-8.3 P-36ESSect-8.3 P-37ESSect-8.3 P-38ESSect-8.3 P-39ESSect-8.3 P-40ESSect-8.3 P-41ESSect-8.3 P-42ESSect-8.3 P-43ESSect-8.3 P-44ESSect-8.3 P-45ESSect-8.3 P-46ESSect-8.3 P-47ESSect-8.4 P-1TYSect-8.4 P-2TYSect-8.4 P-3TYSect-8.4 P-4TYSect-8.4 P-5TYSect-8.4 P-6TYSect-8.4 P-7TYSect-8.4 P-8TYSect-8.4 P-9TYSect-8.4 P-10TYSect-8.4 P-1ESSect-8.4 P-2ESSect-8.4 P-3ESSect-8.4 P-4ESSect-8.4 P-5ESSect-8.4 P-6ESSect-8.4 P-7ESSect-8.4 P-8ESSect-8.4 P-9ESSect-8.4 P-10ESSect-8.4 P-11ESSect-8.4 P-12ESSect-8.4 P-13ESSect-8.4 P-14ESSect-8.4 P-15ESSect-8.4 P-16ESSect-8.4 P-17ESSect-8.4 P-18ESSect-8.4 P-19ESSect-8.4 P-20ESSect-8.4 P-21ESSect-8.4 P-22ESSect-8.4 P-23ESSect-8.4 P-24ESSect-8.4 P-25ESSect-8.4 P-26ESSect-8.4 P-27ESSect-8.4 P-28ESSect-8.4 P-29ESSect-8.4 P-30ESSect-8.4 P-31ESSect-8.4 P-32ESSect-8.4 P-33ESSect-8.4 P-34ESSect-8.4 P-35ESSect-8.4 P-36ESSect-8.4 P-37ESSect-8.4 P-38ESSect-8.4 P-39ESSect-8.4 P-40ESSect-8.4 P-41ESSect-8.4 P-42ESSect-8.4 P-43ESSect-8.5 P-1TYSect-8.5 P-2TYSect-8.5 P-3TYSect-8.5 P-4TYSect-8.5 P-5TYSect-8.5 P-6TYSect-8.5 P-7TYSect-8.5 P-8TYSect-8.5 P-9TYSect-8.5 P-10TYSect-8.5 P-1ESSect-8.5 P-2ESSect-8.5 P-3ESSect-8.5 P-4ESSect-8.5 P-5ESSect-8.5 P-6ESSect-8.5 P-7ESSect-8.5 P-8ESSect-8.5 P-9ESSect-8.5 P-10ESSect-8.5 P-11ESSect-8.5 P-12ESSect-8.5 P-13ESSect-8.5 P-14ESSect-8.5 P-15ESSect-8.5 P-16ESSect-8.5 P-17ESSect-8.5 P-18ESSect-8.5 P-19ESSect-8.5 P-20ESSect-8.5 P-21ESSect-8.5 P-22ESSect-8.5 P-23ESSect-8.5 P-24ESSect-8.5 P-25ESSect-8.5 P-26ESSect-8.5 P-27ESSect-8.5 P-28ESSect-8.5 P-29ESSect-8.5 P-30ESSect-8.5 P-31ESSect-8.5 P-32ESSect-8.5 P-33ESSect-8.5 P-34ESSect-8.5 P-35ESSect-8.5 P-36ESSect-8.5 P-37ESSect-8.5 P-38ESSect-8.5 P-39ESSect-8.5 P-40ESSect-8.5 P-41ESSect-8.5 P-42ESSect-8.5 P-43ESSect-8.5 P-44ESSect-8.5 P-45ESSect-8.5 P-46ESSect-8.5 P-47ESSect-8.5 P-48ESSect-8.5 P-49ESSect-8.5 P-50ESSect-8.5 P-51ES