Question #141760
a) Let A = (1,2,3,4) and R = ((1 ,2),(2,4),( 1,3 ),(3 ,2)}. Find the transitive closure of R by Warshall’s algorithm.
b) Let A = {a,b,c}. show that (P(A),c ) is a poset and draw its Hasse diagram.
c) Define Chains and Antichains.
1
Expert's answer
2020-11-03T17:52:16-0500

(a) The matrix that represents R is shown below. It will be an initial matrix for the algorithm.


W0=[0110000101000000]W^0=\begin{bmatrix} 0 & 1 & 1 & 0\\ 0 & 0 & 0 & 1\\ 0 & 1 & 0 & 0\\ 0 & 0 & 0 & 0 \end{bmatrix}


For every step, Wi,jn:=Wi,jn1(Wi,kn1Wk,jn1)W^n_{i,j} := W^{n-1}_{i,j} \vee (W^{n-1}_{i,k} \wedge W^{n-1}_{k,j}) for some kk.

In other words, we can add a new pair (i,j)(i, j) to the relation RiR^i corresponding to WiW^i, if and only if there is some kk in Ri1R^{i-1} corresponding to Wi1W^{i-1}.


W1=[0111000101010000]W^1=\begin{bmatrix} 0 & 1 & 1 & \color{red}1\\ 0 & 0 & 0 & 1\\ 0 & 1 & 0 & \color{red}1\\ 0 & 0 & 0 & 0 \end{bmatrix}


(1,2)R0(2,4)R0    (1,4)R1(1, 2) \in R^0 \wedge (2, 4) \in R^0 \implies (1, 4) \in R^1

(3,2)R0(2,4)R0    (3,4)R1(3, 2) \in R^0 \wedge (2, 4) \in R^0 \implies (3, 4) \in R^1


W1=W2=WW^1=W^2 =W.


Answer: The resulting transitive closure is

R+={(1,2),(1,3),(1,4),(2,4),(3,2),(3,4)}.R^+ = \{(1,2),(1,3), (1,4), (2,4), (3,2), (3,4)\}.



(b) P(A)={,{a},{b},{c},{a,b},{b,c},{a,c},{a,b,c}}.P(A) = \big \{ \varnothing, \{a\}, \{b\}, \{c\}, \{a, b\}, \{b, c\}, \{a,c\}, \{a, b,c\} \big \}.

Let's show S=(P(A),)S=(P(A), \subseteq) is a poset. Let's show that SS satisfies the following three properties.

  1. Reflexivity. For every xP(A) xxx \in P(A) \ x \subseteq x is trivially true.
  2. Antisymmetry. Let x,yP(A)x, y \in P(A) and xyyzx \subseteq y \wedge y \subseteq z.Then x=yx=y from the definition.
  3. Transitivity. Let x,y,zP(A)x, y,z \in P(A) and xyyxx \subseteq y \wedge y \subseteq x. Then for allaxa \in x we have aya \in y, and therefore aza \in z. Thus xzx \subseteq z.

The Hasse diagram for (P(A),)(P(A), \subseteq) is shown below.



(c) A chain in a poset (P,)(P, \le) is a subset APA \subseteq P such that any two elements x,yAx, y\in A are comparable (thus for every x,yAx, y \in A either xyx \le y or yxy \le x or both hold).

An antichain in a poset (P,)(P, \le) is a subset APA \subseteq P such that no two elements x,yAx,y\in A are comparable.


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!
LATEST TUTORIALS
APPROVED BY CLIENTS