<< Chapter < Page Chapter >> Page >

Some binary relations can be viewed as the encoding of a unary function, where the first element of the ordered pair representsthe function's value. For instance, in a previous exercise we encoded the binary function addition as a ternary relation addsTo .

  1. Give one example of a binary relation which does not correspond to the encoding of a function.
  2. Write a first-order formula describing the properties that a binary relation R must have to correspond to a unary function.

Got questions? Get instant answers now!

Alternation of quantifiers: Determine the truth of each of the following sentencesin each of the indicated domains.

To help yourself, you might want to develop an English version of what the logic sentences say.Start with the inner formula (talking about people x , y , z ), then add the quantifier for z to get a statement about people x , y , and repeat for the other two quantifiers.

Four sentences:

  1. x y z likes x y z y likes y z
  2. x y z likes x y z y likes y z
  3. x y z likes x y z y likes y z
  4. x y z likes x y z y likes y z

Four domains:

  1. The empty domain.
  2. A world with one person, who likes herself.
  3. A world with Yorick and Zelda, where Yorick likes Zelda, Zelda likes herself, and that's all.
  4. A world with many people, including CJ (Catherine Zeta-Jones), JC (John Cusack), andJR (Julia Roberts). Everybody likes themselves;everybody likes JC; everybody likes CJ except JR;everybody likes JR except CJ and IB. Any others may or may not like each other, as you choose,subject to the preceding. (You may wish to sketch a graph of this likes relation, similar to Rosen Section 9.1 Figure 8.)

Determine the truth of all sixteen combinations of the four statements and four domains.

Got questions? Get instant answers now!

Modeling

Translate the following into first-order logic:

Raspberry sherbet with hot fudge ( rshf ) is the tastiest dessert.
Use tastier as your only relation.

What is the intended domain for your formula? What is a relation which makes this statement true?One which makes it false?

Got questions? Get instant answers now!

Even allowing for ellision, the list of WaterWorld domain axioms is incomplete, in a sense. The game reports how many pirates exist in total, butthat global information is not reflected in the propositions or axioms. We had the same problem with the propositional logic domain axioms

  1. First, assume we only use the default WaterWorld board size and number of pirates, i.e. , five. What additional axiom or axioms do we need?
  2. Next, generalize your answer to model the program's ability to play the game with a different number of pirates.What problem do you encounter?
Got questions? Get instant answers now!

The puzzle game of Sudoku is played on a 9 9 grid, where each square holds a number between 1 and 9.The positions of the numbers must obey constraints. Each row and each column has each of the 9 numbers.Each of the 9 non-overlapping 3 3 square sub-grids has each of the 9 numbers.

Like WaterWorld, throughout the game, some of the values have not been discovered, although they are determined.You start with some numbers revealed, enough to guarantee that the rest of the board is uniquely determined by the constraints.Thus, like in WaterWorld, when deducing the value of another location, what has been revealed so far would serve aspremises in a proof.

Fortunately, there are the same number of rows, columns, subgrids, and values.So, our domain is 1 2 3 4 5 6 7 8 9 .

To model the game, we will use the following relations:

  • value r c v indicates that at row r , column c is the value v .
  • v w is the standard equality relation.
  • subgrid g r c indicates that subgrid g includes the location at row r , column c .

Provide domain axioms for Sudoku, and briefly explain them. These will model the row, column, and subgrid constraints.In addition, you should include constraints on our above relations, such as that each location holds one value.

Got questions? Get instant answers now!

Reasoning with equivalences

Some of the first-order equivalences are redundant. For each of the following, prove the equivalence using the other equivalences.

  1. x ϕ θ x ϕ θ
  2. Assuming a non-empty domain, x θ ϕ θ x ϕ .

Got questions? Get instant answers now!

We can characterize a prime number as a number n satisfying q r q r n q 1 r 1 . Using the equivalences for first-order logic, show step-by-step that this is equivalent to the formula q r q r n q 1 r 1 . Do not use any arithmetic equivalences.

Got questions? Get instant answers now!

A student claims that x A x B x C z x A x x B x C z by the

distribution of quantifiers
. This is actually trying to do two steps at once.Rewrite this as the two separate intended steps, determine which is wrong, and describe why that step is wrong.

Got questions? Get instant answers now!

Simplify the formula x y z A x B y C z , so that the body of each quantifier contains only a single atomic formula involving that quantified variable. Provide reasoning for each step of your simplification.

Got questions? Get instant answers now!

Reasoning with inference rules

[Practice problem solution provided.]

Prove that syllogisms are valid inferences. In other words, show that x R x S x , R c S c .

1 x R x S x Premise
2 R c Premise
3 R c S c ∀Elim, line 1
4 X c ⇒Elim, lines 2,3
Got questions? Get instant answers now!

What is wrong with the following

proof
of x E x E c ?

1 subproof: x E x E c
1.a x E x Premise for subproof
1.b E c ∃Elim, line 1.a
2 x E x E c ⇒Intro, line 1
Got questions? Get instant answers now!

Using the inference rules, formally prove the last part of the previous problem about ducks and such .

Got questions? Get instant answers now!

Give an inference rule proof of x Fruit x hasMethod tasty x , y Apple y Fruit y z Apple z hasMethod tasty z .

Got questions? Get instant answers now!
  1. Prove the following: x P x , y P y Q y z Q z
  2. Your proof above used ∃Intro. Why can't we replace that step with the formula z Q z with the justification
    ∀Intro
    ?
  3. Describe an interpretation which satisfies the proof's premises, but does not satisfy z Q z .
Got questions? Get instant answers now!

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Intro to logic. OpenStax CNX. Jan 29, 2008 Download for free at http://cnx.org/content/col10154/1.20
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Intro to logic' conversation and receive update notifications?

Ask