Python Complete Material
Python Complete Material
1 (a) Explain Relations and their Representations with suitable examples. Draw Representations of (i)
coordinate grid diagram, (ii) directed graph, and (iii) binary matrix for the relation R , on a set
A={1 , 2, 3 , 4 ,5 , 6 , 7 , 8 }, where a R b if and only if a /b ∈ Z .
(b) Write a short note on Equivalence relations and classes. A relation R on the set of integers Z is
defined by n R m if and only if ¿ n∨¿∨m∨¿. Show that R is an equivalence relation and determine
the corresponding equivalence classes.
2 (a) Show that the relation R is an equivalence relation on the set R of real numbers, where x R y if
and only if x 2= y 2 for all x and y in R .
(b) Let A=Z , the set of integers, and define a relation R on A by n R m if and only if n=2k m for
some integer k . Show that R is an equivalence relation.
3 (a) Find different equivalence classes of the sets (i) {1 , 2 ,3 }, and (ii) {1 , 2 ,3 , 4 }, and verify that
xRy if and only if (x− y )∈ Z defines an equivalence relation or not on the set Q of rational numbers.
If R is an equivalence relation, then describe the equivalence classes of 2, 1/4 and – 1 /4 .
(b) Let R be the relation on the set R of real numbers defined by x R y if and only if ⌊ x ⌋=⌊ y ⌋ ,
where the function ⌊ ⋅ ⌋ ‘floor’ or ‘integer part’ of a real number is the largest integer that is less than
or equal to the given real number. Check whether the relation R is an equivalence relation or not. If R
is an equivalence relation, then calculate equivalence classes [ 1/2 ] , [2.4] and [ n ] for some positive
integer n .
4 (a) Explain the partitions of a finite set with suitable example and find different partitions of the sets
(i) {a , b , c }, and (ii) {a , b , c , d }.
+ ¿¿
(b) Show that the relation R is an equivalence relation on the set Z of positive integers, where n R m
if and only if n−m is divisible by 2. Determine different equivalence classes of this relation and show
+ ¿¿
that these equivalence classes form a partition of Z .
5 (a) Explain partial and linear order relations with suitable examples. Verify that the divisibility
relation R , n R m if and only if n divides m , n∨m, is a partial order or linear order on the set of
positive integers.
(b) Demonstrate the procedure for determining Maximal and Minimal Elements of the poset with
suitable relation. Show that the relation R is a partial order on F , where A R B if and only if A=B or
¿ A∨¿∨B∨¿ and F be a non-empty family of finite sets. Describe the maximal and minimal
elements. Of R . Is R a total order in the case where F=P({1, 2 , 3})? Explain your answer.
6 (a) Write a short note on posets and Hasse diagrams of posets. Draw the Hasse diagram for the set
of non-empty proper subsets of {a , b , c , d } ordered by inclusion. Identify the maximal and minimal
elements and the chain(s) of greatest length.
(b) Let A be a poset with three elements. How many different kinds of Hasse diagrams of A are
possible? Hence find the total number of different partial orders that can be defined on a set with three
elements.
7 (a) Draw the Hasse diagrams for the set of non-empty proper subsets of { a , b , c } and {a, b, c, d}
ordered by inclusion. Identify the maximal and minimal elements and the chain(s) of greatest length.
(b) Explain minimal and maximal elements of a poset and write their difference. Find the minimal and
maximal elements of the poset R on the set A={2 , 3 , 4 , 5 , 6 ,7 ,8 }, where x R y if and only if x
divides y on A .
8 (a) Define Lattice and write their properties. Draw the Hasse diagram of the set of positive divisors
of 30, and determine whether it forms a lattice or not.
(a) Write differences between Lattices and Boolean algebras. Is every Boolean algebra a lattice?
Justify your answer with suitable examples.
9 (a) Explain Boolean algebra. What are its key properties, operations and identities? Show that the
set B={0 ,1 } is a Boolean algebra together with the binary operations ⊕ and ¿ and complement
operation−¿.
(b) Define power set of a set. Let S be a non-empty set and consider P(S), the power set of S, together
10 (a) Write the properties of Boolean algebra B, and for all b 1, b 2 ∈ B , show that (b 1 ⊕ b 2)=b 1∗b 2
and (b 1∗b2 )=b 1 ⊕ b 2.
(b) Prove that, in any Boolean algebra (B ,⊕ ,∗, ¯ , 0 , 1), b 1∗b2 =0 if and only if b 1∗b2=b1.
11 (a) Let B={1, 2 , 3 ,5 , 6 , 10 , 15 ,30 }. Binary operations denoted by ⊕ and ¿ and a unary
operation denoted by ¿ on B are defined as follows: for all b 1, b 2 ∈ B , we have b 1 ⊕ b 2=lcm(b 1 , b2 ),
b 1∗b2=gcd (b1 , b2) and b 1 ¿ 30/b 1. What are the identity elements with respect to ⊕ and¿? Show
that B together with the three operations is a Boolean algebra.
(b) Explain powerset P(S) of a set S. For all A ∈ P(S) , A=S− A . Then show that
(P(S),∪ ,∩ ,¯ , ∅ , S) is a Boolean algebra with 0=∅ and 1=S for the two identities.
12 (a) Evaluate the following for the Boolean algebra B({0 ,1 },⊕,∗, ¯ , 0 ,1):
i. b 1∗(b1 ⊕b 2)=b1∗b2,
ii. (b 1 ⊕b 2 ⊕b 3)∗(b 1 ⊕b 2)=b 1 ⊕b 2 and
iii. b 1 ⊕ [b 1∗(b2 ⊕ 1)]=b1.