Uploaded by Pema

Assignment I.docx

advertisement
Assignment I
CSM101- Mathematics for Programming I
B.Sc. Computer Science, (Year I, Sem II)
Total Marks: 25
1. Convert the following formal language into logical expressions.
a) You can’t vote for upcoming NC elections if you are not Bhutanese and attained the
age above 18 years.
[2]
b) You can access the free Wi-Fi only if you are students of GCIT or have a permission
from the college.
[2]
2. Determine whether the following arguments are valid or not.
“If this number is larger than 2, then its square is larger than 4. This number is not
larger than 2. Therefore, the square of this number is not larger than 4”.
[4]
3. Let 𝑎, 𝑏, 𝑐 ∈ 𝑁. Prove that if 𝑎≡𝑏 (𝑚𝑜𝑑 𝑛), then 𝑎 ≡ 𝑐(𝑚𝑜𝑑 𝑛) . [Note: Refer the
definition of congruent modulo]
4. Consider the universal set 𝑈 = {1, 2 , 3, 4 , 5, 6, 7, 8 , 9}, and the sets.
[3]
[4]
𝐴 = {1, 2, 3, 4, 5} , 𝐵 = { 4, 5, 6, 7} 𝐶 = {5, 6, 7, 8, 9} , 𝐷 = {1, 3, 5, 7, 9}
𝐸 = {2, 4, 6, 8} 𝐹 = {1, 5, 9}. Find
a) Power set of set F
b) 𝐶 ⨁ 𝐹
c) (𝐵∩𝐹)∪(𝐶∩𝐸)
d) 𝐴∪𝐷
5. Write a program to construct truth table for the logical expression (𝑝 → 𝑞) ∧ (𝑝→¬𝑞)
and use conditional statement to check whether it is Tautology, Contingency or
Contraction.
[5]
6. Write a program to determine whether the following argument is valid or invalid.
[5]
Assessment Criteria
Note: This assessment criteria are for Question 5 and 6
Appropriate comments - 5%
Program logic 5%
Subtask completeness 5%
Output correctness 5%
Download