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

  Immediate determination of observability

Under what conditions can inspection of the signal-flow graph of a system yield immediate determination of observability?

  What are the three types of errors that you can encounter

1st requirement i need 2 300 word discussion questions done in apa format. each question must have at least 2

  Questionprepare a complete tutorial including an analogy to

questionprepare a complete tutorial including an analogy to describe the mechanics and a graphic to support your

  Compare two types of encryption that wpa uses

Compare and contrast the two types of encryption that WPA uses, TKIP and AES

  Show the mortgage payment amount

Write down the program as a procedural C++ program and using a loan amount of $200,000, a term of 30 years, and an interest rate of 5.75%. Insert comments in the program to document the program.

  Derive the circuit diagram for a bcd counter

Derive the circuit diagram for a BCD counter that counts from 0 through 9 (and returns to 0) using clocked SR flip-flops. The counter increments only when.

  Modify the rationalnumber class

Modify the RationalNumber class so that it implements the Comparable interface. To perform the comparison, compute an equivalent floating point value.

  Questionfirst national banks president congratulates you on

questionfirst national banks president congratulates you on successfully managing her network addressing issues. she

  Create a form button named create resume

Create a form button named Create Resume. When clicked this button should call a function that generates a new Web page displaying a resume based on the user input.

  How you format outputs that involve floating point

Discuss how you format outputs that involve floating point. Provide examples - Many programs require the use of an input mechanism to get data into the program and an output mechanism to present results and guidance.

  What is meant by two-key lockout and n-key rollover

What are the factors to be considered for interfacing a hex keyboard to a microcontroller?

  Make a public static method named comparescores

Write down a public static method named compareScores that takes two doubles as its arguments and returns the integer value of -1 if the first argument is less than the second, 0 if the first argument is the same as the second, and +1 if the first..

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