#OK to post homework #Zhizhang Deng, 09/24/2020, Assignment 4 1. CP({a,b,c},{b,c,d}) = {[a, b], [a, c], [a, d], [b, b], [b, c], [b, d], [c, b], [c, c], [c, d]} CheckMult({1,2},{3,4}) = True CheckAdd({1,2,3},{3,4,5})=CheckDecomp()= {1, 2, 3}, {3, 4, 5}, have the following common elements , {3} FAIL member([d,o,r,o,n],Words({d,o,n,r},5)) = True 2. 106 3. ===== CODE BELOW ===== PIE2:=proc(U,A1,A2) local a,b: if (not type(U, set)) or (not type(A1, set)) or (not type(A2, set)) then return (FAIL): fi; if (not verify(A1, U, `subset`)) or (not verify(A2, U, `subset`)) then return (FAIL): fi; a := nops((U minus A1) intersect (U minus A2)); b := nops(U) - nops(A1) - nops(A2) + nops(A1 intersect A2); return [a,b] end: ===== CODE END =====