You are on page 1of 6

KABARAK UNIVERSITY

UNIVERSITY EXAMINATIONS
MAIN CAMPUS
SECOND SEMESTER, 2023 ACADEMIC YEAR
EXAMINATION FOR THE DEGREE OF COMPUTER SCIENCE,
INFORMATION TECHNOLOGY, EDUCATION SCIENCE AND
COMPUTER SECURITY AND FORENSIC

COMP 121/COMP 122/ COSF 122: COURSE TITLE: DISCRETE


STRUCTURES

STREAM: [Y1S2] TIME: 11:30-1:30PM


EXAMINATION SESSION: MAY-AUGUST DATE: 08/08/2023
INSTRUCTIONS TO CANDIDATES
1. Answer Question 1 and any other two questions in the answer
booklet provided.
2. Do not write on your question papers. All rough work should be
done in your answer booklet.
3. Clearly indicate which question you are answering.
4. Write neatly and legibly.
5. Edit your work for language and grammar errors.
6. Follow all the instructions in the answer booklet

As members of Kabarak University family, we purpose at all times and in all places, to set apart in one’s heart,
Jesus as Lord. (1 Peter 3:15)
Kabarak University is ISO 9001:2015 Certified

Page 1 of 6
SECTION A: (Compulsory) TOTAL MARKS FOR THIS SECTION IS 30.

1.

a) Any ‘formal system’ can be considered logic if it has? (6 marks)


b) Show that (p → q) ↔ (q → p) is neither a tautology nor a contradiction (3 marks)

c) Using Boolean identities, reduce the given Boolean expression:

F(X, Y, Z) = X′Y + YZ′ + YZ + XY′Z′ (4 marks)

d) What is theprimary motivation for using Boolean algebra to simplify logic expressions?
(2
marks)
e) A coffee shop has 4 different types of coffee. You can order your coffee in a small,
medium, or large cup. You can also choose whether you want to add cream, sugar, or
milk (any combination is possible, for example, you can choose to add all three). In how
many ways can you order your coffee? (3 marks)
f) Derive the Boolean expression for the logic circuit shown below: (2 marks)

g) Determine whether the following pair of graphs are isomorphic (2 marks)

As members of Kabarak University family, we purpose at all times and in all places, to set apart in one’s heart,
Jesus as Lord. (1 Peter 3:15)
Kabarak University is ISO 9001:2015 Certified

Page 2 of 6
h) By use of the truth table discuss the following connectives

i. Implication (2 marks)
ii. Conjunction (2 marks)
iii. Disjunction (2 marks)
iv. Bi-conditional (2 marks)

SECTION B. TOTAL MARKS FOR THIS SECTION IS 40.


ANSWER ANY TWO QUESTIONS FROM THIS SECTION. EACH QUESTION IN
THIS SECTION CARRIES 20 MARKS.

2.

a) List any two applications of the graph coloring theorem. (2 marks )


b) Discuss any three reason counting is important in computers science (3 marks )
c) Using an example, explain the distinction between a proposition and predicate logic
(3
marks )
d) There are 20 black cell phones and 30 white cell phones in the store. An employee takes
10 phones at random. Find the probability that

i. There will be exactly 4 black cell phones among the chosen phones; (2 marks)
ii. There will be less than 3 black cell phones among the chosen phones.(2 marks)

e) From the truth table below, determine the standard SOP expression. (4 marks)

As members of Kabarak University family, we purpose at all times and in all places, to set apart in one’s heart,
Jesus as Lord. (1 Peter 3:15)
Kabarak University is ISO 9001:2015 Certified

Page 3 of 6
f) Use the graph given below to derive an adjacency matrix (4 marks)

3.

a) Show that the two statements (p ∧ q) → r and (p → r) ∧ (q → r) are not logically


equivalent. (3 marks)
b) Convert the following SOP expression to an equivalent POS expression. (3 marks

c) If the universal set is given by S={1,2,3,4,5,6}, and A={1,2}, B={2,4,5},C={1,5,6}are


three sets, find the following sets:

i. A∪B (1 mark)
ii. A∩B (1 mark)

As members of Kabarak University family, we purpose at all times and in all places, to set apart in one’s heart,
Jesus as Lord. (1 Peter 3:15)
Kabarak University is ISO 9001:2015 Certified

Page 4 of 6
d) Describe the following common gates giving their symbols and truth tables
i. AND (2 marks)
ii. NAND (2 marks)
iii. OR (2 marks)
iv. EX-OR (2 marks)
e) Discuss the different rules of inference for quantified statements along with suitable
example of each. (4 marks)

4.

a) Determine whether each statement is true or false, and explain your reasoning.
i. If an argument is valid then it is possible for the conclusion to be false when all
premises are true. (2 marks)
ii. If the premises can’t all be true, then the argument is valid. (2 marks)
iii. If p ⇔ q and q ⇔ r, then p ⇔ r. (2 marks)
b) Map the SOP expression into a k-map (2 marks)
c) Let A, B, Cbe three sets as shown in the following Venn diagram. For each of the
following sets, draw a Venn diagram and shade the area representing the given set.

i. A∪B∪C (1 mark)
ii. A∩B∩C (1 mark)
iii. A∪(B∩C) (1 mark)

d) Define the following terms


i. Permutation (1 mark)
ii. Combination (1 mark)
iii. Pigeon Hole Principle (1 mark)

e) Suppose that the computer science department contains 5 faculty members, a committee is
formed consisting of 3 members. How many ways are there to form the committee?
(3 mark)
f) Discuss the two application areas of proposition logic (3 mark)

As members of Kabarak University family, we purpose at all times and in all places, to set apart in one’s heart,
Jesus as Lord. (1 Peter 3:15)
Kabarak University is ISO 9001:2015 Certified

Page 5 of 6
5

a) Write each of the following statements, in English, in the form “if p, then q”.
i. I go swimming on Mondays. (1 mark)
ii. In order to be able to go motorcycling on Sunday, the weather must be good.
(1
mark)
iii. Eat your vegetables or you can’t have dessert. (1 mark)
b) What is the simplified sum of product form for the Boolean expression:

(A + B’ + C’)(A + B’ + C)(A + B + C’) (3 mark)

c) Given the following adjacency matrix draw the resulting graph G (3 mark)

(a) Define the following terms


i. Power set (1 mark)
ii. Proper subset (1 mark)
iii. Function (1 mark)
d) For a relation to have equivalence it must have three properties .discuss them (6 marks)
e) What is a complete graph? (2 marks)

As members of Kabarak University family, we purpose at all times and in all places, to set apart in one’s heart,
Jesus as Lord. (1 Peter 3:15)
Kabarak University is ISO 9001:2015 Certified

Page 6 of 6

You might also like