1 / 10

Sorting Socks

Sorting Socks. Sort these 6 socks. How to determine which comes first?. Compare 2 at a time. Draw arrows from an “earlier” sock to a “later” one. As many arrows as you wish to show the sorting order you have decided. Sorting as a Binary Relation. Sorting as a Binary Relation.

parkl
Download Presentation

Sorting Socks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Sorting Socks

  2. Sort these 6 socks • How to determine which comes first?

  3. Compare 2 at a time • Draw arrows froman “earlier” sock toa “later” one. • As many arrows as you wish to show the sorting order you have decided.

  4. Sorting as a Binary Relation

  5. Sorting as a Binary Relation You don’t want Symmetry

  6. Sorting as a Binary Relation This sort of Symmetry is ok though

  7. Sorting as a Binary Relation We want self loops

  8. Sorting as a Binary Relation

  9. Sorting as a Binary Relation We want Transitivity

  10. Sorting as a Binary Relation With these properties: • Reflexive • Anti-symmetric • Transitive A binary relation with said properties is called a partial order. Sorting requires at least a partial order; better still a total order.

More Related