Improve understanding of propositional predicate logic

Assignment Help Computer Engineering
Reference no: EM131622999

Purpose

To improve your understanding of propositional and first-order predicate logic, including their use in mechanized reasoning. To develop skills in analysis and formal reasoning about complex concepts, and to practise writing down formal arguments.

Five challenges

Challenge 1
On the Island of Knights and Knaves, everyone is a knight or knave. Knights always tell the truth. Knaves always lie. You meet three people, let us call them A, B and C. A says to you: "If I am a knight then my two friends here are knaves." Use propositional logic to determine whether this statement gives you any real information. What, if anything, can be deduced about A, B, and C?

Challenge 2

Let ? and ψ be these propositional formulas:
- ? : ((P ⇒ S) ∧ (Q ⇒ R) ∧ (R ⇒ P )) ⇒ S.
- ψ : (((P ∨ Q) ⇒ S) ∧ (¬P ⇒ (R ⇒ Q)) ∧ (R ∨ S)) ⇒ S.

1. Negate ? and transform the resulting formula to CNF.

2. Either use resolution on the resulting set of clauses and prove that ? is valid by deriving ⊥, or show that ? is in fact non-valid.

3. Negate ψ and transform the resulting formula to CNF.

4. Either use resolution on the resulting set of clauses and prove that ψ is valid by deriving ⊥, or show that ψ is in fact non-valid.

Challenge 3
Show that the closed formula
[∀x∀y(P (x, y) ⇒ P (h(x), h(h(y))))] ⇒ ∀x(P (x, h(x)) ∧ P (h(h(x)), x)) is non-valid but satisfiable.

Challenge 4
For this question use the following predicates:
- S(x), which stands for "x is a surgeon"
- P (x, y), which stands for "x is a patient of y"
- R(x), which stands for "x recovers"
- H(x), which stands for "x is happy"

1. Express, as a formula in first-order predicate logic (not clausal form), this statement S1: "A surgeon with no patients is happy." (Be careful to get this right; most of the following depends on this.)

2. Express, as a formula in first-order predicate logic (not clausal form), this statement
S2: "A surgeon is happy if all her patients recover." (Be even more careful here.)

3. Translate S2 to clausal form (remaining careful).

4. Translate the negation of S1 to clausal form (still taking care.)

5. Give a proof by resolution to show that S1 follows from S2.

Challenge 5

Consider a single-digit display able to show the eight digits 0-7. The display has seven LEDs (labelled a-g), as shown on the right. For example, to display the digit 3, all segments except b and e should light a up. Each of the seven segments a-g can be considered a propositional function of three propositional variables X, Y and Z, with input XYZ b c specifying the desired digit in binary notation. For example, for input XYZ = 011 (that is, X being false and Y and Z being true) the outputs e f b and e should be 0 (False) while the rest should be 1 (True). In fact, the truth tables for all the functions a-g are as follows:

1715_figure.jpg

X

Y

Z

a

b

c

d

e

f

g

0

0

0

1

1

1

0

1

1

1

0

0

1

0

0

1

0

0

1

0

0

1

0

1

0

1

1

1

0

1

0

1

1

1

0

1

1

0

1

1

1

0

0

0

1

1

1

0

1

0

1

0

1

1

1

0

1

0

1

1

1

1

0

1

1

0

1

1

1

1

1

1

1

1

0

1

0

0

1

0

The single-digit display must be implemented with logic circuitry. Here we assume that only three types of logic gates are available. An and-gate takes two inputs and produces, as output, the conjunction (∧) of the inputs. Similarly, an or-gate implements disjunction (∨).

Finally, an inverter takes a single input and negates it.

The task here is to design a circuit for all of a-g using as few gates as possible. We can specify the circuit by writing down the Boolean equations for each of the outputs a-g. For example, we can define f = X ∨ ¬Y ∨ Z, which shows that f can be implemented with three gates. Since we want to use as few gates as possible, it is important to look for cases where outputs can be shared, or reused. For example, if we already have implemented b then we could define f = b ∨ Z, using just one gate. Note that any sub-circuit that you want to share (that is, you want to direct its output to different places), the output must have a name. You can define as many "helper" functions as you please, to create the smallest possible solution.

The answer to this question must be submitted separately on Grok (details below). You are to submit a text file consisting of one line per definition (so not Haskell code; this is not a Haskell programming exercise). This file will be tested automatically, so it is important that you follow the notational conventions exactly. We write ¬ as - and ∨ as +. We write ∧ as ., or, simpler, we just leave it out, so that concatenation of expressions denotes their conjunction. Here is an example set of equations (for a different problem):

# An example of a set of equations in the correct format:

a = -Y Z + Y -Z + X -Y -Z b = u + X (Y + Z)
c = X + -(Y Z)
d = u + X a u = -X -Y
# u is an auxiliary function introduced to simplify b and d

Empty lines, and lines that start with ‘#', are ignored. Input variables are in upper case. Negation binds tighter than conjunction, which in turn binds tighter than disjunction.

So the equation for a says that a = (¬Y ∧ Z) ∨ (Y ∧ ¬Z) ∨ (X ∧ ¬Y ∧ ¬Z). Note the use of a helper function u, allowing b and d to share some circuitry. Also note that we do not allow any feedback loops in the circuit. In the example above, d depends on a, so a is not allowed to depend, directly or indirectly, on d (and indeed it does not).

Verified Expert

The assignment consisted of 5 questions with various sub-parts. I have solved all the questions. I have drawn tables wherever needed. The question 5 needed a special code, which I have written. The solutions have been highlighted by yellow colour in the file attached.

Reference no: EM131622999

Questions Cloud

Resolve a situation between two employees : What are the negotiation process and strategies that a mediator will adopt to resolve a situation between two employees.
The use of online documentation and paper documentation : Evaluate online tutorials and online communities in regard to helping users. Create an argument for the approach you find to be the most effective?
Techniques within project management : What are some schedule compression techniques within Project Management? Why are they helpful?
What do equity securities represent : What do equity securities represent? Describe the two types of equity securities distinguishing between them.
Improve understanding of propositional predicate logic : Improve your understanding of propositional and first-order predicate logic, including their use in mechanized reasoning.
Internationalsection of reputable website : Conduct an Internet search to find and read at least 3 recent articles that relate to the key term you selected. Articles may be found.
Describe the factors that affect exchange rates in the long : Describe the factors that affect exchange rates in the long run?
Defines gender and class in opinion : How does your personal cultural profile affect how you communicate both formally and informally with friends, family, and other individuals you may come.
Write at least five comments that you hope people will say : Write at least five comments that you hope people will say about you at retirement party, i.e., what you contributed to the field, how you approached your work.

Reviews

len1622999

9/1/2017 5:53:30 AM

Some of the problems are harder than others. All should be solved and submitted by students individually. Your solution will count for 10 marks out of 100 for the subject. Each question is worth 2 marks. Marks are primarily allocated for correctness, but elegance and how clearly you communicate your thinking will also be taken into account. For Challenge 5, there will be 1 mark for a correct solution. After that, your mark depends on which quartile your solution sits in, when we order all solutions by increasing number of gates. If it falls in the best quartile (that is, within the 25% of solutions that use the fewest gates), we add 1 mark. If you are in the next quartile, we add 0.5 marks. Otherwise no marks are added to the mark for correctness.

len1622999

9/1/2017 5:53:24 AM

Comments: 5 questions needed to be answered. Last question required coding with haskell Some of the problems are harder than others. All should be solved and submitted by students individually. Your solution will count for 10 marks out of 100 for the subject. Each question is worth 2 marks. Marks are primarily allocated for correctness, but elegance and how clearly you communicate your thinking will also be taken into account. For Challenge 5, there will be 1 mark for a correct solution. After that, your mark depends on which quartile your solution sits in, when we order all solutions by increasing number of gates. If it falls in the best quartile (that is, within the 25% of solutions that use the fewest gates), we add 1 mark. If you are in the next quartile, we add 0.5 marks. Otherwise no marks are added to the mark for correctness.

Write a Review

Computer Engineering Questions & Answers

  Design and implement a program that will be run each day

The task requires the development of a single processor program that can subsequently be converted into a multi processor program after the testing of the single processor program is complete.

  Define expanding phase and contracting phase

Generalize the rules for two phase locking to include both mutual exclusion locks and readers-writers locks. What can be done in the expanding phase?

  Could an until loop sometimes never execute

could an until loop sometimes never execute.

  Describe the three subsystems which make up a

read the questions below and formulate a brief answer. your response to each question should be at least 2-5 sentences

  Transcripting the case

The CTO of organization that has requested your services would like for your forensics team prepare a transcript of what you could state to CTO.

  Define the way in which a person writes or sends e-mails

explain a scenario in which someone displayed bad netiquette. How did someone react to receiving the email? what could the sender have done differently to display good netiquette.

  Differentiate between periodic versus aperiodic computation

Look up the definitions of the following: Periodic versus aperiodic computation, Preemptive versus cooperative context switching.

  Utilize linked stack class to support an application

Utilize Linked stack class to support an application

  Next generation technology grants access based on human

next generation technology grants access based on human attributes?

  What is the difference between the two histograms

UMUC Data 620 Assignment 1. Write a few sentences - what is the difference between the two histograms? Which one would you use under which circumstances

  While assisting the coding manager in preparing for the

write 400-600 words that respond to the following questions with your thoughts ideas and comments. this will be the

  Stock group to accomplish the investment goal

What is the minimum amount Trader should invest in each stock group to accomplish the investment goal? Find the minimum amount Trader and please show me all the working and provide the answer.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd