Discrete Structure Assignment 1
Discrete Structure Assignment 1
Submitted To:
Sir Hafiz Muhammad Shahzad
Subitted By:
Abdullah Azam
Roll No:
BSEM-F20-105
Department:
Software Engineering
Section:
3B
Assignment#1
Proposition
Question 1: (pVq)^~p
Solution:
p q ~p pVq (pVq)^~p
0 0 1 0 0
0 1 1 1 1
1 0 0 1 0
1 1 0 1 0
Question 2: (p^q)->(~p^~q)
Solution:
p q ~p ~q (p^q) (~p^~q) (p^q)->(~p^~q)
0 0 1 1 0 1 1
0 1 1 0 0 0 1
1 0 0 1 0 0 1
1 1 0 0 1 0 0
Converse,Inverse,Contrapositive
Question 1: If today is Sunday, then it is a holiday. [1]
Solution:
We have:
The given sentence is: “If today is Sunday, then it is a holiday.”
This sentence is of the form- “If p then q”.
So, the symbolic form is p → q where:
p : Today is Sunday
q : It is a holiday
Converse Statement: If it is a holiday, then today is Sunday.
Inverse Statement: If today is not Sunday, then it is not a holiday.
Contrapositive Statement: If it is not a holiday, then today is not
Sunday.
p : It rains
q : I will stay at home
0 0 0 1 1 0 1
0 0 1 1 1 0 1
0 1 0 1 0 1 0
0 1 1 1 1 1 1
1 0 0 0 1 1 0
1 0 1 0 1 1 1
1 1 0 1 0 1 0
1 1 1 1 1 1 1
Notice that all critical rows have a true conclusion and thus the argument
is valid.
Question 2:
p∨q
p →∼ q
p→r
∴r
Solution:
p q r ~q p∨q p →∼ q p → r r
0 0 0 1 0 1 1 0
0 0 1 1 0 1 1 1
0 1 0 0 1 1 1 0
0 1 1 0 1 1 1 1
1 0 0 1 1 1 0 0
1 0 1 1 1 1 1 1
1 1 0 0 1 0 0 0
1 1 1 0 1 0 1 1
Notice that the 3th row is a critical row with a false conclusion, so it
follows that the the argument is invalid.
Venn Diagram
Question 1: Suppose that in a town, 800 people are selected by random
types of sampling methods. 280 go to work by car only, 220 go to work
by bicycle only and 140 use both ways – sometimes go with a car and
sometimes with a bicycle.
Here are some important questions we will find the answers:
How many people go to work by car only?
How many people go to work by bicycle only?
How many people go by neither car nor bicycle?
How many people use at least one of both transportation types?
How many people use only one of car or bicycle?[2]
Solution:
The following Venn diagram represents the data above:
= 24 + 60 + 22
= 106
Hence, the total number of students who had taken only one course is
106.