SlideShare a Scribd company logo
1 of 17
Module code: 124ms
Tajvinder Virdee
Sets and Logic Coursework 1
1. Find the truth value of P (Q R) if P is false, Q is true, and
R is false. What is the truth
value of this expression if the brackets are removed?
Substituting in the truth values, we obtain
f (t f)
As there is a set of brackets, the brackets have to be done first
as they have a higher order of
precedence. So (Q R), becomes (t f) which we can say is
false, as if Q is true and R is
false the truth value of this implication is false. This then
becomes
f f
which is equivalent to
f
If the brackets are removed, then the order of the procedure
changes.
The expression now becomes
P Q R, where P is false, Q is true, and R is false.
Inserting the truth values of P, Q and R, we get
f t f
Since has higher priority than , we have to work out the f
t first. This gives us the
value false as not both parts are true.
f f
This gives t
As false implies false, the truth value is true, meaning that the
expression has truth value
true.
Both answers are different as once the brackets were removed
the order of the procedure
changes, resulting in the steps taking to complete the expression
to be different.
2. Consider the proposition
((C ( C S)) (S P)) S P.
(a) Interpreting these symbols as the atomic sentences
C : I am a careful programmer.
S : My program will meet its specification.
P : My program will pass the validation test.
Interpret the above proposition as an argument in natural
English.
I started by drawing up a table, in which I explained the
possible connectives and translated
them into natural English.
I then started to convert the proposition in English.
This is as can only be true if both parts are true,
so as both parts are false, the expression has the
truth value f (false).
Connectives (symbols) Natural English
“AND”
“OR”
“IMPLIES”, so if this ... then....
“IF AND ONLY IF”
“NOT”, so the negative of a sentence.
Module code: 124ms
Tajvinder Virdee
I am a careful programmer and if I am not a careful
programmer, then my program will not
meet its specification, and if my program will meet its
specification then my program will
pass the validation test. This implies that my program will meet
its specification and then my
program will pass the validation test.
(b) By means of a truth table, find out whether the
argument is valid.
I started by calculating how many rows my truth table would
need. As there are only two
truth values, true and false, I would have to have the value 2 to
the power n, where n would
be the amount of sentence letters, in the proposition.
In this case as there are 3 types of sentence letters, C, S and P,
n would be 3.
So
This equals , so for this proposition there are eight rows in
the truth table.
C S P ((C ( C S)) (S P)) S P
t t t t t f t f t t t t t t t t
t t f t t f t f f t f f t t f f
t f t t t f t t t f t t f f f t
t f f t t f t t t f t f f f f f
f t t f f t f f f t t t t t t t
f t f f f t f f f t f f t t f f
f f t f f t t t f f t t t f f t
f f f f f t t t f f t f t f f f
1 9 2 8 3 11 4 10 5 13 6 12 7
Argument isn’t valid as the proposition is not a tautology,
meaning that the truth values in
column 13 are not all true, they contain some false values.
3. Consider the following collection of statements, which are
part of the specification of the
automatic control system for a chemical processing plant:-
The temperature in vat A rises above 50 degrees Celsius. If the
temperature in vat A
rises above 50 degrees Celsius, the warning light goes on, and
the heating element is
turned off. If the warning light goes on, the operator must alert
his superiors. If the
heating element is off, the operator must not alert his superiors.
(a) Choose symbols to represent the atomic sentences in the
above argument, and hence
express the statements in terms of propositional calculus.
Symbols chosen to represent the atomic sentences:
A: The temperature in vat A rises above 50 degrees Celsius.
B: The warning light goes on.
C: The heating element is turned off.
D: The operator must alert his superiors.
D: The operator must not alert his superiors.
The statements expressed in terms of propositional calculus.
A B D
A (B C) C D
Module code: 124ms
Tajvinder Virdee
(b) Construct a formal proof (table of assertions and
justifications) showing that the
statements are inconsistent.
Considering the four statements A, A (B C), B D, and C
D as H1, H2, H3, and H4
respectively, we then get the following hypotheses (H):
H1: A
H2: A (B C)
H3: B D
H4: C D
From these hypotheses we can construct the following formal
proof table.
Assertions Justifications
1. A H1 A
A (B C) 2. A (B C) H2
3. B C 1,2 Modus ponens B C
4. B 3, Simplification B
B D 5. B D H3
6. D 4,5 Modus ponens D
D
C D 7. C D H4
8. C 6,7 Modus tollens C
9. C C 3,6 From assertions 3 we can see that
C happens, but from assertion 8,
we see that C doesn’t happen.
10. f 9, Property of
negation
From the formal proof table we can see that the statements are
inconsistent, as assertion
9 and 10 show that C happens and C doesn’t happening,
resulting this to be false. This then
concludes to the statements being inconsistent.
(c) How many rows would be required by a truth table to show
this?
To calculate how many rows are in the truth table, you would
have to use the following
equation:
So
(Where n is the amount of sentence letter in the proposition)
As there are only two truth values, true and false, the value is to
the power 2. Also n stands
for the amount of letters in the proposition.
In this case, there are 4 types of sentence letters, A, B, C and D.
Using the formula above,
this would equal , so for this proposition there would be
eight rows in the truth
table.
Modus ponens
Modus ponens
Modus tollens
Module code: 124ms
Tajvinder Virdee
4. I downloaded 35 books from Project Gutenberg. 24 are
classics, 15 are long, and 18 are
turgid. 13 are long and classics, 6 are long and turgid, and 7 are
classics and turgid.
How many are long but are neither classics nor turgid?
First I denoted the different sets some letters. There are 3 set
and all together there are 35
books. The 3 sets are classified below:
C denoted for the set of Classic.
L denoted for the set of Long.
D denoted for the set of Turgid.
We then get the general statements:
|C|=24 As there are 35 books in total, which
includes classic, long and turgid
|L|=15 sets, we can come to the following conclusion.
|D|=18 |C U L U D|=35
Also from the question, we know that 13 books are long and
classic, 6 are long and turgid,
and 7 are classic and turgid. From this we can form the
following statements:
|L ∩ C|=13 I then constructed a Venn diagram, and filled
in the information had.
|L ∩ D|=6
|C ∩ D|=7
Using the formula:
|C U L U D|= |C|+|L|+|D|-|L ∩ C|- |L ∩ D|-|C ∩ D|+ |C ∩ L ∩
D|
Substituting in the values I know form the question, will help
me find out the n value I need
for the Venn diagram.
|35|= |24|+|15|+|18|-|13|- |6|-|7|+ |C ∩ L ∩ D|
|35|= |31|+ |C ∩ L ∩ D|
|35|-|31|= |C ∩ L ∩ D|
|4|=|C ∩ L ∩ D| This shows that only 4 books are
classic, turgid and long,
so only 4
books contain in all 3 sets.
I can now complete the Venn diagram,
by substituting n=4.
From this Venn diagram I can conclude, to
the fact there are no books which are just
in the set long.
C L
D
I have denoted the
unknown by n.
n
13-n
6-n 7-n
15-(13-n)-
(6-n)-(n)=
24-(13-n)-
(7-n)-(n)=
18-(7-n)-
(6-n)-(n)=
C L
D
4
2
9
3
18-3-4-2=9
15-9-4-2=0 24-9-4-3=8
Module code: 124ms
Tajvinder Virdee
5.
(a) Use a membership table to show that the sets A (B C) and
A (B C) are not equal
in general.
There are two sets and 3 different letters, this tells me that there
will be 8 rows in the
membership table. This is as in the membership table there are
only two values, these
being inside, which is denoted by (I) and outside (o). So this
would be 2 to the powers n,
where n is the amount of letters. This is , so 8 rows in
membership table.
Since column 9 and 10 do not contain the same values, they are
not the same, so therefore
the sets not equal.
(b) Use a hybrid table to show that the sets A (B C) and A
(B C) are equal if A = C.
Again there are 3 different types of letters in each set, however
this is a hybrid table,
where there are both true and false values and inside, outside
values, but this still will
result in having a number 2 to the power n, where n is the
amount of letters.
This is , so 8 rows in membership table.
The hybrid table shows that the sets A (B C) and A (B C)
are equal if A = C. This
shows that the corresponding proposition is a tautology so
claims to be true and we can
see this by looking at column 15, as it contains all truth values
of true.
(c) Give an example of a situation where the equality holds,
where A, B and C are subsets of
the universal set .
If sets A, B and C are the same, they should hold the same
equality; here is an example
where they contain the same values in the set. If there is
something in A, B and C then the
regions will contain the same elements.
A B C A U (B ∩ C) = A ∩ (B U C) A = C
I I I I I I I I t I I I I I t I t I
I I O I I I O O t I I I I O t I f O
I O I I I O O I t I I O I I t I t I
I O O I I O O O f I O O O O t I f O
O I I O I I I I f O O I I I t O f I
O I O O O I O O t O O I I O t O t O
O O I O O O O I t O O O I I t O f I
O O O O O O O O t O O O O O t O t O
1 11 2 9 3 13 4 12 5 10 6 15 7 14 8
A B C A U (B ∩ C) A ∩ (B U C)
I I I I I I I I I I I I I
I I O I I I O O I I I I O
I O I I I O O I I I O I I
I O O I I O O O I O O O O
O I I O I I I I O O I I I
O I O O O I O O O O I I O
O O I O O O O I O O O I I
O O O O O O O O O O O O O
1 9 2 7 3 4 10 5 8 6
Module code: 124ms
Tajvinder Virdee
So I considered the following subset:
A={1,2,3} B={2,3,4} C={1,2,3,4}
This gives
A (B C) = {1,2,3} ({2,3,4} {1,2,3,4})
= {1,2,3} {2,3,4}
= {1} {2,3,4}
= {1,2,3,4}
and
(A B) C = ({1,2,3} {2,3,4})
{1,2,3,4}
= {1,2,3,4} {1,2,3,4}
= {1,2,3,4}
Both sets contain the same values so this shows that they hold
the same equality.
Module code 124ms  Tajvinder Virdee  Sets and Log.docx

More Related Content

Similar to Module code 124ms Tajvinder Virdee Sets and Log.docx

Real numbers
Real numbersReal numbers
Real numbersRamki M
 
Discrete mathematics by sadat sumon
Discrete mathematics by sadat sumonDiscrete mathematics by sadat sumon
Discrete mathematics by sadat sumonsadatsumon
 
HEC 222 LECTURE 1.pptx
HEC 222 LECTURE 1.pptxHEC 222 LECTURE 1.pptx
HEC 222 LECTURE 1.pptxRaymond685379
 
C-Pubb-TestingExperience_Issue_08_2008
C-Pubb-TestingExperience_Issue_08_2008C-Pubb-TestingExperience_Issue_08_2008
C-Pubb-TestingExperience_Issue_08_2008Berta Danilo
 
Scott Cunningham STAT512 Final Project
Scott Cunningham STAT512 Final ProjectScott Cunningham STAT512 Final Project
Scott Cunningham STAT512 Final ProjectScott Cunningham
 
Theoryofcomp science
Theoryofcomp scienceTheoryofcomp science
Theoryofcomp scienceRaghu nath
 
An argand diagram uses the real and imaginary parts of a complex number as an...
An argand diagram uses the real and imaginary parts of a complex number as an...An argand diagram uses the real and imaginary parts of a complex number as an...
An argand diagram uses the real and imaginary parts of a complex number as an...parassini
 
2008 worldfinalsproblemset
2008 worldfinalsproblemset2008 worldfinalsproblemset
2008 worldfinalsproblemsetLuca Zannini
 
Tenth class state syllabus-text book-em-ap-ts-mathematics
Tenth class state syllabus-text book-em-ap-ts-mathematicsTenth class state syllabus-text book-em-ap-ts-mathematics
Tenth class state syllabus-text book-em-ap-ts-mathematicsNaukriTuts
 
Chapter - 1 Real_Numbers CLASS 10 MATHS.pdf
Chapter - 1 Real_Numbers CLASS 10 MATHS.pdfChapter - 1 Real_Numbers CLASS 10 MATHS.pdf
Chapter - 1 Real_Numbers CLASS 10 MATHS.pdfSanjayRawat96060
 
Which if statement below tests if letter holds R (letter is a char .pdf
Which if statement below tests if letter holds R (letter is a char .pdfWhich if statement below tests if letter holds R (letter is a char .pdf
Which if statement below tests if letter holds R (letter is a char .pdfaniarihant
 
GREKing: The most repeated type of quants problem.
GREKing: The most repeated type of quants problem.GREKing: The most repeated type of quants problem.
GREKing: The most repeated type of quants problem.Rahul Singh
 
Lecture notes in_discrete_mathematics
Lecture notes in_discrete_mathematicsLecture notes in_discrete_mathematics
Lecture notes in_discrete_mathematicssaiful26baiust
 

Similar to Module code 124ms Tajvinder Virdee Sets and Log.docx (20)

C code examples
C code examplesC code examples
C code examples
 
1 1 number theory
1 1 number theory1 1 number theory
1 1 number theory
 
Real numbers
Real numbersReal numbers
Real numbers
 
Discrete mathematics by sadat sumon
Discrete mathematics by sadat sumonDiscrete mathematics by sadat sumon
Discrete mathematics by sadat sumon
 
Programming Exam Help
 Programming Exam Help Programming Exam Help
Programming Exam Help
 
HEC 222 LECTURE 1.pptx
HEC 222 LECTURE 1.pptxHEC 222 LECTURE 1.pptx
HEC 222 LECTURE 1.pptx
 
C2.0 propositional logic
C2.0 propositional logicC2.0 propositional logic
C2.0 propositional logic
 
C-Pubb-TestingExperience_Issue_08_2008
C-Pubb-TestingExperience_Issue_08_2008C-Pubb-TestingExperience_Issue_08_2008
C-Pubb-TestingExperience_Issue_08_2008
 
Scott Cunningham STAT512 Final Project
Scott Cunningham STAT512 Final ProjectScott Cunningham STAT512 Final Project
Scott Cunningham STAT512 Final Project
 
Theoryofcomp science
Theoryofcomp scienceTheoryofcomp science
Theoryofcomp science
 
An argand diagram uses the real and imaginary parts of a complex number as an...
An argand diagram uses the real and imaginary parts of a complex number as an...An argand diagram uses the real and imaginary parts of a complex number as an...
An argand diagram uses the real and imaginary parts of a complex number as an...
 
2008 worldfinalsproblemset
2008 worldfinalsproblemset2008 worldfinalsproblemset
2008 worldfinalsproblemset
 
Tenth class state syllabus-text book-em-ap-ts-mathematics
Tenth class state syllabus-text book-em-ap-ts-mathematicsTenth class state syllabus-text book-em-ap-ts-mathematics
Tenth class state syllabus-text book-em-ap-ts-mathematics
 
Analysis.pptx
Analysis.pptxAnalysis.pptx
Analysis.pptx
 
Daa unit 1
Daa unit 1Daa unit 1
Daa unit 1
 
Chapter - 1 Real_Numbers CLASS 10 MATHS.pdf
Chapter - 1 Real_Numbers CLASS 10 MATHS.pdfChapter - 1 Real_Numbers CLASS 10 MATHS.pdf
Chapter - 1 Real_Numbers CLASS 10 MATHS.pdf
 
Which if statement below tests if letter holds R (letter is a char .pdf
Which if statement below tests if letter holds R (letter is a char .pdfWhich if statement below tests if letter holds R (letter is a char .pdf
Which if statement below tests if letter holds R (letter is a char .pdf
 
GREKing: The most repeated type of quants problem.
GREKing: The most repeated type of quants problem.GREKing: The most repeated type of quants problem.
GREKing: The most repeated type of quants problem.
 
Ansi c
Ansi cAnsi c
Ansi c
 
Lecture notes in_discrete_mathematics
Lecture notes in_discrete_mathematicsLecture notes in_discrete_mathematics
Lecture notes in_discrete_mathematics
 

More from moirarandell

BOOK REVIEWS How to write a book review There are two .docx
BOOK REVIEWS How to write a book review  There are two .docxBOOK REVIEWS How to write a book review  There are two .docx
BOOK REVIEWS How to write a book review There are two .docxmoirarandell
 
Book Review #3- The Spirit Catches You and You Fall Down”Ch.docx
Book Review #3- The Spirit Catches You and You Fall Down”Ch.docxBook Review #3- The Spirit Catches You and You Fall Down”Ch.docx
Book Review #3- The Spirit Catches You and You Fall Down”Ch.docxmoirarandell
 
Book required Current Issues and Enduring Questions, by Sylvan Ba.docx
Book required Current Issues and Enduring Questions, by Sylvan Ba.docxBook required Current Issues and Enduring Questions, by Sylvan Ba.docx
Book required Current Issues and Enduring Questions, by Sylvan Ba.docxmoirarandell
 
Book Review #1- The Spirit Catches You and You Fall Down”Chapte.docx
Book Review #1- The Spirit Catches You and You Fall Down”Chapte.docxBook Review #1- The Spirit Catches You and You Fall Down”Chapte.docx
Book Review #1- The Spirit Catches You and You Fall Down”Chapte.docxmoirarandell
 
Book reportGringo viejo- Carlos FuentesThe written book repo.docx
Book reportGringo viejo- Carlos FuentesThe written book repo.docxBook reportGringo viejo- Carlos FuentesThe written book repo.docx
Book reportGringo viejo- Carlos FuentesThe written book repo.docxmoirarandell
 
Book reference Kouzes, James M. and Posner, Barry Z. The Leadership.docx
Book reference Kouzes, James M. and Posner, Barry Z. The Leadership.docxBook reference Kouzes, James M. and Posner, Barry Z. The Leadership.docx
Book reference Kouzes, James M. and Posner, Barry Z. The Leadership.docxmoirarandell
 
BOOK PICTURE I POSTED TOO. Go to the the textbook, study chapt.docx
BOOK PICTURE I POSTED TOO. Go to the the textbook, study chapt.docxBOOK PICTURE I POSTED TOO. Go to the the textbook, study chapt.docx
BOOK PICTURE I POSTED TOO. Go to the the textbook, study chapt.docxmoirarandell
 
Book ListBecker, Ernest The Denial of D.docx
Book ListBecker, Ernest                          The Denial of D.docxBook ListBecker, Ernest                          The Denial of D.docx
Book ListBecker, Ernest The Denial of D.docxmoirarandell
 
Book list below.docx
Book list below.docxBook list below.docx
Book list below.docxmoirarandell
 
Book is Media Literacy. Eighth EditionW.JamesPotte.docx
Book is Media Literacy. Eighth EditionW.JamesPotte.docxBook is Media Literacy. Eighth EditionW.JamesPotte.docx
Book is Media Literacy. Eighth EditionW.JamesPotte.docxmoirarandell
 
Book Forensic and Investigative AccountingPlease answer t.docx
Book Forensic and Investigative AccountingPlease answer t.docxBook Forensic and Investigative AccountingPlease answer t.docx
Book Forensic and Investigative AccountingPlease answer t.docxmoirarandell
 
Book Criminoloy Second EditionRead Chapter 6. Please submit .docx
Book Criminoloy Second EditionRead Chapter 6. Please submit .docxBook Criminoloy Second EditionRead Chapter 6. Please submit .docx
Book Criminoloy Second EditionRead Chapter 6. Please submit .docxmoirarandell
 
Book Discussion #2 Ideas(may select 1 or more to respond to).docx
Book Discussion #2 Ideas(may select 1 or more to respond to).docxBook Discussion #2 Ideas(may select 1 or more to respond to).docx
Book Discussion #2 Ideas(may select 1 or more to respond to).docxmoirarandell
 
BOOK 1984 MiniProject What makes a human beingOne .docx
BOOK 1984 MiniProject What makes a human beingOne .docxBOOK 1984 MiniProject What makes a human beingOne .docx
BOOK 1984 MiniProject What makes a human beingOne .docxmoirarandell
 
Bonnie Morgen First Day on the Job and Facing an Ethical Di.docx
Bonnie Morgen First Day on the Job and Facing an Ethical Di.docxBonnie Morgen First Day on the Job and Facing an Ethical Di.docx
Bonnie Morgen First Day on the Job and Facing an Ethical Di.docxmoirarandell
 
Bonds are a vital source of financing to governments and corpora.docx
Bonds are a vital source of financing to governments and corpora.docxBonds are a vital source of financing to governments and corpora.docx
Bonds are a vital source of financing to governments and corpora.docxmoirarandell
 
Bond Company adopted the dollar-value LIFO inventory method on Janua.docx
Bond Company adopted the dollar-value LIFO inventory method on Janua.docxBond Company adopted the dollar-value LIFO inventory method on Janua.docx
Bond Company adopted the dollar-value LIFO inventory method on Janua.docxmoirarandell
 
Boley A Negro Town in the American West (1908) The commu.docx
Boley A Negro Town in the American West (1908)  The commu.docxBoley A Negro Town in the American West (1908)  The commu.docx
Boley A Negro Town in the American West (1908) The commu.docxmoirarandell
 
Bolsonaro and Brazils Illiberal Backlash Wendy Hunter, Timo.docx
Bolsonaro and Brazils Illiberal Backlash Wendy Hunter, Timo.docxBolsonaro and Brazils Illiberal Backlash Wendy Hunter, Timo.docx
Bolsonaro and Brazils Illiberal Backlash Wendy Hunter, Timo.docxmoirarandell
 
BoF Professional Member Exclusive articles & analysis availa.docx
BoF Professional  Member Exclusive articles & analysis availa.docxBoF Professional  Member Exclusive articles & analysis availa.docx
BoF Professional Member Exclusive articles & analysis availa.docxmoirarandell
 

More from moirarandell (20)

BOOK REVIEWS How to write a book review There are two .docx
BOOK REVIEWS How to write a book review  There are two .docxBOOK REVIEWS How to write a book review  There are two .docx
BOOK REVIEWS How to write a book review There are two .docx
 
Book Review #3- The Spirit Catches You and You Fall Down”Ch.docx
Book Review #3- The Spirit Catches You and You Fall Down”Ch.docxBook Review #3- The Spirit Catches You and You Fall Down”Ch.docx
Book Review #3- The Spirit Catches You and You Fall Down”Ch.docx
 
Book required Current Issues and Enduring Questions, by Sylvan Ba.docx
Book required Current Issues and Enduring Questions, by Sylvan Ba.docxBook required Current Issues and Enduring Questions, by Sylvan Ba.docx
Book required Current Issues and Enduring Questions, by Sylvan Ba.docx
 
Book Review #1- The Spirit Catches You and You Fall Down”Chapte.docx
Book Review #1- The Spirit Catches You and You Fall Down”Chapte.docxBook Review #1- The Spirit Catches You and You Fall Down”Chapte.docx
Book Review #1- The Spirit Catches You and You Fall Down”Chapte.docx
 
Book reportGringo viejo- Carlos FuentesThe written book repo.docx
Book reportGringo viejo- Carlos FuentesThe written book repo.docxBook reportGringo viejo- Carlos FuentesThe written book repo.docx
Book reportGringo viejo- Carlos FuentesThe written book repo.docx
 
Book reference Kouzes, James M. and Posner, Barry Z. The Leadership.docx
Book reference Kouzes, James M. and Posner, Barry Z. The Leadership.docxBook reference Kouzes, James M. and Posner, Barry Z. The Leadership.docx
Book reference Kouzes, James M. and Posner, Barry Z. The Leadership.docx
 
BOOK PICTURE I POSTED TOO. Go to the the textbook, study chapt.docx
BOOK PICTURE I POSTED TOO. Go to the the textbook, study chapt.docxBOOK PICTURE I POSTED TOO. Go to the the textbook, study chapt.docx
BOOK PICTURE I POSTED TOO. Go to the the textbook, study chapt.docx
 
Book ListBecker, Ernest The Denial of D.docx
Book ListBecker, Ernest                          The Denial of D.docxBook ListBecker, Ernest                          The Denial of D.docx
Book ListBecker, Ernest The Denial of D.docx
 
Book list below.docx
Book list below.docxBook list below.docx
Book list below.docx
 
Book is Media Literacy. Eighth EditionW.JamesPotte.docx
Book is Media Literacy. Eighth EditionW.JamesPotte.docxBook is Media Literacy. Eighth EditionW.JamesPotte.docx
Book is Media Literacy. Eighth EditionW.JamesPotte.docx
 
Book Forensic and Investigative AccountingPlease answer t.docx
Book Forensic and Investigative AccountingPlease answer t.docxBook Forensic and Investigative AccountingPlease answer t.docx
Book Forensic and Investigative AccountingPlease answer t.docx
 
Book Criminoloy Second EditionRead Chapter 6. Please submit .docx
Book Criminoloy Second EditionRead Chapter 6. Please submit .docxBook Criminoloy Second EditionRead Chapter 6. Please submit .docx
Book Criminoloy Second EditionRead Chapter 6. Please submit .docx
 
Book Discussion #2 Ideas(may select 1 or more to respond to).docx
Book Discussion #2 Ideas(may select 1 or more to respond to).docxBook Discussion #2 Ideas(may select 1 or more to respond to).docx
Book Discussion #2 Ideas(may select 1 or more to respond to).docx
 
BOOK 1984 MiniProject What makes a human beingOne .docx
BOOK 1984 MiniProject What makes a human beingOne .docxBOOK 1984 MiniProject What makes a human beingOne .docx
BOOK 1984 MiniProject What makes a human beingOne .docx
 
Bonnie Morgen First Day on the Job and Facing an Ethical Di.docx
Bonnie Morgen First Day on the Job and Facing an Ethical Di.docxBonnie Morgen First Day on the Job and Facing an Ethical Di.docx
Bonnie Morgen First Day on the Job and Facing an Ethical Di.docx
 
Bonds are a vital source of financing to governments and corpora.docx
Bonds are a vital source of financing to governments and corpora.docxBonds are a vital source of financing to governments and corpora.docx
Bonds are a vital source of financing to governments and corpora.docx
 
Bond Company adopted the dollar-value LIFO inventory method on Janua.docx
Bond Company adopted the dollar-value LIFO inventory method on Janua.docxBond Company adopted the dollar-value LIFO inventory method on Janua.docx
Bond Company adopted the dollar-value LIFO inventory method on Janua.docx
 
Boley A Negro Town in the American West (1908) The commu.docx
Boley A Negro Town in the American West (1908)  The commu.docxBoley A Negro Town in the American West (1908)  The commu.docx
Boley A Negro Town in the American West (1908) The commu.docx
 
Bolsonaro and Brazils Illiberal Backlash Wendy Hunter, Timo.docx
Bolsonaro and Brazils Illiberal Backlash Wendy Hunter, Timo.docxBolsonaro and Brazils Illiberal Backlash Wendy Hunter, Timo.docx
Bolsonaro and Brazils Illiberal Backlash Wendy Hunter, Timo.docx
 
BoF Professional Member Exclusive articles & analysis availa.docx
BoF Professional  Member Exclusive articles & analysis availa.docxBoF Professional  Member Exclusive articles & analysis availa.docx
BoF Professional Member Exclusive articles & analysis availa.docx
 

Recently uploaded

Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.MateoGardella
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 

Recently uploaded (20)

Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 

Module code 124ms Tajvinder Virdee Sets and Log.docx

  • 1. Module code: 124ms Tajvinder Virdee Sets and Logic Coursework 1 1. Find the truth value of P (Q R) if P is false, Q is true, and R is false. What is the truth value of this expression if the brackets are removed? Substituting in the truth values, we obtain f (t f) As there is a set of brackets, the brackets have to be done first as they have a higher order of precedence. So (Q R), becomes (t f) which we can say is false, as if Q is true and R is false the truth value of this implication is false. This then becomes f f which is equivalent to f
  • 2. If the brackets are removed, then the order of the procedure changes. The expression now becomes P Q R, where P is false, Q is true, and R is false. Inserting the truth values of P, Q and R, we get f t f Since has higher priority than , we have to work out the f t first. This gives us the value false as not both parts are true. f f This gives t As false implies false, the truth value is true, meaning that the expression has truth value true. Both answers are different as once the brackets were removed the order of the procedure changes, resulting in the steps taking to complete the expression to be different. 2. Consider the proposition
  • 3. ((C ( C S)) (S P)) S P. (a) Interpreting these symbols as the atomic sentences C : I am a careful programmer. S : My program will meet its specification. P : My program will pass the validation test. Interpret the above proposition as an argument in natural English. I started by drawing up a table, in which I explained the possible connectives and translated them into natural English. I then started to convert the proposition in English. This is as can only be true if both parts are true, so as both parts are false, the expression has the truth value f (false). Connectives (symbols) Natural English “AND”
  • 4. “OR” “IMPLIES”, so if this ... then.... “IF AND ONLY IF” “NOT”, so the negative of a sentence. Module code: 124ms Tajvinder Virdee I am a careful programmer and if I am not a careful programmer, then my program will not meet its specification, and if my program will meet its specification then my program will pass the validation test. This implies that my program will meet its specification and then my program will pass the validation test. (b) By means of a truth table, find out whether the argument is valid. I started by calculating how many rows my truth table would need. As there are only two truth values, true and false, I would have to have the value 2 to the power n, where n would be the amount of sentence letters, in the proposition.
  • 5. In this case as there are 3 types of sentence letters, C, S and P, n would be 3. So This equals , so for this proposition there are eight rows in the truth table. C S P ((C ( C S)) (S P)) S P t t t t t f t f t t t t t t t t t t f t t f t f f t f f t t f f t f t t t f t t t f t t f f f t t f f t t f t t t f t f f f f f f t t f f t f f f t t t t t t t f t f f f t f f f t f f t t f f f f t f f t t t f f t t t f f t f f f f f t t t f f t f t f f f 1 9 2 8 3 11 4 10 5 13 6 12 7 Argument isn’t valid as the proposition is not a tautology, meaning that the truth values in column 13 are not all true, they contain some false values. 3. Consider the following collection of statements, which are
  • 6. part of the specification of the automatic control system for a chemical processing plant:- The temperature in vat A rises above 50 degrees Celsius. If the temperature in vat A rises above 50 degrees Celsius, the warning light goes on, and the heating element is turned off. If the warning light goes on, the operator must alert his superiors. If the heating element is off, the operator must not alert his superiors. (a) Choose symbols to represent the atomic sentences in the above argument, and hence express the statements in terms of propositional calculus. Symbols chosen to represent the atomic sentences: A: The temperature in vat A rises above 50 degrees Celsius. B: The warning light goes on. C: The heating element is turned off. D: The operator must alert his superiors. D: The operator must not alert his superiors. The statements expressed in terms of propositional calculus. A B D A (B C) C D Module code: 124ms Tajvinder Virdee
  • 7. (b) Construct a formal proof (table of assertions and justifications) showing that the statements are inconsistent. Considering the four statements A, A (B C), B D, and C D as H1, H2, H3, and H4 respectively, we then get the following hypotheses (H): H1: A H2: A (B C) H3: B D H4: C D From these hypotheses we can construct the following formal proof table. Assertions Justifications 1. A H1 A A (B C) 2. A (B C) H2 3. B C 1,2 Modus ponens B C 4. B 3, Simplification B B D 5. B D H3 6. D 4,5 Modus ponens D D C D 7. C D H4 8. C 6,7 Modus tollens C
  • 8. 9. C C 3,6 From assertions 3 we can see that C happens, but from assertion 8, we see that C doesn’t happen. 10. f 9, Property of negation From the formal proof table we can see that the statements are inconsistent, as assertion 9 and 10 show that C happens and C doesn’t happening, resulting this to be false. This then concludes to the statements being inconsistent. (c) How many rows would be required by a truth table to show this? To calculate how many rows are in the truth table, you would have to use the following equation: So (Where n is the amount of sentence letter in the proposition) As there are only two truth values, true and false, the value is to the power 2. Also n stands for the amount of letters in the proposition. In this case, there are 4 types of sentence letters, A, B, C and D. Using the formula above, this would equal , so for this proposition there would be eight rows in the truth table.
  • 9. Modus ponens Modus ponens Modus tollens Module code: 124ms Tajvinder Virdee 4. I downloaded 35 books from Project Gutenberg. 24 are classics, 15 are long, and 18 are turgid. 13 are long and classics, 6 are long and turgid, and 7 are classics and turgid. How many are long but are neither classics nor turgid? First I denoted the different sets some letters. There are 3 set and all together there are 35 books. The 3 sets are classified below: C denoted for the set of Classic. L denoted for the set of Long. D denoted for the set of Turgid. We then get the general statements: |C|=24 As there are 35 books in total, which
  • 10. includes classic, long and turgid |L|=15 sets, we can come to the following conclusion. |D|=18 |C U L U D|=35 Also from the question, we know that 13 books are long and classic, 6 are long and turgid, and 7 are classic and turgid. From this we can form the following statements: |L ∩ C|=13 I then constructed a Venn diagram, and filled in the information had. |L ∩ D|=6 |C ∩ D|=7 Using the formula: |C U L U D|= |C|+|L|+|D|-|L ∩ C|- |L ∩ D|-|C ∩ D|+ |C ∩ L ∩ D| Substituting in the values I know form the question, will help me find out the n value I need for the Venn diagram. |35|= |24|+|15|+|18|-|13|- |6|-|7|+ |C ∩ L ∩ D| |35|= |31|+ |C ∩ L ∩ D| |35|-|31|= |C ∩ L ∩ D| |4|=|C ∩ L ∩ D| This shows that only 4 books are classic, turgid and long, so only 4
  • 11. books contain in all 3 sets. I can now complete the Venn diagram, by substituting n=4. From this Venn diagram I can conclude, to the fact there are no books which are just in the set long. C L D I have denoted the unknown by n. n 13-n 6-n 7-n 15-(13-n)- (6-n)-(n)=
  • 13. Tajvinder Virdee 5. (a) Use a membership table to show that the sets A (B C) and A (B C) are not equal in general. There are two sets and 3 different letters, this tells me that there will be 8 rows in the membership table. This is as in the membership table there are only two values, these being inside, which is denoted by (I) and outside (o). So this would be 2 to the powers n, where n is the amount of letters. This is , so 8 rows in membership table. Since column 9 and 10 do not contain the same values, they are not the same, so therefore the sets not equal. (b) Use a hybrid table to show that the sets A (B C) and A (B C) are equal if A = C. Again there are 3 different types of letters in each set, however this is a hybrid table, where there are both true and false values and inside, outside values, but this still will result in having a number 2 to the power n, where n is the amount of letters. This is , so 8 rows in membership table.
  • 14. The hybrid table shows that the sets A (B C) and A (B C) are equal if A = C. This shows that the corresponding proposition is a tautology so claims to be true and we can see this by looking at column 15, as it contains all truth values of true. (c) Give an example of a situation where the equality holds, where A, B and C are subsets of the universal set . If sets A, B and C are the same, they should hold the same equality; here is an example where they contain the same values in the set. If there is something in A, B and C then the regions will contain the same elements. A B C A U (B ∩ C) = A ∩ (B U C) A = C I I I I I I I I t I I I I I t I t I I I O I I I O O t I I I I O t I f O I O I I I O O I t I I O I I t I t I
  • 15. I O O I I O O O f I O O O O t I f O O I I O I I I I f O O I I I t O f I O I O O O I O O t O O I I O t O t O O O I O O O O I t O O O I I t O f I O O O O O O O O t O O O O O t O t O 1 11 2 9 3 13 4 12 5 10 6 15 7 14 8 A B C A U (B ∩ C) A ∩ (B U C) I I I I I I I I I I I I I I I O I I I O O I I I I O I O I I I O O I I I O I I I O O I I O O O I O O O O O I I O I I I I O O I I I O I O O O I O O O O I I O O O I O O O O I O O O I I O O O O O O O O O O O O O 1 9 2 7 3 4 10 5 8 6 Module code: 124ms
  • 16. Tajvinder Virdee So I considered the following subset: A={1,2,3} B={2,3,4} C={1,2,3,4} This gives A (B C) = {1,2,3} ({2,3,4} {1,2,3,4}) = {1,2,3} {2,3,4} = {1} {2,3,4} = {1,2,3,4} and (A B) C = ({1,2,3} {2,3,4}) {1,2,3,4} = {1,2,3,4} {1,2,3,4} = {1,2,3,4} Both sets contain the same values so this shows that they hold the same equality.