Sheet5 - (a) {( x , y ) | z ( z 0 x + z = y )} (b) {( x , y...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
McMaster University Department of Computing and Software Dr. W. Kahl COMP SCI 1FC3 Exercise Sheet 5 COMP SCI 1FC3 — Mathematics for Computing 6 February 2009 Exercise 5.1 — Partial Orders Which of the following relations are partial orders? For those that are, draw their Hasse diagram; for those that are not, point out why. (a) d c b a d c b a (b) d c b a (c) d c b a (d) d c b a (e) d c b a (f) d c b a (g) d c b a (h) d c b a Exercise 5.2 — Partial Orders For each of the following Hasse diagrams, determine the matrix representation of the depicted ordering relation. (a) (b) (c) (d) Also determine in each case (as far as they exist) the minima, maxima, greatest and least element of the whole poset, and the lub and the glb of the set { c , d } . Exercise 5.3 — Partial Orders For each of the following posets, draw the Hasse diagram. (a) ( IP {1, 2}, ⊆ ) (b) ( IP {1, 2, 3}, ⊆ ) (c) ( IP {1, 2, 3, 4}, ⊆ ) (d) ({ a , b , aa , ab , ba , bb , aaa , aab , aba , abb , baa , bab , bba , bbb }, isPrefxOF ) Exercise 5.4 — Partial Orders Explain the following relations. Which of these relations are partial orders? For those that are not, show which properties fail to hold. Which are total orders?
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: (a) {( x , y ) | z ( z 0 x + z = y )} (b) {( x , y ) | z ( z 0 x-z = y )} (c) {( x , y ) | z ( z 1 x + z = y )} (d) {( x , y ) | z ( z 1 x * z = y )} (e) {( x , y ) | z ( z 1 x / z = y )} (e) {( x , y ) | x = y x + 1 = y } (f) {( x , y ) | x = y x + 1 y } (g) {( x , y ) | x = y x + 1 < y } Exercise 5.5 Haskell (a) Work through the Learn Haskell in 10 minutes tutorial linked from the course page. (b) Modify the le RelTest.pdf from RATH1FC.zip (see Exercise 4.5) by adding a function testRel that takes a relation r as argument and prints messages reporting whether r is symmetric, antisymmentric, transitive, (locally) reexive. (c) Also add a function that generates (preferably a suitable generalisation of) the isPrefxOF relation from Exercise 5.3(d)....
View Full Document

Ask a homework question - tutors are online