0% found this document useful (0 votes)
428 views10 pages

AnswerAssignment1-Prop Logic

The document describes specifications for three smartphones (A, B, C) from 2010 in terms of RAM, ROM, and camera resolution. It then provides five logical propositions regarding these specifications and asks to determine the truth value of each proposition, justifying the answers. The remaining problems involve determining the outputs of Python programs, expressing system specifications using logical connectives, constructing truth tables for logical formulas, determining logical consequences, equivalences, and consistency.

Uploaded by

raey faldo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
428 views10 pages

AnswerAssignment1-Prop Logic

The document describes specifications for three smartphones (A, B, C) from 2010 in terms of RAM, ROM, and camera resolution. It then provides five logical propositions regarding these specifications and asks to determine the truth value of each proposition, justifying the answers. The remaining problems involve determining the outputs of Python programs, expressing system specifications using logical connectives, constructing truth tables for logical formulas, determining logical consequences, equivalences, and consistency.

Uploaded by

raey faldo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Problem 1

Back in 2010, there were three types of new smartphones, namely smartphone A, B, and C.
Smartphone A has 256 MB RAM and 32 GB ROM, and the resolution of its camera is 8 MP.
Smartphone B has 288 MB RAM and 64 GB ROM, and the resolution of its camera is 4 MP.
Smartphone C has 128 MB RAM and 32 GB ROM, and the resolution of its camera is 5 MP.
Determine the truth value of each of these propositions and justify your answers! Provide clear and
relevant arguments!
a) Smartphone B has the most RAM of these three smartphones.

Jawaban
True, karena smartphone B memiliki 288 MB RAM sedangkan smartphone A memiliki
256 MB RAM, dan smartphone C 128 MB RAM

b) Smartphone C has more ROM or a higher resolution camera than smartphone B.

Jawaban
Smartphone C has more ROM than smartphone B = False
Smartphone C has higher resolution camera than smartphone B = True
False  True bernilai True, sehingga preposisi bernilai True

c) Smartphone B has more RAM, more ROM, and higher resolution than smartphone A.

Jawaban
Smartphone B has more RAM, more ROM than smartphone A = True
Smartphone B has higher resolution than smartphone A = False
True  False bernilai false, maka preposisi ini bernilai salah/false

d) If smartphone C has more RAM or more ROM than smartphone B, then it also has a higher
resolution camera.

Jawaban
Smartphone C has more RAM or more ROM than smartphone B = False
Smartphone C has higher resolution camera than smartphone B = True
False  True bernilai true, maka preposisi ini bernilai benar/true

e) Smartphone A has more RAM than smartphone B if and only if smartphone B has more RAM
than smartphone C.

Jawaban
Smartphone A has more RAM than smartphone B = False
Smartphone B has more RAM than smartphone C = True
False  True bernilai false, maka preposisi ini bernilai salah/false
Problem 2
Determine the value of z (the output) of the following programs in Python and justify your answer!
a) Program 1

Jawaban
akan menampilkan nilai z ke layar, nilai z = x – y = -3 (masuk else)

b) Program 2

Jawaban
akan menampilkan nilai z ke layar, nilai z = x * y = -2 (masuk if)

c) Program 3

Jawaban
akan menampilkan nilai z ke layar, nilai z = x * y = -2 (masuk else)

d) Program 4

Jawaban
akan menampilkan nilai z ke layar, nilai z = 2 * x * y = -4 (masuk else)

Problem 3
Express these system specifications using the logical connectives and the following atomic
propositions:
p : “the user enters a valid password”
q : “access is granted”
r : “the user has paid the subscription fee”.
a) “The user enters a valid password, but access is not granted.”

Jawaban
p  q

b) “The user has paid the subscription fee, but does not enter a valid password”

Jawaban
i  p

c) “Access is denied (not granted) if the user has not paid the subscription fee”

Jawaban
p  q

d) “Access is granted whenever the user has paid the subscription fee and enters a valid
password”

Jawaban
prq

e) “If the user has not entered a valid password but has paid the subscription fee, then access is
granted”

Jawaban
p  r  q

Problem 4
For each of the following propositional formulas, construct its corresponding truth table and
determine whether the formula is (1) valid, (2) satisfiable, (3) contradictory/unsatisfiable, and (4) a
contingency. Provide relevant arguments for your answer.

a)  (p ^ q)  p  q

Jawaban

p q  (p ^ q) p q p  q  (p ^ q)  p  q
0 0 1 1 1 0 0
0 1 1 1 0 1 1
1 1 0 0 0 0 1
1 0 1 0 1 1 1
Karena terdapat suatu interpretasi yang mengakibatkan formula bernilai salah, maka
formula tidak bersifat absah/valid.
Karena formula bersifat terpenuhi/satisfiable maka formula tidak bersifat kontradiksi.
Karena formula adalah formula yang tidak absah dan bukan kontradiksi, maka formula
merupakan contingency.

b) (p  q)  (p  q)  (p  q)

Jawaban

p q pq p  q p  q (p  q)  (p  q)  (p  q)


0 0 0 1 1 0
0 1 1 0 0 0
1 1 0 1 1 0
1 0 1 0 0 0
Karena setiap interpretasi yang diberikan pada formula mengakibatkan formula bernilai
salah, maka formula ini merupakan formula yang bersifat kontradiksi/ contradictory.

Problem 5

a) Determine whether p  q is a logical consequence of p  q  r.

Jawab
p  (q  r)  p  q
(p  (q  r))  (p  q)

p q r p  (q  r) pq (p  (q  r))  (p  q)
0 0 0 1 1 1
0 0 1 1 1 1
0 1 0 1 1 1
0 1 1 1 1 1
1 0 0 0 0 1
1 0 1 0 0 1
1 1 0 0 1 1
1 1 1 1 1 1

p  (q  r)  p  q terbukti logical consequence karena (p  (q  r))  (p  q)


tautologi

b) Determine whether p  q is a logical consequence of p  q  r.

Jawab
p  (q  r)  p  q
(p  (q  r))  (p  q)

p q r p  (q  r) pq (p  (q  r))  (p  q)
0 0 0 1 1 1
0 0 1 1 1 1
0 1 0 1 1 1
0 1 1 1 1 1
1 0 0 0 0 1
1 0 1 1 0 0
1 1 0 1 1 1
1 1 1 1 1 1

p  (q  r)  p  q bukan logical consequence karena (p  (q  r))  (p  q) tidak


tautologi

Problem 6

a) Determine whether (p  q)  (p  r) and p  (q  r) are logically equivalent.

Jawab
(p  q)  (p  r)  p  (q  r)
Misal f(p, q, r) = (p  q)  (p  r)  p  (q  r)

p q r pq pr p  (q  r) f(p, q, r)


0 0 0 1 1 1 1
0 0 1 1 1 1 1
0 1 0 1 1 1 1
0 1 1 1 1 1 1
1 0 0 0 0 0 1
1 0 1 0 1 0 1
1 1 0 1 0 0 1
1 1 1 1 1 1 1

f(p, q, r) logically equivalent karena tautologi

b) Determine whether (p  q)  r and p  (q  r) are logically equivalent.

Jawab
Misal f(p, q, r) = (p  q)  r  p  (q  r)

p q r (p  q)  r p  (q  r) f(p, q, r)
0 0 0 0 1 1
0 0 1 1 1 1
0 1 0 0 0 1
0 1 1 1 1 1
1 0 0 1 1 1
1 0 1 1 1 1
1 1 0 0 0 0
1 1 1 1 1 1

f(p, q, r) tidak logically equivalent karena tidak tautologi

Problem 7
Determine whether the following system specifications are consistent or not.

 If the file system is not locked, then new messages will be queued.
 If the file system is not locked, then the system is functioning normally, and conversely.
 If new messages are not queued, then they will be sent to the message buffer.
 If the file system is not locked, then new messages will be sent to the message buffer.
 New messages will not be sent to the message buffer.
Use the following atomic propositions p, q, r, and s:

 p : “the file system is locked”.  r : “the system is functioning normally”.


 q : “new messages will be queued”.  s : “the messages will be sent to the message
buffer”.

Jawab Dengan memilih


A1 = p  q (s) = F
A2 = p  r (p) = T
A3 = q  s (q) = T
A4 = p  s (r) = T
A5 = s
Didapatkan
(p  q) = (p  r) = (q  s) = (p  s) = (s) = T (A1) = (p  q) = T
(A2) = (p  r) = T
(A3) = (q  s) = T
(A4) = (p  s) = T
(A5) = (s) = T

Dapat disimpulkan sistem


konsisten

Problem 8
Determine whether the following system specifications are consistent or not.
 The diagnostic message is stored in the buffer or it is retransmitted.
 The diagnostic message is not stored in the buffer.
 If the diagnostic message is stored in the buffer, then it is retransmitted.
 The diagnostic message is not retransmitted.

Use the following atomic propositions:

 p : “the diagnostic message is stored in the buffer”,


 q : “the diagnostic message is retransmitted”.

Jawab Dengan memilih


A1 = p  q (p) = F
A2 = p (q) = F
A3 = p  q
A4 = q Didapatkan
(A1) = ( p  q) = F
(p  q) = (p) = (p  q) = (q) = T (A2) = (p) = T
(A3) = (p  q) = T
(A4) = (q) = T

Dapat disimpulkan sistem tidak


konsisten
Problem 9

For each of these sets of premises, what correct and relevant conclusion can be drawn? Explain the
rules of inference used to obtain each conclusion from the premises. Please explain your answer
clearly.

a) “If I play hockey, then I am sore the next day.”


“I use the whirlpool if I am sore.”
“I did not use the whirlpool.”
Use the following atomic propositions: p := “I play hockey”, s := “I am sore”, w := “I use the
whirlpool”.
Choose one of the following conclusions:
(i) I played hockey
(ii) I did not play hockey

Jawab
ps
sw
w

Akan diperiksa apakah dari premis-premis di atas dapat diperoleh kesimpulan p (I did not
play hockey) melalui aturan-aturan inferensi yang absah (valid).
1. p  s (premis)
2. s  w (premis)
3. w (premis)
4. p  w (Silogisme Hipotetik dari 1 dan 2)
5. p (modus tollens dari 3 dan 4)

Jadi penarikan kesimpulan yang dilakukan absah (valid).

b) “If Andrea is both bright and diligent, she always gets an A.”
“If Andrea always gets an A, then her GPA is 4.00.”
“Andrea is bright, but her GPA is not 4.00.”
Use the following atomic propositions: b := “Andrea is bright”, d := “Andrea is diligent”,
a := “Andrea always gets an A”, g := “Andrea’s GPA is 4.00”.
Choose one of the following conclusions:
(i) Andrea is diligent
(ii) Andrea is not diligent

Jawab
bda
ag
b  g
Akan diperiksa apakah dari premis-premis di atas dapat diperoleh kesimpulan d (Andrea is
diligent) melalui aturan-aturan inferensi yang absah (valid).
1. b  d  a (premis)
2. a  g (premis)
3. b  g (premis)
4. b  d  g (Silogisme Hipotetik dari 1 dan 2)
5. g (Simplifikasi dari 3)
6. b  d (modus tollens dari 4 dan 5)
7. d (Simplifikasi dari 6)

Jadi penarikan kesimpulan yang dilakukan absah (valid).


Problem 10

For each of these sets of premises, what correct and relevant conclusion can be drawn? Explain the
rules of inference used to obtain each conclusion from the premises. Please explain your answer
clearly.

a) “The people are miserable if the government is malevolent.”


“If the people are miserable, then crime is rampant and poverty is prevalent.”
“Crime is not rampant but poverty is prevalent.”
Use the following atomic propositions: m := “people are miserable”, g := “the government is
malevolent”, c := “crime is rampant”, and p := “poverty is prevalent”.
Choose one of the following conclusions:
(i) the government is malevolent
(ii) the government is not malevolent

Jawab
gm
mcp
c  p

Akan diperiksa apakah dari premis-premis di atas dapat diperoleh kesimpulan g (the
government is not malevolent) melalui aturan-aturan inferensi yang absah (valid).
1. g  m (premis)
2. m  c  p (premis)
3. c  p (premis)
4. g  c  p (Silogisme Hipotetik dari 1 dan 2)
5. c (Simplifikasi dari 3)
6. g  c (Simplifikasi dari 4)
7. g (modus tollens dari 5 dan 6)

Jadi penarikan kesimpulan yang dilakukan absah (valid).

b) “Maria was either drowsy or drunk (or both).”


“If Maria was drowsy, then her heartbeat was low.”
“If Maria was drunk, then her breath contained alcohol.”
“If Maria was drowsy, then her driving license will be temporarily revoked.”
“If Maria was drunk, then her driving license will be permanently revoked.”
“Maria’s breath did not contain alcohol.”

Use the following atomic propositions: p := “Maria was drowsy”, q := “Maria was drunk”,
r :=
“Maria’s breath contained alcohol”, s := “Maria’s heartbeat was low”, t := “Maria’s driving
license
is temporarily revoked”, and u := “Maria’s driving license is permanently revoked”.
Choose one of the following conclusions:
(i) Maria’s driving license will be temporarily revoked
(ii) Maria’s driving license will be permanently revoked

Jawab
pq
ps
qr
pt
qu
r

Akan diperiksa apakah dari premis-premis di atas dapat diperoleh kesimpulan u (Maria’s
driving license will be permanently revoked) melalui aturan-aturan inferensi yang absah
(valid).
1. p  q (premis)
2. p  s (premis)
3. q  r (premis)
4. p  t (premis)
5. q  u (premis)
6. r (premis)
7. q (Modus tollens 3 dan 6)
8. p (Disjunctive syllogism 1 dan 7)
9. p  q (ekuivalen dari 1)
10. p  u (Hypothetical syllogism 5 dan 9)
11. p  u (ekuivalenlis dari 10)
12. q  (r  u) (Conjunction dari 3 dan 5)
13. q  (r  u) (conditional dari 12)
14. p  (s  t) (Conjunction dari 2 dan 4)
15. p  (s  t) (conditional dari 14)
16. (s  t)  u (Resolution 11 dan 15)
17. (s  t)  u (conditional dari 16)
18. (s  t) (modus tollens dari 8 dan 14)

Kesimpulan u tidak terbukti

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy