being completed

being completed.

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

Modulecode: 124ms

Tajvinder Virdee

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

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 propositio

n

((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) H

2

3. B C 1,2 Modus ponens B C

4. B 3, Simplification B
B D 5. B D H

3

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.

Still stressed from student homework?
Get quality assistance from academic writers!

Order your essay today and save 25% with the discount code LAVENDER