Question

5. (6 marks) Let S be the set of all binary strings of length 6. Consider the relation ρ on the set S in which for all a,b ∈ S, (a,b) ∈ ρ if and only if the length of a longest substring of consecutiv...

5. (6 marks) Let S be the set of all binary strings of length 6. Consider the relation ρ on the set S in which for all a,b ∈ S, (a,b) ∈ ρ if and only if the length of a longest substring of consecutive ones in a is the same as the length of a longest substring of consecutive ones in b.
(a) Is 011010 related to 000011? Explain why or why not.

(b) Prove that ρ is an equivalence relation.

(c) List the elements of the equivalence class [111100].

0 0
Add a comment Improve this question Transcribed image text
Answer #1

(a) Yes, both the strings are related to each other.

The consecutive length of strings in the first case (011010) is 2, because of 2nd and 3rd 1's in consecutive order.

Similarly, the 000011 is 2, because of 5th and 6th 1's in consecutive order

(b) For the relation p to be an equivalence relation. It must be reflexive, symmetric and transitive in nature

Relation is said to be reflexive if (a,a) belongs to R

The statement is TRUE, since the number of consecutive 1's in the single string pattern will be same.

Relation is said to be symmetric, if (a,b) belongs to R, then (b,a) belongs to R

The statement is TRUE, since if (a,b) belongs to R, then it implies that number of consecutive 1's in both strings a and b are same.

Hence the relation is symmetric in nature

Relation is said to be transitive, if (a,b) and (b.c) belongs to R, then (a,c) belongs to R

The statement is TRUE, since if (a,b) and (b.c) belongs to R, then it implies that number of consecutive 1's in both strings a and b are same and number of consecutive 1's in both strings b and c are same, which implies the strings a and c also have same length of consecutive 1's

Hence the relation is symmetric in nature

(c) The equivalence class will have four consecutive 1's, hence the elements of the equivalence class will be

011110, 001111,111101,101111, 111100

Note - Post any doubts/queries in comments section.

Add a comment
Know the answer?
Add Answer to:
5. (6 marks) Let S be the set of all binary strings of length 6. Consider the relation ρ on the set S in which for all a,b ∈ S, (a,b) ∈ ρ if and only if the length of a longest substring of consecutiv...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT