   Chapter 8.2, Problem 54ES ### Discrete Mathematics With Applicat...

5th Edition
EPP + 1 other
ISBN: 9781337694193

#### Solutions

Chapter
Section ### Discrete Mathematics With Applicat...

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

# Write a computer algorithm to test whether a relation R defined on a finite set A is reflexive, where A = { a [ 1 ] , a [ 2 ] , .... , a [ n ] }

To determine

To write a computer algorithm to test whether a relation R defined on a finite set A is reflexive or not, where A={a,a,...,a[n]}.

Explanation

Given information:

A={a,a,...,a[n]}.

Calculation:

We need to create an algorithm that will check if some relation is reflexive. The input will be a relation R on a set A={a|1|,a|2|,...,a|n|}

Input:

A={a,a,...,a[n]},R[a relation on the set A]

For each element a in A, we will need to check if (a,a)R. if we find some a such that (a,a)R, then the algorithm will need to return that the relation is not reflexive, else the algorithm will need to return that the relation is reflexive.

Algorithm body:

if (a

### 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 