0

I am starting to learn graphs, even though I get a general what they are I can't understand the details of equivalence classes implantation and the role they contribute to building a graph.I have an assignment with very unclear and vague instructions to implement the following methods to complete an equivalence class add_singleton, compress_to_root, in_same_class, merge_classes_of, and classes. I am hoping to understand the general function of an equivalence class so I can try to figure out what each method does in details.

Any help would be appreciated, Thank you.

Dominique Fortin
  • 2,212
  • 15
  • 20
Kareem Aboughazala
  • 535
  • 1
  • 6
  • 15

1 Answers1

0

Equivalence classes are simply ways to organize a data set into categories. Each member shares a property with all other members of that category. That is what the word class refers to. If a test for that property is true for one, it is true for all. This is what the word equivalence refers to. Here are some equivalence classes in the Unicode Character Database:

  • Alphabetic
  • Dash
  • Line Break
  • Math
  • Numeric
  • White Space
  • Byte Order Signature
  • Control Characters

References

Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265