Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
47 views

Discrete Structure Assignment 1

Bsc notes

Uploaded by

Muhammad Ramzan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views

Discrete Structure Assignment 1

Bsc notes

Uploaded by

Muhammad Ramzan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

lOMoARcPSD|45509001

Discrete Structure Assignment 1

Discrete Stucture (Superior Group of Colleges)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by M Ramzan (mr0025326@gmail.com)
lOMoARcPSD|45509001

Submitted To:
Sir Hafiz Muhammad Shahzad

Subitted By:
Abdullah Azam

Roll No:
BSEM-F20-105

Department:
Software Engineering

Section:
3B
Assignment#1

Downloaded by M Ramzan (mr0025326@gmail.com)


lOMoARcPSD|45509001

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:

Downloaded by M Ramzan (mr0025326@gmail.com)


lOMoARcPSD|45509001

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.

Question 2: If it rains, then I will stay at home. [1]


Solution:
We have:
The given sentence is: “If it rains, then I will stay at home.”
This sentence is of the form: “If p then q”.
So, the symbolic form is p → q where-

p : It rains
q : I will stay at home

Converse Statement: If I will stay at home, then it rains.


Inverse Statement: If it does not rain, then I will not stay at home.
Contrapositive Statement: If I will not stay at home, then it does not
rain.

Downloaded by M Ramzan (mr0025326@gmail.com)


lOMoARcPSD|45509001

Valid and Invalid Statements


Question 1:
p→q
q→r
∴p∨q→r
Solution:

p q r p→q q→r p∨q p∨q→r

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.

Downloaded by M Ramzan (mr0025326@gmail.com)


lOMoARcPSD|45509001

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.

Downloaded by M Ramzan (mr0025326@gmail.com)


lOMoARcPSD|45509001

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:

Downloaded by M Ramzan (mr0025326@gmail.com)


lOMoARcPSD|45509001

Number of people who go to work by car only = 280


Number of people who go to work by bicycle only = 220
Number of people who go by neither car nor bicycle = 160
Number of people who use at least one of both transportation types =
n(only car) + n(only bicycle) + n(both car and bicycle) = 280 + 220 +
140 = 640
Number of people who use only one of car or bicycle = 280 + 220 = 500

Question 2: In a survey of university students, 64 had taken


mathematics course, 94 had taken chemistry course, 58 had taken
physics course, 28 had taken mathematics and physics, 26 had taken
mathematics and chemistry, 22 had taken chemistry and physics course,
and 14 had taken all the three courses. Find how many had taken one
course only.[3]
Solution:

Downloaded by M Ramzan (mr0025326@gmail.com)


lOMoARcPSD|45509001

From the venn diagram above, we have

No. of students who had taken only math = 24

No. of students who had taken only chemistry = 60

No. of students who had taken only physics = 22

Total no. of students who had taken only one course :

= 24 + 60 + 22

= 106

Hence, the total number of students who had taken only one course is
106.

Downloaded by M Ramzan (mr0025326@gmail.com)

You might also like