Download university of nairobi

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
UNIVERSITY OF NAIROBI
UNIVERSITY EXAMINATIONS 2014/2015
FIRST YEAR EXAMINATION FOR THE DEGREE OF BACHELOR OF ARTS IN ICT
ICS 115 DISCRETE MATHEMATICS
Date: Wed. Apr. 22, 2015 Time: 9am – 11am
Answer Question one and any other two Questions
QUESTION I (30 MARKS)
(a ) Find the characteristic equation and the form of solution of the recurrence relation
sn  2sn1  3sn2 ; s0  1; s1   3; n  2. r 2  2r  3   r  3 r  1  0; sn  cn r1n  cn r2n ;
s0  1  c1  c2 ; s1  3  c1  3  c2 ; 4  4c1; c1  1; c2  0  sn   3 Ans
[5]
n
(b) Solve: (i) |x-3| > 1;
solution  ,2
 4,  Ans
(ii) |2x+3| <1. solution. -2<x<-1 Ans [5]
(c)… Find the number of positive integers less than 21 that are relatively prime to 21
| A7c A3c | 21  7  3  1  12 Ans. [5]
(d) Simplify then give the truth table of the following: [( p  q)  (p  q)]  p =
[(p  q)  (p  q)]  p   p  q   p  p  q  p  p  q  {T ,T ,T , F} Ans [5]
(e) Given A = {1,2,3,4}, R={(1,1),(1,2),(1,3),(1,4),(2,2),(2,4), (3,2),(3,3),(3,4), (4,2), (4,4)}; (i) give
for (A,R), the adjacency matrix, and the diagraph.
2
1 1 1 1
1
0 1 0 1



 =M; 

0 1 1 1 






4
0 1 0 1 
3
(ii) An equivalence relation is reflexive, symmetric, and transitive relation. (A, R) is reflexive, not
symmetric because there exist (1,3) but (3,1) does not exist. It is therefore not an equivalence
relation on (A,R). [5]
(f) Transform the Boolean expression into disjunctive normal form, hence give its dual:
x’(xy’+ yx’ + y’z)’= x '[( x ' y)  y ' x  y  z ']   x ' y ' y  z ' x ' y   x ' y '  y  z '   x ' y ' z ' Ans
[5]
QUESTION II (10 MARKS)
(a) State the mathematical inductive assumption, hence demonstrate by mathematical induction that
n
1
n
1
1
1
1
k
sn  

; s1  1 and s1  1. Let sn 


 ..... 

n 1
1.2 2.3 2.3
k k  1 k k  1
k 1 k k  1
5]
k
1
1 
1 
k 2  2k  1
k 1
sk 1 



 s is true nN Ans
k 

k  1 k  1k  2 k  1  k  2  k  1k  2 k  2 k 1
(c) Simplify then give the truth table of the following:
 p  q    q  p    q  [ p  q    p  q ]  q    p  F   q  p  q  T , F , T , T  [5]
QUESTION III (10 MARKS)
(a) Given that A = {a, b, c}, R = {(a, a), (a, c), (b, a), (a, b), (b, b), (b, c), (c, a), (c, c)} determine the
adjacency matrix and the diagraph of (A, R). Determine whether (A, R) is an equivalence
relation; a poset.
-1-
a
1 1 1 


1 1 1   M

M
It is not symmetric because (b,c) exist but




1 0 1 
b
c 
not (c,b). It is therefore not an equivalence relation. There exist (c,a) and (a,b) but not (c,b), hence
not transitive, hence not a poset. [5].
(b. For integers a and b ; a  b(mod 4) partition the set of integers into four disjoint sets. {[0], [1],
[2], and [3]} Each partition satisfy reflexive, symmetric and transitive relations. Hence
equivalence relation. Each partition does not satisfy antisymmetry. In each exist (-a,a) such that
a  a(mod 4) and a  a(mod 4) but a  a . Hence not a poset. [5]
QUESTION IV (10 MARKS)
For a finite nonempty school of sets
(a)
m 
m
C C C
C
 Ai  , | A1 A2 A3 ..... Am | | U |  | Ai |   | Ai Aj |   | Ai Aj Ak |  ....   1 | A1 A2 A3 A4 .... Am |
i
i j
i  j k
1 
| A7c A5c | |
|  | A7 |  | A5 |  | A7 A5 |  35  7  5  1  24 Ans [3]
(b) (i) A Lattice is a poset in which for every pair of elements x, and y, there exist x meet y, and x
join y.  D21 , | is a lattice, bounded by 21 and 1 ; every element is complemented, and it is
21
distributive; (iii) Its Hasse Diagram. 3
7 [3]
1
(c ) Find n if (i) P(n,2)  72 
n!
 72  n(n  1)  n 2  n  72  0  n  9; n  8 Ans
n  2!
(ii)
P(n,4)  42 Pn,2 
n!
42n!

 n 2  5n  6  42  n  9n  4  0  n  9; n  4 Ans
(n  4)! n  2!
(4 marks [4]
QUESTION V (10 MARKS)
(a).A Boolean Algebra is a lattice with two elements, I and o, or 1 and 0. It is distributive,
complemented, and bounded. y(x’z)’ + y’z + x’ (x y’ + z)  yx  yz ' y ' z  x ' z =
.xyz+xyz’+x’yz’+xy’z+x’y’z+x’yz+x’y’z = xyz + xyz’ +xy’z +x’yz + x’yz’ +x’y’z =Sn
S* = (x+y+z)(x+y+z’)(x+y’+z)(x’+y+z)(x’+y+z’)(x’+y’+z) Ans [3]
(b). The solution of the recurrence relation
sn  3sn2 ; s0  1; s1  2; n  2; r 2  3  r   3  r1   3 ; r2 3  sn  c1r1n  c2 r2n
s0  c1  c2 1; s1  2  c1 3  c2 3 
2 3
3 1 2 3 3
32 3
 c1  c2  c2 
 
; c1 
. [4]
3
3 2
6
6
sn  ( 3) n c1  c2 ( 3) n
(c ) ) For integers a and b ; show that a  b(mod 2) partition the set of integers into two disjoint sets.
Each partition satisfy equivalence relation and not a partial ordering relation with respect to (mod 2)
concept; e.g. In each, are a  a(mod 2) and  a  a(mod 2) . antisymmetry fails because –a is
different from a. [3]
-2-
Related documents