Sei sulla pagina 1di 10

July 2011

Master of Computer Application (MCA)


Semester 1
MC0063 Discrete Mathematics 4 Credits
(Book ID: B0676 and B0677)

Name: Ritesh Kumar Saha
Roll Number: 521102846
Program Code: PGDCA
Centre Code: 1626

























July 2011
Master of Computer Application (MCA) Semester 1
MC0063 Discrete Mathematics 4 Credits (Book ID: B0676 and B0677)
Assignment Set 1 (60 Marks)
1. If then evaluate the following
a) (A C)

c) (B
C)






2. Obtain the Euler | - function, | (n), the number of integers x such that 1 s x < n and relatively prime to
n.






3. Write short notes on
(a) Public key Cryptography
(b) The R.S.A Cryptosystem
Ans:
(a) Public key Cryptography refers to a cryptographic system requiring two separate keys, one to lock or
encrypt the plaintext, and one to unlock or decrypt the cyphertext. Neither key will do both functions. One of
these keys is published or public and the other is kept private. If the lock/encryption key is the one published then
the system enables private communication from the public to the unlocking key's owner. If the unlock/decryption
key is the one published then the system serves as a signature verifier of documents locked by the owner of the
private key.
This cryptographic approach uses asymmetric key algorithms, hence the more general name of "asymmetric key
cryptography". Some of these algorithms have the public key/private key property; that is, neither key is derivable
from knowledge of the other; not all asymmetric key algorithms do. Those with this property are particularly
useful and have been widely deployed, and are the source of the commonly used name. The public key is used
to transform a message into an unreadable form, decryptable only by using the (different but matching) private
key. Participants in such a system must create a mathematically linked key pair (i.e., a public and a private key).
By publishing the public key, the key producer empowers anyone who gets a copy of the public key to produce
messages only s/he can read -- because only the key producer has a copy of the private key (required for
decryption). When someone wants to send a secure message to the creator of those keys, the sender encrypts it
(i.e., transforms it into an unreadable form) using the intended recipient's public key; to decrypt the message, the
recipient uses the private key. No one else, including the sender, can do so.
Thus, unlike symmetric key algorithms, a public key algorithm does not require a secure initial exchange of one,
or more, secret keys between the sender and receiver. These algorithms work in such a way that, while it is easy
for the intended recipient to generate the public and private keys and to decrypt the message using the private
key, and while it is easy for the sender to encrypt the message using the public key, it is extremely difficult for
anyone to figure out the private key based on their knowledge of the public key. They are based on mathematical
relationships (the most notable ones being the integer factorization and discrete logarithm problems) that have
no efficient solution.
The use of these algorithms also allows authenticity of a message to be checked by creating a digital signature of
a message using the private key, which can be verified using the public key.
Public key cryptography is a fundamental and widely used technology. It is an approach used by many
cryptographic algorithms and cryptosystems. It underpins such Internet standards as Transport Layer Security
(TLS) (successor to SSL), PGP, and GPG.
(b) The R.S.A Cryptosystem
In cryptography, RSA (which stands for Rivest, Shamir and Adleman who first publicly described it) is an
algorithm for public-key cryptography.
[1]
It is the first algorithm known to be suitable for signing as well as
encryption, and was one of the first great advances in public key cryptography. RSA is widely used in electronic
commerce protocols, and is believed to be sufficiently secure given sufficiently long keys and the use of up-to-
date implementations.
Key generation
RSA involves a public key and a private key. The public key can be known to everyone and is used for
encrypting messages. Messages encrypted with the public key can only be decrypted using the private key. The
keys for the RSA algorithm are generated the following way:
1. Choose two distinct prime numbers p and q.
o For security purposes, the integers p and q should be chosen at random, and should be of
similar bit-length. Prime integers can be efficiently found using a primality test.


2. Compute n = pq.
o n is used as the modulus for both the public and private keys
3. Compute (n) = (p1)(q1), where is Euler's totient function.
4. Choose an integer e such that 1 < e < (n) and gcd(e,(n)) = 1, i.e. e and (n) are coprime.
o e is released as the public key exponent.
o e having a short bit-length and small Hamming weight results in more efficient encryption -
most commonly 0x10001 = 65537. However, small values of e (such as 3) have been shown to
be less secure in some settings.
[4]

5. Determine d = e
1
mod (n); i.e. d is the multiplicative inverse of e mod (n).
o This is often computed using the extended Euclidean algorithm.
o d is kept as the private key exponent.
The public key consists of the modulus n and the public (or encryption) exponent e. The private key
consists of the private (or decryption) exponent d which must be kept secret.


4. Proove the given theorem as below:
If S1 = { x1, x2, .. xn} and
S2 = {y1, y2, . yn} are any two finite sets with n elements, then the lattices (P(S1), _ ) and (P(S2), _ )
are isomorphic. Consequently the Hasse diagrams of these lattices may be drawn identically.
Ans:
Arrange the sets as known in Fig. 1,
so that each element of S1
is directly over the correspondingly numbered element in S2

Let A be a subset of S1
Define f (A) = subset of S2 consisting of all elements that correspond to the

It can be easily seen that f is one one and onto. Also if and only if
for all 1).
Therefore the lattices (P(S
1
and (P(S
2
are isomorphic.







4. Proove the given theorem as below:
If S1 = { x1, x2, .. xn} and
S2 = {y1, y2, . yn} are any two finite sets with n elements, then the lattices (P(S1), _ ) and (P(S2), _ )
are isomorphic. Consequently the Hasse diagrams of these lattices may be drawn identically.
Ans:
Arrange the sets as known in Fig. 1,
so that each element of S1
is directly over the correspondingly numbered element in S2

Let A be a subset of S1
Define f (A) = subset of S2 consisting of all elements that correspond to the

It can be easily seen that f is one one and onto. Also if and only if
for all 1).
Therefore the lattices (P(S1 and (P(S2 are isomorphic.

5. Evaluate the following fuzzy logic formulas where a = 0.5 and b = 0.7. (2/ 7.4.18)
(a)
a
= 0.4
(b) a . b
(c) a v b
(d) a b
Ans: (a)
a
= 0.4
a
= 1 a
= 1 0.4
= 0.4
(b) a . b
a . b = min {0.4,0.7}


= 0.4
(c) a v b
a v b = max{0.4,0.7}
= 0.7
(d) a b
a b = min{1,1-0.4+0.7}
= 1

6. Verify whether or not, the following graphs are planar?







Ans:
(I ) Observe the Kuratowskis 2
nd
graph K3,3.

It is clear that the graph contains six vertices vi
i
, , , , , . Now we have a Jordan curve. So plane
of the paper is divided into two regions, one inside and the other outside. Since v1 is connected to v4, we can add
the edge in either inside or outside (without intersecting the edges already drawn). Let us draw
inside. (If we choose outside, then we end up with the same argument Now we have the Fig. 1 (A) Next we have
to draw an edge and also another edge . First we draw . If we draw it inside, we get a cross
over the edge . So we draw it outside. Then we get the Fig. 1 (B). Still we have to draw an edge from v3 to
v6. If drawn inside, it cross the edge (see the Fig. 1 (C) ).
(i)
o
o
o
o
o
o
f
d
c
e
b a (ii)
o
o
o
o
o
o
Fig1.A
Fig 1.B



So we can not draw it inside. So we select the case of drawing cross the edge (see the Fig. 1(D)).
Thus can not be drawn either inside or outside with out a cross over. Hence the given graph is not a
planar graph.

(II)

i) From the construction of the dual G
*
of G, it is clear that there is a one-to-one correspondence between
the set of all edges of G and the set of all edges of G
*
. Also one edge of G
*
intersects one edge of G.
ii) An edge forming a self-loop in G yields a pendent edge in G
*
and a pendent edge in G yields a self-loop
in G
*
.
iii) Edges that are in series in G produce parallel edges in G
*
.
[If e1, e2 are in series in G, then , are parallel in G
*
].
iv) Parallel edges in G produce edges in series in G
*
.
v)It is a general observation that the number of edges constituting the boundary of a region Fi in G is equal
to the degree of the corresponding vertex pi in G
*
, and vice versa.
vi) The graph G
*
is embedded in the plane, and so G
*
is also a planar graph.
vii) Consider the process of drawing a dual G
*
from G. It can be observed that G is a dual G
*
. Therefore
instead of calling G
*
, a dual of G, we can usually say that G and G
*
are dual graphs.
So, Given Graph is Planar Graph




1. Check whether the following set of vectors is LD or LI
(a){(1, 0, 0), (2 , 0, 0), (0, 0, 1)}, (b) {(1, 0, 1) , (1, 1, 0), (1, 1, -1)}

Fig 1 C
Fig 1 D



2. (a) Identity e = 3, a
-1
=
a
9
.
(b) Identity e = 2 and the inverse of a i.e., a
-1
=
a
4
.



3. For any a and b in a Boolean algebra

b a b a . = v


b a b a v = .

Ans:
We show that
is the complement of b.

(
(by associative and commutative)


= 1
Also,


=
= 0
Therefore
By the principle of duality,





4. Prove that a connected graph G is an Euler graph if and only if it can be decomposed into circuits.
Ans:
Suppose graph G can be decomposed into circuits; that is, G is a union of edge-disjoint circuits. Since
the degree of every vertex in a circuit is two the degree of every vertex in G is even. Hence G is an Euler graph.
Conversely, let G be an Euler graph. Consider a vertex v1. There are atleast two edges incident at v1.
Let one of these edges be between v1 and v2. Since vertex v2 is also of even degree, it must have at least
another edge, say between v2 and v3. Proceeding in this fashion, we eventually arrive at a vertex that has
previously been traversed, thus forming a circuit . Let us remove from G. All vertices in the remaining graph
(not necessarily connected) must also be of even degree. From the remaining graph remove another circuit in
exactly the same way as we removed from G. Continue this process until no edges are left. Hence the theorem.
Arbitrarily Traceable Graphs:
Consider the graph in Fig. 1 which is an Euler graph. Suppose that we start from vertex a and trace the
path a b c.

Fig. 1: Arbitrarily traceable graph from c
Now at c we have the choice of going to a, d or e. If we took the first choice, we would only trace the
circuit a b c a, which is not an Euler line. Thus, starting from a, we cannot trace the entire Euler line simply by
moving along any edge that has not already been traversed.
Such a graph is called an arbitrarily traceable graph from vertex v. For instance, the Euler graph in Fig.
1 is an arbitrarily traceable graph from vertex C, but not from any other vertex.
An Euler graph G is arbitrarily traceable from vertex v in G if and only if every circuit in G contains v.

5. Prove the theorem as given below
If a binary n-tuple (x1, x2, , xn) is transmitted across a binary symmetric channel with probability p that
no error will occur in each coordinate, then the probability that there are errors in exactly k coordinates
is
k n k
n
q p
k

| |
|
\ .

Ans:
Fix k different coordinates. We first compute the probability that an error has occurred in this fixed set of
coordinates. The probability of an error occurring in a particular one of these k coordinates is q; the probability
that an error will not occur in any of the remaining n-k coordinates is p. The probability of each of these n
independent events is q
k
p
n-k
.
The number of possible error patterns with exactly k errors occurring is equal to


, the number of combinations of n things taken k at a time. Each of these error patterns
has probability q
k
p
n-k
of occurring; hence the probability of all these error patterns is .

6. Prove that a non-empty subset H of a group G is a subgroup of G if and only if
a)
H ab H b a e e ,

b)
H a H a e e
1

Ans:
Suppose that H is a subgroup of G
H itself is a group under the product in G.
Therefore (a), (b) holds.
Converse: Suppose H satisfies (a) and (b). By (a), H satisfies the closure property.
For any a, b, c H, we have that a, b, c G implies that a(bc) = (ab)c.
Therefore (H, .) is a subgroup of (G, .).

Potrebbero piacerti anche