• Tidak ada hasil yang ditemukan

Foundations of Computer Science

N/A
N/A
Protected

Academic year: 2023

Membagikan "Foundations of Computer Science"

Copied!
7
0
0

Teks penuh

(1)

COMP 140-04B

Foundations of Computer Science

Test 4

14th October 2004

Family Name:

Given Name:

ID Number:

Instructions

1. First write your name and ID number into the space above.

2. Write your answers into the space provided.

3. If the space provided is insufficient, continue writing on the back side of the page, or on the spare page at the end of this test. If that also is insufficient, additional paper can be obtained from the lecturer. Do not use paper of your own.

4. There are five questions, worth 10 marks each. Answer all of them.

5. Time allowed is 40 minutes.

6. Do not fill the table below.

1 2 3 4 5 Total

(2)

a) Write down the →-elimination rule (→-elim)for natural deduction as given in the lec- tures.

b) What other name is frequently given to this rule?

c) Write down the→-introduction rule (→-intro)for natural deduction as given in the lec- tures.

d) Explain how to use the→-introduction rule.

e) Can there be a sound deductive system that does not use at least one of these two proof rules?

(3)

Give natural deduction proofs for the following propositional formulas under the premises given in each case. Write each proof step on a numbered line of its own, and indicate for each line how it was obtained.

a) Give a proof forp→rfrom the premisesp→qandp∧q→r.

b) Give a proof for(p→q)→(¬q → ¬p)without premises.

(4)

Consider a language of predicate logic with the predicate symbols lion, zebra, predator, andeats, and their intended meaning given as follows.

• lion(x)means thatxis a lion.

• zebra(x)means thatxis a zebra.

• predator(x)means thatxis a predator.

• eats(x, y)means thatxlikes to eaty.

Translate the following sentences into predicate logic, using only the above predicate symbols.

a) There exists a lion.

b) All lions are predators.

c) Nothing is both a lion and a zebra.

d) Some lions like to eat zebras.

e) Some lions only like to eat zebras.

(5)

State for each of the following predicate logic formulas whether they are valid, satisfiable but not valid, or unsatisfiable.

a) ∃x white(x)

b) ∀x(white(x)∧black(x))

c) ∃x white(x)∧ ∀x¬white(x)

d) ∀x(white(x)∧black(x))→(∀x white(x)∧ ∀x black(x))

e) ∀x(white(x)∨black(x))→(∀x white(x)∨ ∀x black(x))

(6)

Give a natural deduction proof for the predicate logic formula

∃x(white(x)∨black(x))→(∃x white(x)∨ ∃x black(x))

without premises. Write each proof step on a numbered line of its own, and indicate for each line how it was obtained.

(7)

Referensi

Dokumen terkait

Given a similar situation, Agarwal (2019) analyzes each of three tax implications for the UK case: (i) operating leases, in which the lessee chooses to apply IFRS 16 so that

For a more detailed explanation about each variable, the researcher defines each variable and provides measurements based on previous research that uses a Likert scale to measure each