Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 24

Logic Games

1. Enigmas and double entry boxes


We will begin by stating an enigma that we will solve in several ways:

"Today is a great stage: Concarneau-Chateaulin, on the Ménez-Kerveyen coast, we have six


men in the lead. They are  "

Our chronicler gets confused and mixes runners, numbers, brands and nationalities. Do you
want to help him finish this note? We know that:

 This group comprises six men, all of different nationalities: German, English,
Belgian, Spanish, Italian and French.
 Three brands sponsor the runners, each of them two: Clas, Banesto and Festina.

The following information is available:

a. The number 1 and the German are two riders who wear the colors of the Clas
brand.
b. The number 5 and the Belgian are both from the Banesto brand.
c. The Spanish one and the number 3 both carry those of the Festina brand.
d. Riders numbers 2 and 6 took advantage at the entrance to the Aulne circuit, while
the Spanish rider stayed behind.
e. The Italian and the Frenchman moved 30 seconds ahead of number 3 on the third
lap of this circuit.
f. The number 2 and the German both had to abandon after a fall.
g. Finally, the number 1 won the final sprint against the Italian .

To solve the enigma, first of all, we will address the most "direct" or "common sense" way
that does not involve formalizations or the use of specific structures; That is, it is about
using the data as it appears and making deductions from it. Obviously, as each person has
different thinking mechanisms, it will be difficult for all of us to agree on the order of the
different steps of the deductions; One way would be to treat the information in the
chronological that appears.

Method 1: Chronological deduction-"direct"

Information a), b) and c) can be summarized:

 Classes: number 1 and German runners.


 Banesto: number 5 and Belgian runners.
 Festina: runners number 3 and Spanish.
And a clear deduction is that both German, Belgian and Spanish must have even numbers,
and as a consequence of this the odd numbers correspond to Italian, English and French.
Information (d) tells us that, upon entering the l'Aulne circuit, numbers 2 and 6 surpassed
the Spaniard, we can then deduce that the Spaniard must necessarily have the number 4,
since he must have had an even number . It also follows that numbers 2 and 6 must be
distributed between German and Belgian.
The information in e) tells us that the Italian and the French overtake number 3 in the third
lap, then since both, Italian and French, are odd numbers, number 3 corresponds to the
other runner with an odd number, which is the Englishman. It also follows, therefore, that
the numbers 1 and 5 must be distributed between Italian and French.
Information f) says that the German and the number 2 suffer a fall, then, as we know that
the German can only be the 2 or 6, it necessarily follows that the German is the number 6
and then the Belgian will be the number 2.
Information g) says that the final sprint is between number 1 and the Italian, just as this can
only be number 1 or 5, it will necessarily be number 5, and therefore number 1 will be the
Frenchman, which is resolved the enigma
An outline of the procedure we have just carried out is as follows:

Information Deductions
a) Clas: nº1 and German Even numbers: German, Belgian and
b) Banesto: nº5 and Belgian Spanish
c) Festina: nº3 and Spanish odd numbers: Italian, English and
French
d) No. 2 and No. 6 advance Spanish no. 4 spanish
Nos. 2 and 6: German and Belgian
e) Italian and French overtake No. 3 no. 3 english
Nos. 1 and 5: Italian and French
f) No. 2 and German fall German No. 6
Belgian No. 2
g) No. 1 and Italian sprint Italian no. 5
French no. 1

Figure 1.1

Method 2: We start organizing the data

First phase: data organization

As the objective of the puzzle is to match each number from one to six with a nationality,
we break down only this data, forgetting about the rest of the non-relevant information: we
can take the nationalities (or also the numbers) one by one and according to the information
from to ) to g) see which numbers can correspond to you and which cannot. Thus we would
have:
Nationalities It just can't be Could be
1a)
3, 5 different brands: b) and
German 4, 6
c)
2 f)
3c)
1, 5 different brands: a) and
Spanish 4
b)
2, 6 d)
English 1, 2, 3, 4, 5, 6
1, 3 different brands: a) and
Belgian c) 2, 4, 6
5b)
3e)
Italian 2, 4, 5, 6
1g)
French 3e) 1, 2, 4, 5, 6

Figure 1.2

Second phase: deductions

Analyzing the last column of the previous table, we have that the Spanish will be the
number 4 since it is the only thing that can be, also since no other can be the 4, the rest of
the fours that appear in said column are eliminated. With this operation we are left with
only the number 6 in the first row of this third column, that is, the German is the number 6.
We eliminate the rest of the sixes from the column, thus resulting in the Belgian being
number 2. Again, we eliminate the twos, obtaining that the Italian is 5. Eliminating the
other fives we conclude that French is number 1 and, therefore, English is number 3. Let us
note that this last deduction about English could have already been made from the
beginning, since none of the others can be the number 3, as the third column shows. 

Before exposing other ways to solve this enigma, let's analyze the two given. In the first
method, there is practically no representation (modelling) of the data, the deductions are
made on the same information we are given. The second method already involves a first
phase of data organization, and thus, in the second stage of deductions the treatment is not
done on the information but on the data (the relevant synthesized information): we no
longer deduce that German does not It may be number 1 according to a), but it is about
seeing the possibilities that there are different numbers in the different rows of the "May
be" column.
It should be noted that method 2 is halfway between direct deduction and the use of a
double entry table, which is the next method to be treated.
Method 3: Double Entry Box

First phase: data organization

A double entry table allows two variables to be crossed and, thus, the repertoire of different
possible cases. In our problem we have three variables: nationality, number and brand;
Since the table only allows two variables, it seems more natural, given the information we
have, to privilege nationality and numbers, leaving the brand as a supplementary variable.
We then make a table facing the nationalities and the numbers as indicated in the following
figure; If a nationality and a number are incompatible, we will put a 0 in the corresponding
box, and a 1 will go only in that box whose nationality matches the number. Then, and as a
rule of deduction, we will have that in both a row and a column there can only be one 1 .

German Belgian Spanish French English Italian


0 0 0
1 0 (a)
(a)+(b) (a)+(c) (F)
0 0
2
(F) (d)
0 0 0 0 0
3
(a)+(c) (a)+(c) (c) (and) (and)

0 0 0
5
(a)+(b) (b) (b)+(c)
0
(d)

Figure 1.3(a)

The information given is transcribed in the form of zeros and ones on the table, to have
better control over the information. We will also note in the table, below the zeros and
ones, the information from which they come. Thus, the information a) assumes a 0 in box
(1, German), b) a 0 in (5, Belgian) and c) a 0 in (3, Spanish).
Taking into account the supplementary variable brand, we deduce from a) and b) a 0 in (5,
German); from a) and c) a 0 in (3, German) and so on, with which we have the situation
presented in the table in figure 1.3(a)

Second phase: deductions

Once we have all the coded information in the table, we begin the deduction phase using
the previously mentioned rule: only one 1 can appear in each row and column. Thus, we
have to put a 1 in the box (3, English) in the third row and, therefore, zeros in the rest of the
"English" column. You must also put a 1 in the free box corresponding to the "Spanish"
column, which forces you to put zeros in the entire row 4. Now we are forced to put a 1 in
the box (1, French), and so on, until we reach the situation presented in the box in Figure
1.3(b). In this table we have noted with a subscript in the ones boxes to show at what stage
of the deduction it has arisen.

German Belgian Spanish French English Italian


1 0 0 0 1 0 0
(to) (a)+(b) (a)+(c) (2) (F)
2 0 1 0 0 0 0
(F) (4) (d)
3 0 0 0 0 1 0
(a)+(c) (a)+(c) (c) (and) (1) (and)
4 0 0 1 0 0 0
(1)
5 0 0 0 0 0 1
(a)+(b) (b) (b)+(c) (3)
6 1 0 0 0 0 0
(5) (d)

Figure 1.3(b)

In short, the solution to the enigma by decoding the result shown in the table is: No. 1
French, No. 2 Belgian, No. 3 English, No. 4 Spanish, No. 5 Italian and No. 6 German. 
With this method, the data organization and representation phase involves a very advanced
formalism and, on the other hand, the deductive phase is almost mechanical.

Method 4: reduction to two double-entry boxes

The information given in a), b) and c), as we already saw in method 1, allows us to deduce
that German, Belgian and Spanish have even numbers, as well as French, English and
Italian have odd numbers; This allows us to reduce ourselves to two double-entry tables
with a smaller number of entries each (as shown in Figure 1.4) and with the variables
"number" and "nationality". Let us observe that now there is no longer the problem of the
three variables because precisely the variable "brand" is the one that has served us for the
split into two tables.

French English Italian German Belgian Spanish


1 0 0 1 0
1 0 2
(2) (g) (F) (1) (d)
3 0 1 0 4 0 0 1
(and) (1) (and) (1)
1 1 0
5 0 0 6 0
(1) (2) (d)

Figure 1.4

The procedure in each table is analogous to the previous one, only now the information is
more manageable and there are fewer stages of deductions: while in the previous method
there were 5 deductive stages, in this one there are only 3. 

Next, as an exercise, we move on to solve two puzzles using double entry tables. We
already know that the main thing in the task of organizing the data is to find the main
variables.

Problem: At the restaurant

After a hard morning at the Computer Science Faculty, Álvaro, Daniel, Paco, Enrique,
Carmen and Luis meet in the dining room. We know that:

a. Daniel , Carmen and the fish fan appreciate white wine.


b. Paco looks with envy at the people who chose wild boar and orange duck .
c. Álvaro and Daniel are located in front of those who taste the potato omelette and
the orange duck .
d. Álvaro, Paco and Enrique have each chosen a meat dish.

Who ordered the steak? And the snails?

Problem: Fun Scholarship

Twelve scholarship recipients: Javier, Miguel, Nacho, Silvia, Alberto, Cristina, Guillermo,
Juan, María, Marta, Marcos and Inés, participate in the summer courses at El Escorial.
Everyone has a favorite drink: mint with water, strawberry milkshake, lemonade, milk,
champagne, cola, orange juice, coffee, tea, anise, cider and beer.

Discover everyone's favorite drink knowing that:

a. On the first day, the interns play mus: Guillermo , Juan and the cider and beer
fans are together at one of the tables; in another, the anise and tea drinkers confront
Mary and Martha; and in a third, Inés and Marcos with those who like coffee and
orange juice .
b. The beautiful weather on the second day allows them to bowl in groups of four:
Javier and Miguel completely dominate the team of tea and coffee drinkers; Juan
and Guillermo easily defeat the smoothie and lemonade consumers; while Nacho
and María harshly confront the fans of orange juice and mint with water .
c. Tennis fans have little time to indulge in their favorite sport. They play doubles:
Guillermo with the cola drinker confronts Marta associated with the lemonade
drinker; On the other hand, Javier and Silvia confront those who drink beer and tea
.
d. Finally, know that, after these days of intense studies, the scholarship recipients
went to a place of rest: Juan accompanied the champagne and cola fans to
Segovia; Miguel to those who like cider and beer in Toledo; the smoothie drinker
meets Marta and Marcos in Almería, and the coffee lover meets Silvia and
Alberto in Sigüenza.

2. Integrams and phylloplots


The use of integramas

The municipal trio

Messrs. Alba, Blanco and Cano are the three candidates who obtained the greatest number
of votes in the last elections in La Garrafa. The result was very close: the one who came to
the top leads the second in one vote and the second one leads the third in another vote. The
three of them practice different sports (athletics, swimming and hiking) and have a different
favorite drink: coffee, orange juice and tea. With the following information we try to find
the classification of each candidate, their sport and their favorite drink:

a. Mr. Cano , a great coffee fan, led Blanco by a single vote.


b. The orange juice fan, who can't stand hiking , got one more vote than the tea
drinker.
c. Mr. Alba loves swimming .

To solve this enigma we are going to introduce a box called integrame. This representation
instrument is equivalent to treating several double-entry tables simultaneously, putting each
variable in correspondence with the others. Thus, if we have three variables, like the
previous enigma of the cycling race, we would have three tables (combinations of 3
elements taken 2 by 2) and we would already have all the necessary correspondences, we
have four data entries: one for each of the variables and another that a variable must be
repeated. The tables are distributed as follows:

Variable 1 Variable 3

Variable 2
Variable 3

Figure 2.1

In the case of the municipal trio, since we have four variables, to put each of the variables
in correspondence with the rest we will have to use six tables, that is, we have combinations
of 4 elements taken 2 by 2. Each box will be 3x3 since each variable takes three values

We form a table, as shown in figure 2.2(a), where the values of zeros and ones have been
placed according to information a) and b). Let us note that information a) is not only that
Mr. Cano is a coffee fan, which translates into a 1 in box (C,c), but also that Mr. Cano is
not the third, since he surpassed Mr. Blanco , and for the same reason Mr. Blanco cannot be
the first, which translates into zeros in boxes (C,3) and (B,1). In the same way, the
information in b) translates into a 0 in box (z, s) and also zeros in (t,1) and (z,3).
With this we would have the first stage of organizing the data, we just need to take into
account some information that cannot be codified in the table: Cano goes immediately
before Blanco, and the one who drinks juice goes immediately before the one who drinks
tea. We will encode an asterisk in the table where the deductions appear (Figure 2.2(b)) to
refer to the fact that we are making use of this information in the deduction.
Positions Sports Drinks
1 2 3 t n yes t c z
o
1
T
(c
O
)
0
Candidates b (t
o)
0 1
c (t (t
o) o)
0
t (b
)
Drinks c
0 0
z (b (b
) )
to
n
Sports
y
es

Figure 2.2(a)

Let's move on to the deductions part, let's first notice how the deductions about the
integrame are codified, that is, the rules that allow us to obtain the ones and zeros of the
integrame. It should be noted that each of the six tables is double entry, therefore, in each
table individually the rule is maintained that in each row and in each column there can only
be a single one and the rest zeros. In addition, we also have two specific rules of the
integrama, let's see how they are obtained from the deductions themselves. We know that
Mr. Cano is a coffee fan, which is coded as a 1 in box (C,c), and we also know that Mr.
Cano is not number 3, which is coded as a 0 in (C,3 ), then we can deduce that the coffee
lover is not number 3, that is, a 0 in (c,3). Thus, we have the integrama rule:

Rule 1: (C,c) is 1 and (C,3) is 0  (c,3) is 0

On the other hand, suppose that we already know that the coffee fan is number 1, it would
be a 1 in box (c,1), and since the coffee fan is Mr. Cano, we deduce that Mr. Cano is
number 1. , that is, a 1 in (C,1); Thus we have the second specific rule of integrama:

Rule 2: (C,c) is 1 and (c,1) is 1  (C,1) is 1

It should be noted that the order in the elements of ordered pairs is not relevant.

Let's now go on to make an exhaustive description of what the deductions could be like
(see simultaneously in figure 2.2(b)):

1. The first deduction that we can make is the one that has served as an example to
present rule 1, that is, a 0 in box (c,3).
2. Now, looking at the drinks x positions table we can use the double entry table rule,
thus in the second stage of deductions we obtain a 1 in (t,3), in the third, also taking
into account the information ( *), a 1 in (z,2) and in the fourth another 1 in (c,1).
With this we already have drinks related to stalls.
3. Furthermore, we can also deduce in the fourth stage that there is a 0 in box (s,2),
since from information b) we have a 0 in (z, s) and from the third stage of
deductions a 1 in (z, 2), so applying rule 1 gives the result.
4. In the fifth stage we deduce the one that served as an example for the second rule: 1
in (C,1). Thus, taking into account the information (*), C immediately before B, we
have in the sixth stage a 1 in (B,2). Continuing in this table of candidates x
positions, we deduce in seventh place, with the double entry table rule, a 1 in (A,3).
We already have the candidates related to the positions, we just need to find their
favorite sports.
5. From 1 in (A,3) and 1 in (A,n) we obtain, according to rule 2, a 1 in (n,3). Thus,
using the double entry box rule, we obtain in the sports x positions a 1 in (s,1) and,
finally, a 1 in (a,2).

Positions Sports Drinks


1 2 3 t n ye t c z
o s
1
T 1
(c
O (7)
)
0
1
candidates b (t
(6)*
o)
0 1
1
c (t (t
(5)
o) o)
0 1
t (b (2)
)
1 0
drinks c
(4) (1)
1 0 0
z (3)* (b (b
) )
1
to
(10)
1
sports n
(8)
y 1 0
es (9) (4)

Figure 2.2(b)

Finally, decoding the results obtained in the integration, we have:

 Mr. Alba, who has obtained 3rd place, is a fan of tea and practices swimming.
 Mr. Blanco was the second and is a fan of juice and athletics.
 Mr. Cano has obtained first place and likes coffee and hiking.

The use of phylloplots


We are going to solve the previous enigma using a graphic representation called phylloplot
(see table 3): it is a table in which the first column is used for the names of the variables, in
the last one, which must be especially broad, the information, and in the intermediate ones
the results will be noted. To do this, the first row is set in advance (the different values that
the first variable takes) and in each column we have to write down the values of the
different variables that correspond to the value given in the first row.

First phase: representation of information:

We build a table with five columns, in the first column are the variables: positions,
candidates, sports, drinks; In the first line of the results table are the values of the first
variable: 1, 2 and 3; The content of the rest of the rows of said table is what we have to
solve and in the last column we write down the information given in a), b) and c). The
choice of "positions" as the first variable has not been accidental, but has been chosen to
faithfully represent information such as "Cano immediately precedes Blanco."

Figure 2.3

How to represent the information? They can be used:

 Vertical unions between certain values of different variables, as in the case of


information c), which will be represented by the rightmost "thread" that links
candidate Alba with his sport, swimming.
 Horizontal unions , as in the case of information a) or b): indicates that the element
on the left goes immediately before the one on the right end of such union.
 Oblique unions do not appear in this puzzle, but suppose we have the information
"Mr. Cano immediately precedes the athletics fan", then we can encode this
information with an oblique segment that would go from the candidate row to the
sports row, joining Cano and athletics in such a way that athletics would be located
to the right of Cano.
 Combinations of such unions may also appear, as occurs with a).
 And what we could call impossible unions , to refer to the impossibility of the
values of two different variables being related, then the segment appears crossed by
two lines, this is the case of information b), the candidate who drinks juice does not
practice hiking.
Second phase: deductions

Solving the enigma translates into filling the columns of the results table with the
corresponding data and these data are linked by the segments as appears on the right side of
the phylloplot, then it is a matter of transferring those segments (or unions of segments) to
the convenient column of the results table. In this case, given the shape of the "threads", the
resolution of the enigma becomes the resolution of a puzzle. In any case, we will proceed
according to a rational technique in order to give guidelines to resolve more complex cases.

In the first part, it is about adding below each union, or "thread", the possible columns
where it could be placed, independently of the others. Thus, in this enigma the "thread" a)
can only be placed in columns 1 or 2, likewise the thread b) can only be placed so that juice
remains in columns 1 or 2, finally, the thread c) could go in any column.

In the second part we go on to study the possibilities together: threads a) and b) are
incompatible with each other, in the sense that they cannot be placed simultaneously in the
same column, so one of them will have to go in the column 1 and the other in 2. Since the
possibility that a) is in 2 and b) in 1 cannot occur, since juice and coffee cannot both be in
the same box, then thread a) will have to be placed in 1 and b) in 2, so there is no other way
to place c) other than in 3. Finally, due to the impossibility mentioned in thread b), hiking
not juice, we get the full picture of results:

Figure 4

Who won the gold medal?

Juan, Pedro, Carlos and Raúl were selected for the Olympic Games. We have the following
information about them:

a. The boxer has an eye patch .


b. Inés trains Juan .
c. The one who won the silver medal celebrated with mashed potatoes.
d. The athlete who loves French fries caught a cold .
e. Raúl suffered sunstroke .
f. Teresa takes care of her athlete's sprain .
g. The triple jump specialist, although he did not catch a cold , could only obtain a
chocolate medal.
h. Pedro ate sautéed potatoes.
i. Carmen trains the 100 meter runner.
j. The decathlon athlete eats baked potatoes.
k. The athlete that María trained won the bronze medal

Could you say, for each athlete, who trained them, their handicap, their favorite potato dish,
their specialty and the medal they obtained?

An appropriate way to solve this enigma, since it has many variables, is through phylloplot.
Figure 5 shows the table with the information already encoded. Three of the pieces of
information, b), e) and h), have been able to be taken directly to the results table.

We now present one of the possible ways to carry out the deductions phase:

 First stage: Considering the information in the 2nd column, none of the three
threads c), d) and j) can go in said column; Furthermore, they are incompatible with
each other in the sense that we cannot put two simultaneously in the same column.
There will then be one in each of columns 1, 3 and 4. Thread g) is incompatible
with c), d) and j), so it will have to go in the 2nd column (we place them in the
results table with a (1) to indicate that they were obtained in the first stage of
deductions).
 Second stage: Analogously to the first stage, considering the fourth column we see
that threads a), d) and f) cannot go in said 4th column, and since they are
incompatible with each other, each one will go in each of the columns. 1 2 and 3.
But we see that they are incompatible with the 2nd column, so f) will be the one that
goes in the 2nd. Furthermore, j) is incompatible with a) d) and f), so j) will go in the
4th column.
 Third stage: In view of how the results table goes, we can deduce that thread i) goes
in the 3rd and, therefore, k) in the 4th.
 Fourth stage: Finally, we see that to locate threads a), c) and d) we only have the 1st
and 3rd columns left. Since a) it is incompatible with the 3rd, then it will go in the
1st. Since d) is incompatible with a), it will have to go in the 3rd and, finally, c) will
go in the 1st since it is incompatible with d).
The results table would be:

In conclusion, the gold medal was won by Carlos in the 100 meters.

in the jam

In a terrible mess of vehicles of all kinds and colors, there are five gentlemen driving as
many vehicles. They are all of different nationalities and. To pass the bad time of being in
the middle of a traffic jam, everyone does something with their mouth. It's known that:

a. The one who whistles is not Greek (he is not called Cosme ), nor is the boyfriend of
the cousin of the one driving the bicycle .
b. Gregorio (who does not know how to whistle ) is a friend of the truck driver, but
he does not know the Irishman , nor the one who curses .
c. The Finn is the only one who has cousins, but his name is not Savario or Achilles .
None of these three sing .
d. The one driving the motorcycle is Turkish, but he does not curse or recite or
whistle .
e. Baltasar has no cousins, he is not the boyfriend of any lady, he does not know any
of the other four gentlemen and he does drive a vehicle with more than four wheels.
f. The one who hums rides a two-wheeled vehicle.
g. The German drives the car , but his name is not Achilles (this is not the Greek )
and he is not the one who curses either.

What does each man do, what vehicle does he drive and what origin is he from?

3. Enigmas and propositional logic


A diabolical riddle
We will begin this topic by proposing a riddle, frankly diabolical, created by Raymond
Smullyan, it goes like this: Two people, A and B, each make an offer, we must determine
which is the best offer.

 Offer from A. They have to formulate a statement. If the statement is true, they
earn exactly ten dollars. If the statement is false, then they earn less or more than ten
dollars, but not exactly ten dollars.
 Offer from B. They have to formulate a statement. Whether the statement is true or
false, they earn more than ten dollars.

Which of the two offers would you prefer? Most people decide that B's offer is the best,
since it guarantees more than ten dollars, while in A's offer, there is no certainty of winning
more than ten. Don't be fooled by appearances. We will make them the same offer as R.
Smullyan: If any of you are willing to propose A's offer to us, we will pay you twenty
dollars in advance. Anyone play?

Before solving this riddle, we are going to propose another one, with several variants, that
R. Smullyan presented in one of his books in order to give some clues for the resolution of
the previous one.

Prize Riddle

Suppose two prizes are offered, Prize 1 and Prize 2. They have to formulate a statement, if
the statement is true, then they receive one of the two prizes (it is not known a priori which
of the two it is); If the statement is false, then they win no prize. What statement will they
make that guarantees that they will win Prize 1?

First variant

Again, both prizes are offered. If they make a true statement, they will receive at least one
of the two prizes and possibly both. If they make a false statement, they don't win any
prizes. What statement would you formulate that would win you both prizes?

Second variant

In this case the rules change a little: If they formulate a true statement, they win Prize 2; If
they make a false statement, they do not win prize 2 (they may or may not win prize 1).
Which statement will win them Prize 1?

Third variant

Now suppose that the rules are: if they make a true statement, they do not win any prize, if
they make a false statement, they will win one of the two prizes. Which statement will win
Prize 1?

Again, the diabolical riddle


We return to the puzzle first. The diabolical thing was the offer to pay A's proposer twenty
dollars in advance, because if they agreed to do it, we could have made them all the money
we wanted, say, a million dollars. Can you find out how?

On the Island of Knights and Knaves

We continue hand in hand with R. Smullyan and we go to his Island of Knights and Knaves
where each inhabitant of the island, as his name indicates, is either a knight or a knave, and
the characteristic of these peculiar characters is: the knights always formulate true
statements and scoundrels always make false statements.
A fundamental fact of this island, which we must observe, is that no inhabitant can say that
he is a knave, for a gentleman would never lie and say that he is a knave, and a knave
would never truthfully admit that he is a knave. In the same way, no inhabitant of the island
could say that he is not a gentleman (note that it is the same fact since, for an inhabitant of
the island, not being a gentleman is the same as being a scoundrel).

The enumerator's visit

Once, Mr. McGregor, the enumerator, decided to visit the island to visit only the married
couples. During that visit, the following problems arose that we hope will help you resolve.

Problem (Y): McGregor knocked on a door; The husband opened it halfway and asked
McGergor what he wanted.
"I'm taking a census," McGregor replied, "and I need information about you and your
wife." Which, if any, is a gentleman, and which, if any, is a knave?
- We are both scoundrels! – said the husband angrily as he slammed the door.
What class is the husband and what class is the wife?

Problem (O): In the next house, McGregor asked the husband: - Are you both scoundrels?
– The husband responded: – At least one of us is.
What kind is each one?

Problem (If - then): The next house McGregor visited proved a bigger puzzle. A
somewhat introverted man timidly opened the door. When McGregor asked him to say
something about himself and his wife, all the husband said was: - If I am a gentleman, then
so is my wife.
McGregor left not very pleased. -How can I deduce anything about either of them from
such an evasive answer? - thought. He was about to write "Husband and Wife Both
Unknown" when he suddenly remembered an old lesson from his college days. Of course –
he realized – I can determine what class they both are.
What class is the husband and what class is the wife?

Actually, the solution to this problem is a particular case of the following fact:

Theorem 1. Given a proposition p, suppose a native of the Island of Knights and Knaves
says: "If I am a knight, then p." So the native must be a gentleman and true p.
The proof is the same as the solution to the previous problem, you just have to replace "my
wife is also a gentleman" with p.

Problem (If and only if): When the enumerator visited the fourth couple, the husband said:
- My wife and I are of the same class; either we are both gentlemen or we are both
scoundrels.
The husband would also give the same answer if he had said: - I am a gentleman yes and
only my wife is a gentleman. What can be deduced about the husband and what about the
wife?

As with the previous problem, the solution to this last problem is a particular case of the
following fact:

Theorem 2. Given a proposition p, suppose a native of the Island of Knights and Knaves
says: "I am a knight if and only if p." Then p is true regardless of whether the native is a
gentleman or a knave.

The proof of the theorem is the one given in the solution of the last problem, replacing "my
wife is a gentleman" with p.

An introduction to propositional logic

We will now give some basic notions of propositional logic and later we will see how to
use it to solve many enigmas and riddles, such as those of the liars and truth-tellers of the
Island of Knights and Knaves.
Propositional logic is responsible for the study of statements or verbal declarations,
understanding by statement those linguistic sequences with full meaning whose
fundamental property is that it is either true or false , but not both. Thus, the phrase "Paris
is in France" is a statement, whereas "Where is Paris?" It is not a statement and is not of
interest to propositional logic.
Statements can be composite, that is, they can be made up of statements, such that each of
them has perfect meaning, and words that connect them. The fundamental property of a
compound statement is that its truth value is completely determined by the truth values of
its components together with the way they are connected.
Propositional logic is not interested in the content of the statement itself, but rather in its
truth or falsehood value and what its structure is like: if it is a compound statement, how the
substatements that compose it are joined together. Therefore, phrases are symbolized using:
p , q , r ,  to represent simple statements (which can no longer be decomposed into
statements) and are called atomic formulas or atoms; and the symbols are used:  ,  ,  ,
 ,  to represent the words that connect them, these are called logical connectives. The
composition of atoms through connectives is called the molecular formula; In general, we
will call both atoms and molecular formulas propositions.

(  ) Negation: For every proposition p, the proposition  p means the opposite or contrary
to p. We have that  p is true if p is false and is false if p is true. For example, if p
represents the statement "Paris is in France", then  p represents the statement "It is not
true that Paris is in France" or, in other words, "Paris is not in France"; In this case p is true
and  p is false. The truth values for negation can be summarized in the following table
(we code V as the true value and F as the false, 1 and 0 are also often used respectively).

p p
V F
F V

(  ) Conjunction: Any two statements can be combined by the word "and" to form a new
one that we will call a conjunction of the previous ones. Symbolically p  q denotes the
conjunction of the propositions p and q. The truth value of p  q as a function of the truth
values of p and q is given in the following table:

p q p
q
V V V
V F F
F V F
F F F

That is, p  q is true when the statements p and q are both true, and only in that case in
Thus, the sentence "It rains and it is windy" is true only in the case when certainly "It rains"
and certainly "it is windy" ; If it is certainly raining but not windy, then the sentence is
false.

(  ) Disjunction: Two statements can be combined by the word "or" to form a new
statement which is called disjunction and in terms of propositions it will be p  q. The truth
value of p  q as a function of the truth values of p and q is given in the following table:

p q p
q
V V V
V F V
F V V
F F F

That is, p  q is only false when both statements, p and q, are false and only then. Thus, the
statement "Paris is in England or 2+2=4" is true since certainly 2+2=4.
We must observe that the "or" referred to here in the sense "and/or", that is, p can occur, q
or both can occur at the same time, as opposed to the exclusive "or": "I'm going to Seville
or to Barcelona"; Obviously I can't do both at the same time.

(  ) If-then: For any propositions p and q, we write p  q to note statements of the form
"if p, then q" and which we will call the conditional of p and q. The conditional of p and q
is true if p and q are both true or op is false. Its truth value table is:

p
p q
q
V V V
V F F
F V V
F F V

(  ) If and only if: We will note p  qa statements of the form "p if and only if q", that
is, p and q are both true or both false. The table of its values is, therefore:

p
p q
q
V V V
V F F
F V F
F F V

In general, given a proposition P(p,q,  ) we can find its truth values based on those of p,
q,  with a table like the previous ones. Let us see, for example, the truth values of the
proposition  p  (p  q)  p  q:

p q p p   p  (p  p   p  (p  q) 
q q) q pq
V V F V V V V
V F F F F F V
F V V F V V V
F F V F V V V
Note that the first columns of the table are for the variables p, q, ... and that there are
enough rows in the table to allow all possible combinations of V and F for these variables
(for 2 variables 4 rows are needed, for 3 variables need 8 rows and, in general, for n
variables you need 2 n rows). There is then a column for each "elementary" step of the
proposition, the true value of each step being determined by the previous steps through the
definitions of the logical connectives. Finally, we obtain the truth values of the proposition
in the last column.
Note that the truth values of the proposition  p  (p  q)  p  q are all true (only V
appears in the last column) regardless of the truth values of the propositions p and q, any
proposition that verifies this fact is called tautalogy . Similarly, a proposition is said to be a
contradiction if it contains only F in the last column of its truth table. The most basic
tautology would be p  p, and the contradiction would be p  p.
It can also be observed that the two columns preceding the last one are equal, that is, the
truth values of the propositions  p  (p  q) and p  q coincide, in that case it is said that
the propositions are equivalent (for If we join both propositions using the connective ,
we obtain a tautology).

Next, we present a few riddles and invite students to solve them by simple "common
sense", we will model this "common sense" using a little propositional logic.

Enigmas and logic of propositions

The diploma

After laborious years, a Computer Science student reaches the end of his studies and the
delivery of his diplomas. He suddenly finds himself in front of four closed doors. A guttural
voice is heard: "Your diploma is behind one of these doors; you have to guess which one it
is, if you are wrong you will have to start the race again. You have, however, your
possibilities: on each door there are two statements, and of the eight statements that appear
in total, only three are true, the other five are certainly false.

1. Above the ebony door you can read:


a. The diploma is behind this door.
b. The diploma is behind the mahogany door.
2. About the mahogany door:
a. The diploma is not behind the oak door.
b. The diploma is behind the ebony door or the cherry door.
3. Above the cherry door it says:
a. The diploma is neither behind the ebony door nor behind the oak one.
b. The diploma is behind the mahogany door or behind the ebony door.
4. And on the oak door you can read:
a. The diploma is not behind the cherry door.
b. The diploma is behind the mahogany door.

The loves of Inspector Lafrite's collaborators


For the two Lafrite collaborators, Relbou and Gremai, it is the time of evening relaxation,
in the restaurant. Discussion arises about female relationships and each person's feelings.
Relbou: "I will tell you two things: firstly, I love Béatrice or Hélène ; secondly, if I love
Béatrice, I love Hélène . And then, can you tell me if I love Béatrice, if I love Hélène?
Gremai: "  !"

Can you help the inspector learn a little about your colleague's private life?

A few days later, we found our two inspectors talking about the same matter. Evidently
they forgot the essential thing that had been said then.
Gremai: "Is it true that if you love Béatrice you also love Hélène ?"
Relbou: " If it's true, then I love Béatrice too ."
Gremai: "  !"

What to think of Relbou's loves?

Relbou: "I will modify the answer I just gave you, adding: if it is false, I do not love
Béatrice ."
Gremai: "So, let's go! I see; You're surrounded!"

What did Gremai discover?

Inspector Lafrite interrogates the suspects

Three suspects were arrested after the robbery of a rich Paris mansion, they are: Bradacié,
Piedplat and Nécassé. These three characters are well known to Lafrite, due to the very
random nature of the truth of their statements.
Bradacié: "Piedplat is guilty and Nécassé is innocent."
Piedplat: "If Bradacié is guilty, so is Nécassé."
Nécassé: "I am innocent but at least one of the other two is guilty."

Lafrite must face several possibilities; This is what he does before going to bed, listening to
Beethoven's Ninth Symphony.

a. Is it possible that these three bandits told the truth? So who would be guilty? 
b. All three of them could have lied, I guess! 
c. If I assume everyone is innocent, who lied?  And if I suppose them all guilty,
who lied?
d. Is it possible that there is nothing more than false testimony? And in that case, who
lied and who is guilty?
e.  And I save the best for last  after this I will sleep like a dormouse: I suppose
that the innocent tells the truth and that the guilty lies  Who is then innocent, who
is guilty?  "

Can you help the inspector answer these questions?


The island of Knaves and Knights, once again

We return to the Island of Knights and Knaves to see how we can solve the four problems
that the enumerator encountered using the logic of propositions. To do this, we must take
into account a very important fact: If A is a native of the island and we note by p the
statement "A is a gentleman" , then if A affirms k , we have that p  k is true since If p
is true then k is true, since a gentleman always tells the truth, and if p is false then A is a
knave, who always lies, so k is false.
Let us also note that, in the above conditions,  p is the statement "A is a scoundrel" .
Having made these clarifications, we are now in a position to resolve the problems, namely,
determining the gentleman or rogue character of the components of a marriage according to
the husband's statements.

Problem: Let us remember that here the husband's response was: "We are both
scoundrels." Let p be the statement "The husband is a gentleman" and q be the statement
"The wife is a gentleman." The husband asserts, in terms of propositions, k=  p  q,
therefore we know that the proposition p  p  q is true. It is about finding the
character of truth or falsehood of p and q that determines the veracity of said proposition,
let's study it using its truth table.

p q p   p  p  p
q q  q
V V F F F F
V F F V F F
F V V F F V
F F V V V F

The table shows that there is only one possibility for the proposition to be true (row 3) and
that is that p is false and q is true, that is, the husband is a knave and the wife is a knight.

Problem: In the second interview the husband stated that at least one of the two was a
scoundrel, that is,  p  q. Thus, we know that the proposition p  p   q is true, and
obtaining its truth table:

p q p   p  p  p
q q  q
V V F F F F
V F F V V V
F V V F V F
F F V V V F
It follows that the only case in which the proposition is true is if p is true and q is false. The
husband is a gentleman and the wife is a knave.

Problem: The husband's response in this case was "If I am a gentleman, then my wife is
one," p  q. Then, we try to find out when p  p  q is true, its truth table is:

p q p pp
q q
V V V V
V F F F
F V V F
F F V F

As is evident, p and q must be true (husband and wife, both gentlemen) for the proposition
to be true.

Problem: Finally, the answer the enumerator received was that they were both of the same
class, p  q, and the proposition p  (p  q) is true. Your truth table is:

p q p  p  (p 
q q)
V V V V
V F F F
F V F V
F F V F

There are two possibilities for the proposition to be true (first and third rows), in both cases
q must be true and p may or may not be true: the husband's character is indeterminate and
the wife is a knight.

4. Paradoxes
The terms most frequently used in describing a logical paradox are self-reference ,
contradiction , and vicious circle .

There are forms of self-reference and contradiction that, without being paradoxes
themselves, are quite close to a paradoxical state. Good examples of this type would be:
PLEASE DO NOT READ THIS PHRASE

FORBIDDEN TO FORBID

To do what they say, you can't do what they say. This quasi-paradox lacks the third term,
vicious circularity: although the contradiction goes around in a circle, it does not do so
again and again. Such a situation is also presented in the following story:

"A crocodile snatched a baby from its mother's arms and offered to return it to her if she
could correctly answer the question: "Will I eat your child?" The mother was intelligent
enough to answer: "Yes." So if the crocodile ate the child, proving that the mother had
answered its question correctly, it would be contradicting her offer to return it to her if she
answered correctly. With all this dilemma, the crocodile was distracted and the mother took
the opportunity to retrieve her son. Meanwhile, the crocodile lamented his bad luck because
the mother had not answered "No" to his question."

A complete and very famous paradox is the one exposed by Bertrand Russel in 1918: "A
man from Seville is shaved by the barber of Seville if, and only if, the man does not shave
himself. Does the barber of Seville shave himself?"
As we see the problem is that "if you do it, you don't do it; and if you don't do it, you do it."
The vicious circularity of complete paradoxes is now clear.

The first, and in many ways the best, example of a complete paradox is the liar's paradox.
Eubulides, philosopher from Megara from the 6th century BC. C. And successor of Euclid,
he invented it. In this paradox Epimenides the Cretan says: "All Cretans are liars." If you
tell the truth, you are lying, and if you lie you are telling the truth. It admits a simpler form:
"I am lying", which was already known by the ancients as the pseudomenon.

A medieval formula of the same was:


Socrates: "What Plato is going to say is false."
Plato: "What Socrates concludes is true."

Alfred Tarski reports: There is a book of one hundred pages with only one sentence per
page.
On page 1 it says: "The sentence printed on page 2 of this book is false."
On page 2 it says: "The sentence printed on page 3 is true."
And so on until page 99. However, on page 100, the last page of the book, it reads: "The
sentence printed on page 1 of this book is false."

The English mathematician PEB Jourdain suggested the following in 1913:


On one side of a white card print: "The statement on the other side of this card is true."
On the opposite side of the same card print: "The statement on the other side of this card is
false."

You might also like