Formalizing statements in logic
[53/66%]Determine which of the statements and follows from the other, using the symbols :
;
;
, ;
.
Let be a quadratic trinomial, and the roots of the quadratic trinomial, , the abscissa of the vertex of the parabola , and let and be given numbers. Prove that:
;
;
;
.
Let and be indeterminate (open) propositions defined on the set and such that:
A) for any at least one of the propositions is true;
Б) ;
В) the propositions are mutually exclusive, i.e., if one of them is true for each , then all the others are false.
Prove that , and that the propositions are mutually exclusive.
Let be indeterminate propositions defined on the set of all triangles with sides and corresponding angles :
,
.
Prove that .
Using the method of mathematical induction, solve problems 7-13.
Formulate and write, using the symbols , the definitions of the fact that a function:
is unbounded above;
is unbounded below.
Formulate and write, using the symbols , the statement that:
the function is not increasing;
the function is not decreasing;
the function is not monotone.
Formulate and write, using the symbols , the statement that:
the number is not an upper bound of the function;
the number is not a lower bound of the function.
Formulate and write, using the symbols , the statement that:
the value , is not the largest;
the value , is not the smallest value of the function on the set .
Give an example of a sequence satisfying the condition:
;
;
and ;
: ;
.
Formulate, using the symbols , the statement that:
the sequence is not increasing;
the sequence is not decreasing.
Formulate, in "" language, the negation of the statement that is an infinitesimal sequence, and write it using the symbols .
Must the number necessarily be the limit of the sequence , if:
there exists a natural number such that for any and any the inequality holds;
for any there exist natural numbers and such that ?
Let be the set of all convergent sequences, and let be the sets of all sequences satisfying, respectively, the conditions:
;
;
;
;
;
;
.
-
Which of the following inclusions are true:
-
;
-
;
-
;
-
;
-
?
-
-
For which does the inclusion hold?
-
Which of the sets contain both convergent and divergent sequences?
-
Which of the sets contain unbounded sequences?
-
Which of the conditions 1)-8) is satisfied by every sequence?
-
Which of the sets coincide?
Prove that if the sequence satisfies the condition
then is a convergent sequence. Prove that the converse also holds.
Prove that the sequence diverges if and only if
(compare this notation with the definition of a divergent sequence in (3)).
Write, using the symbols , the definition of the fact that:
;
;
Formulate in " language" and write, using the symbols , the negations of the statements that:
;
;
.
Formulate in positive form the statements:
the sequence does not tend to ;
the sequence does not tend to ;
the sequence does not tend to .
Using the negation of the Cauchy condition, prove that the sequence diverges, if equals
,
,
;
.
A database administrator discovered that one or more of the three records and in his database is erroneous. He established that
if record is correct, then is erroneous;
at least one record of the pair is correct, and at least one record of the pair is correct;
if is erroneous, then exactly one of the records or is correct (but not both). Express the administrator's knowledge as a formula of propositional logic. Can he conclude that record is erroneous? Can it be reliably asserted that the erroneous record is unique?
The programmer Pyotr used three integer variables in his C program. At a certain point in the program he placed the conditional statement:
Having analyzed his program, Pyotr established that before this statement is executed the following conditions hold:
if , then or ;
or ;
if , then exactly one of the variables or is negative, but not both. Express Pyotr's knowledge as a formula of propositional logic. Can he optimize the program by replacing the given conditional statement with the assignment ; or with the assignment ;? If ``yes'', with which one?
A committee consists of five members. Decisions are made by majority vote; however, if the chairman votes against'', the decision is not adopted. Construct a formula of propositional logic depending on five propositional variables $x_{1}, x_{2}, x_{3}, x_{4}, y$ ($x_{i}$ means that the $i$-th committee member votes for'', means that the chairman votes ``for''), whose value equals 1 if and only if the decision is adopted as a result of the vote.
In each of the following texts, pick out the elementary statements, denote them with propositional variables, and write down a formula of propositional logic that captures the content of the text.
Misha decided to do a small renovation in his apartment and either put up new wallpaper or repaint the floor. Along with the wallpaper he will need to replace the laminate flooring, change the door, and replace the window's double-glazed unit. After repainting the floor he needs to install a stretch ceiling, a new chandelier, and new furniture. If the laminate is replaced, new furniture will also have to be bought. Old wallpaper cannot be left with old furniture, and old furniture cannot be left with an old chandelier.
If it is frosty, it will be sunny, or if it is overcast it will snow; and if it is not frosty, it will be sunny, or if it is overcast it will rain. In case of rain or snow it will be damp, and in case of rain it will also be muddy. If it is sunny, there will be neither dampness nor mud.
When Vova is home, his cat eats or sleeps, and when Vova is away, it also plays. If the cat eats, food needs to be bought. If the cat plays, new furniture or new wallpaper will have to be bought. For food one must go to the Everything for Cats'' pet shop, and for furniture or wallpaper to the Everything for the Home'' hardware store. Either shop requires taking a taxi. Vova will not take a taxi to the ``Everything for the Home'' shop.
Using the signature from example 27 on p. 140 — the two-place predicate symbols ("to be a parent of," so means " is a parent of ") and ("to be married to," means " is married to "), and the one-place predicate symbol ("to be male") — write formulas meaning:
is a grandson of ;
has at least two children;
and have one common child;
has an unmarried sister;
and are cousins;
is married, and only one of his sons is married.
The domain includes only the real numbers and the one-place infinitely differentiable functions on the set . The signature contains the three-place predicate symbol says "the value of the function at the argument equals "; and the two-place symbol , where means " is the derivative of ". Write formulas denoting the following. You may build auxiliary formulas and use ones constructed earlier:
is a number;
is a function;
is a constant function;
is a function identically equal to zero;
;
is the identity function;
;
is the exponential ;
for numbers ;
— for numbers ;
is a non-negative number;
the number is less than the number ;
the function takes all real values;
the function is one-to-one;
the function is sine;
the number equals ;
the number is a natural number.
Write formulas with free variables from that are true in elementary arithmetic of natural numbers if and only if
is an even number;
and are relatively prime;
lies in the interval between and ;
is the greatest common divisor of and ;
is the least common multiple of all numbers in the interval .
Let the signature contain two predicate symbols and . Tarski's geometry is the interpretation whose domain is the set of points in the Euclidean plane, means that the points , and lie on one line and in exactly that order ( between and ; not necessarily distinct), and means that the lengths of the segments and are equal.
Write formulas with free variables from the set that are true in Tarski's geometry if and only if
, and form a triangle;
is the midpoint of the segment ;
the ray is the bisector of the angle ;
the angle is a right angle;
the points lie on one circle;
the triangle is acute;
the segment is shorter than ;
the point lies inside the circle with center and a point lying on it.
Represent each of the following sentences by a formula of predicate logic, defining in each case a suitable signature.
Not all students study both analysis and history.
Only one student did not take the discrete mathematics exam.
Only one student passed all exams with 100 points.
The maximum score obtained in discrete mathematics exceeds the maximum score obtained in computer science.
There is a barber who shaves only those residents of the town who do not shave themselves.
There are politicians who can fool all the people some of the time; there are politicians who can fool some people all the time; but no one can fool all the people all the time.
Write a formula of predicate logic that is true only in interpretations whose domain contains one element (two, three, ..., elements).
Write a formula of predicate logic that is true only in interpretations in which the -place relation represents a function.
Write formulas expressing the following integrity constraints for the database from example 35 on p. 162, and determine which of them hold for its given state:
Example 35: the database has schema , with its state given by:
in the relation Rooms, the set of attributes (EmployeeNumber, RoomNumber) is a key;
for every person in the relation Employees, their workplace is defined in the relation Rooms;
in the relation Rooms, the numbers of all rooms on the second floor are greater than 10 but less than 20, and the numbers of all rooms on the third floor are greater than 20.
The table shown in fig. 115 shows the encoding of the decimal digits from 0 to 9 by means of four propositional variables . Combinations of values of and not listed in the table are erroneous codes. Which of the following Boolean formulas define the set of all erroneous codes:
;
;
;
;
;
?
Fig. 3: Table from problem 115.
Using the code table from the previous problem and assuming that the code is not erroneous, construct a formula with four variables and that will have value 1 if and only if the encoded number
equals 6;
is divisible by 4;
is divisible by 3;
is prime;
is composite;
is a Fibonacci number.
The variables and encode the numbers and respectively (see problem 115). Assuming that neither code is erroneous, write a formula that will have value 1 if and only if
;
;
.
The variables and encode the numbers and respectively from the set (see problem 115). Write formulas and whose values encode the product of these numbers.
A database administrator has discovered that one or more of three records in his database and is erroneous. He has established that
if record is correct, then is erroneous;
at least one record of the pair is correct and at least one record of the pair is correct;
if is erroneous, then at least one of the records or is correct (but not both together). Describe the administrator's knowledge as a formula of propositional logic. Can he conclude that record is erroneous? Can it be reliably asserted that the erroneous record is unique?
The programmer Peter used three integer variables in his C program. At a certain point in the program he placed the conditional statement: if ; else ; Having analyzed his program, Peter established that before this statement is executed the following conditions hold:
if , then or ;
or ;
if , then at least one of the variables or is negative, but not both together.
Describe Peter's knowledge as a formula of propositional logic. Can he optimize the program by replacing the given conditional statement with the assignment ; or with the assignment ;? If "yes", then with which one?
A committee consists of five members. Decisions are made by majority vote, however, if the chairman votes "against", the decision is not adopted. Construct a formula of propositional logic depending on five propositional variables ( means that the -th committee member votes "for", means that the chairman votes "for"), whose value equals 1 if and only if the decision is adopted as a result of the vote.
In each of the following texts identify the elementary statements, denote them by propositional variables, and write a formula of propositional logic reflecting the content of the text.
Misha decided to do a small renovation in his apartment and either put up new wallpaper or paint the floor. Along with the wallpaper he will need to renew the laminate flooring, replace the doors, and replace the double-glazed window. After painting the floor he needs to install a stretch ceiling, a new chandelier, and furniture. If the laminate flooring is renewed, then new furniture will also have to be bought. The old wallpaper cannot be left with the old furniture, nor can the old furniture be left with the old chandelier.
If there is frost, then it will be sunny, or if the weather is overcast it will snow, and if there is no frost, then it will be sunny, or if the weather is overcast it will rain. In case of rain or snow it will be damp, and in case of rain it will also be muddy. If it is sunny, then there will be neither dampness nor mud.
When Vova is at home, his cat eats or sleeps, and if Vova is not there, it also plays. If the cat eats, cat food needs to be bought. If the cat plays, new furniture or new wallpaper will have to be bought. For food one needs to go to the pet shop "Everything for Cats", and for furniture or wallpaper — to the hardware store "Everything for the Home". A taxi is needed to get to either shop. Vova will not take a taxi to the "Everything for the Home" store.
Detective Sh. Holmes suspects three persons of committing a crime: and . He has established that
if is the criminal, then is also the criminal;
someone from the pair is the criminal, but not both together;
if is not the criminal, then is not the criminal either.
Describe Sh. Holmes's knowledge as a formula of propositional logic and construct its truth table. Can he conclude that is the criminal? Can it be reliably asserted that the criminal acted alone?
Detective E. Poirot suspects three persons of committing a crime: and . They gave the following testimony: - : if is the criminal, then is innocent; - : if is guilty, then is also the criminal; - : is the criminal. E. Poirot has established that (а) if told the truth, then lied, and (б) 's testimony is false. Describe E. Poirot's knowledge as a formula of propositional logic and construct its truth table. Can he conclude that is the criminal? Could the criminal have been alone?
Suppose that in every zoo that has lions and rhinoceroses there are no giraffes; in every zoo that has rhinoceroses and no giraffes there are lions; finally, in every zoo that has lions and giraffes there are also rhinoceroses. Do you think there can exist a zoo in which there are lions but neither giraffes nor rhinoceroses?
Anna, Beatrice, and Vera once discovered that they were all wearing identical jeans. It is known that Anna has jeans with pockets, narrow jeans, and faded jeans without pockets; Beatrice has jeans without pockets and faded narrow jeans with pockets. And finally, Vera has flared jeans and blue narrow jeans with pockets. What do their identical jeans look like?
A student who knew English poorly went on an internship in England. He needed to get to Manchester. He hitchhiked on the highway and stopped a car in which there were a father, a mother, and a daughter, who answered his question about their trip. He translated each phrase they said in two different ways and could not decide what the phrase actually meant. Here is what they said (the second possible meaning is given in parentheses).
Father: we are heading to Manchester (we are coming from Newcastle). Mother: we are not heading to Manchester, and we are coming from Newcastle (we did not stop in Liverpool and we are coming from Newcastle).
Daughter: we are not coming from Newcastle (we stopped in Liverpool). Should the student get into this car?
Lewis Carroll, the author of the widely known book "Alice in Wonderland" (it is less well known that he was a mathematician), liked to pose the following puzzle consisting of four statements: "One of two things: either the culprit left in a carriage, or the witness was mistaken. If the culprit had an accomplice, then he left in a carriage. The culprit had neither an accomplice nor a key; or he had both an accomplice and a key. The culprit had a key." What conclusion can be drawn from this?
A professor of economics formulated three rules for the students:
if investments do not increase, then either government spending will increase or unemployment will arise;
if government spending does not increase, then taxes will decrease;
if taxes decrease and investments increase, then unemployment will not arise.
It turned out that at the present moment investments have not increased. Can the students conclude that government spending will increase?
Formulate the following puzzles as instances of problems in NP, and then solve the puzzles by finding the witnesses to the instances:
Six men, , and F, are the only members eligible for the offices of President, Vice-President, and Secretary in Club NP. The following preferences of these men are known:
-
A won’t be an officer unless E is President.
-
B won’t serve if he outranks C.
-
B won’t serve with F under any conditions.
-
C won’t serve with both E and F.
-
C won’t serve if F is President or B is Secretary.
-
D won’t serve with C or E unless he outranks them.
-
E won’t be Vice-President.
-
E won’t be Secretary if D is an officer.
-
E won’t serve with A unless F serves too.
-
F won’t serve unless either he or C is President.
How can the three offices be filled satisfying all above conditions?
Police arrested four men as the suspects of a murder case. They made the following statements when questioned:
John: "Nick did it." Nick: "Bill did it." Dan: "I didn't do it." Bill: "Nick lied when he said I did it."
If exactly one of them is the real murderer and exactly one of the above statements is true, who is the murderer?
Brown, Jones, and Smith are employed by the village of NP as fireman, policeman, and teacher, though not necessarily respectively. Someone in the village reported that:
-
Brown and the teacher are neighbors.
-
Jones and the teacher are neighbors.
-
Both Brown and Smith are neighbors of the fireman.
-
Both the policeman and the fireman are neighbors of Jones.
-
The men are all neighbors.
However, the truth of the matter is that only two of these statements are true. Can you determine the job which each man holds?
Both the Smiths and the Taylors have two young sons under eleven. The names of the boys, whose ages rounded off to the nearest year are all different, are Arthur, Bert, Carl, and David. Taking the ages of the boys only to the nearest year, the following statements are true:
-
Arthur is three years younger than his brother.
-
Bert is the oldest.
-
Carl is half as old as one of the Taylor boys.
-
David is five years older than the younger Smith boy.
-
The total ages of the boys in each family differ by the same amount today as they did five years ago.
How old is each boy, and what is each boy's family name?"
Formulate the following puzzle as a Boolean formula , and solve it by determining whether is satisfiable:
With five games left in the regular season, the team mathematician reported to the manager of the baseball team A: "We can still make the playoffs if we can beat team , and in case team beats team then team beats team , and in case we lose to team then team also beats either team or team ." Later, among the remaining five games, each team won at least one game, but no team won all its remaining games, and there was no tie game. Did team A have any chance to make the playoffs? If so, how?
Formulate the following puzzle as a Boolean formula , and solve it by determining whether is satisfiable:
Three men named Lewis, Miller, and Nelson fill the positions of accountant, cashier, and manager in the leading department store in the City of NP. The following information about their jobs is known:
-
If Nelson is the cashier, Miller is the manager.
-
If Nelson is the manager, Miller is the accountant.
-
If Miller is not the cashier, Lewis is the manager.
-
If Lewis is the accountant, Nelson is the manager.
What is each man's job?
(Knight's Tour) Find a tour of the chessboard by a knight which visits each square exactly once and comes back to the starting square.
| 3 | 6 | 33 | 40 | 27 | 44 | 29 | 46 |
|---|---|---|---|---|---|---|---|
| 34 | 37 | 2 | 5 | 32 | 47 | 26 | 43 |
| 7 | 4 | 39 | 36 | 41 | 28 | 45 | 30 |
| 38 | 35 | 8 | 1 | 48 | 31 | 42 | 25 |
| 9 | 64 | 13 | 56 | 17 | 24 | 49 | 58 |
| 14 | 55 | 10 | 61 | 52 | 57 | 18 | 21 |
| 63 | 12 | 53 | 16 | 23 | 20 | 59 | 50 |
| 54 | 15 | 62 | 11 | 60 | 51 | 22 | 19 |
| : Figure 7.1: A knight’s tour. |