   Chapter 8.2, Problem 55ES ### 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 symmetric, 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 symmetric 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 symmetric. 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 pair of elements (a,b) in R, if we will need to check if (b,a)R. If we find some (a,b)R such that (b,a)R, then the algorithm will need to return that the relation is not symmetric, else the algorithm will need to return that the relation is symmetric.

Algorithm body:

j:=1

if (a[i],a[j])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 