logo

Modelling computer systems

This is an individual assignment for the CS-170J: MODELLING COMPUTING SYSTEMS 1 course at Swansea University. The assignment consists of four questions worth 30 points and counts for 30% of the module grade. The submission must be a single PDF file named after the student's number and must be submitted before the deadline.

15 Pages2235 Words100 Views
   

Added on  2022-12-23

About This Document

This document discusses various topics related to modelling computer systems. It includes rewriting statements in English, translating statements into propositional logic, constructing truth tables, drawing Venn diagrams, and translating statements into predicate logic. The document also covers the concept of playing and winning in a league.

Modelling computer systems

This is an individual assignment for the CS-170J: MODELLING COMPUTING SYSTEMS 1 course at Swansea University. The assignment consists of four questions worth 30 points and counts for 30% of the module grade. The submission must be a single PDF file named after the student's number and must be submitted before the deadline.

   Added on 2022-12-23

ShareRelated Documents
Modelling computer
systems
Modelling computer systems_1
Contents
Contents...........................................................................................................................................2
Question 1- Rewrite each of the following statements in English in the form “If . . . , then . . .”...1
(a) Swansea beach is full of people whenever the weather is sunny...........................................1
(b) I can go to a more beautiful beach, if I take the bus out of the city.......................................1
(c) Swansea’s cloudy weather implies that sunny days are precious..........................................1
(d) To practice kite-surfing, it is necessary to go to a beach.......................................................1
(e) To practice swimming, it is sufficient to go to a swimming pool..........................................1
(f) When I am rich, I will buy my own private beach.................................................................2
(g) I need to work hard if I want to become rich.........................................................................2
(h) I cannot enjoy the beach unless I take time off work.............................................................2
Question 2- Red, Green and Blue are players in a social deduction game in which you have to
identify the killer among them. Let Rsus, Gsus, Bdead and RB represent the following
statements:.......................................................................................................................................3
Rsus: Red is the killer..................................................................................................................3
Gsus: Green is the killer..............................................................................................................3
Bdead: Blue is dead.....................................................................................................................3
RB: Red and Blue are alone in a room........................................................................................3
a) Translate the following statements into propositional logic:...................................................3
P1: Either Red is the killer or Green is the killer.........................................................................3
P2: If Red is the killer, then Green is no killer............................................................................3
P3: If Red and Blue are alone in a room and Blue is dead, then Red is the killer.......................3
P4: If Green is the killer, then Red and Blue would not be alone in a room...............................3
P5: Red is no killer and Blue is dead...........................................................................................3
b) Construct a truth table with variables Rsus, Gsus and the statement P1P2..........................4
(c) CanP1, P2, P3, P4, P5be true at the same time? Justify your answer....................................5
Question 3-.......................................................................................................................................5
Modelling computer systems_2
(a) Let A, B, C be sets in a universe of discourse U. Draw Venn diagrams illustrating the
following sets:..................................................................................................................................5
i. (A\B)(B\(AC))......................................................................................................................5
ii. A\((BC)\(B∩C))....................................................................................................................6
iii. (ABC)(ABC)...............................................................................................................7
(b) Let..........................................................................................................................................9
A= {1,2,3,4,5},............................................................................................................................9
B= {4,5,6,7,8},.............................................................................................................................9
C= {1,3,4,5,7} and.......................................................................................................................9
U={1,2,3,4,5,6,7,8}.....................................................................................................................9
Use A, B, C and the operations ,∩,,(·) to construct the set {1,3,7}..........................................9
Question 4- Let T be a set of teams playing in a league. Three of the teams are Team Liquid, Evil
Geniuses and Mouses ports. The league is still ongoing, so not every team has finished their
matches yet. Let P(a, b) mean “a played against b” and W(a, b) mean “a won against b”...........10
(a) Translate the following English statements into predicate logic..........................................10
i. Team Liquid has played against every team..........................................................................10
ii. Evil Geniuses has won against every team it has played against..........................................10
iii. Mouses ports played and won against every team except Evil Geniuses............................10
iv. There is a team which has played no team yet.....................................................................11
v. A team cannot win against teams they haven’t played against yet........................................11
(b) Negate all statements in English..........................................................................................11
i. Team Liquid has played against every team..........................................................................11
ii. Evil Geniuses has won against every team it has played against..........................................11
iii. Mouses ports played and won against every team except Evil Geniuses............................11
iv. There is a team which has played no team yet.....................................................................12
v. A team cannot win against teams they haven’t played against yet........................................12
(c) Translate the following statement into English:...................................................................12
Modelling computer systems_3
Question 1- Rewrite each of the following statements in
English in the form “If . . . , then . . .”
(a) Swansea beach is full of people whenever the weather is sunny.
Solution: If the weather is sunny then Swansea beach will be full of
people.
(b) I can go to a more beautiful beach, if I take the bus out of the city.
Solution: If I will take the bus out of the city then I can surely go to a
more beautiful beach.
(c) Swansea’s cloudy weather implies that sunny days are precious.
Solution: If the weather near Swansea is cloudy then it implies that the
sunny days are precious.
(d) To practice kite-surfing, it is necessary to go to a beach.
Solution: If one wants to practise kite-surfing then it is necessary to go
to a beach.
(e) To practice swimming, it is sufficient to go to a swimming pool.
Solution: If someone wants to practice summing then it is sufficient to
go to a swimming pool.
Modelling computer systems_4

End of preview

Want to access all the pages? Upload your documents or become a member.