department of computer science
college of computing
western delta university
first semester examination 2023/2023 session
CSC205 - discrete structures time: 2hrs: 30mins
Answer question one (1) and choose three (3) other questions
Question 1 (Compulsory) (25 Marks)
Given the following expression:S = (6, 10, 14)
,T = (4, 10, 16)
andY = (X, Y, Z)
- Power Sets. P(S)
- Cartesiam Product. S * T
- Union. S ∪ T
- Intersection. S ∩ T
- Difference. S - T
Question 2 (15 Marks)
- Given that R = {(1,2),(2,3),(1,4)} be a relation (say on set Z). Then (1,3) ∈ R* (since (1,2),(2,3) ∈ R), but (2,4) ∈/R*. Draw the diagram, the graph of a relation and its transitive closure. (10 marks)
- Define the following:
- Set cardinality, Set equality (2.5 marks)
- Subsets (2.5 marks)
Question 3 (15 Marks)
- Define the following:
- A function.
- Injection
- Surjection
- Bijection
- Inverse relation
- Set cardinality
- Given two functions X, Y - Draw a:
- What are nested loops? (2 marks)
- A surjective function from X to Y (1.5 marks)
- Define the following:
Question 4 (15 Marks)
- Define the following terms:
- A directed graph (2.5 marks)
- Undirected graph (2.5 marks)
- Define Graph Isomorphism and show a diagram of an isomorphic diagram and a non-isomorphic graph (10 marks)
- Define the following terms:
Question 5 (15 marks)
- Consider the formula (P ∧ ¬Q) ⇒ (¬P ∨ Q), where P and Q are atoms.
- Is the formula valid? Justify your answer. (5 marks)
- Is the formula satisfiable? Justify your answer. (5 marks)
- Show with a diagram a strongly connected graph and a weakly connected graph. (5 marks)
- Consider the formula (P ∧ ¬Q) ⇒ (¬P ∨ Q), where P and Q are atoms.
Question 6 (15 Marks)
- Suppose we have an undirected graph G such taht the degree of each vertex is a multiple of 10 or 15. Show that the number of edges in G must be a multiple of 5. (10 marks)
- Give the table below, fill in the expected outcome for A and B. (5 marks)
A B ¬A A ∧ B A ∨ B A → B A ⟷ B T T T F F T F F