Lesson in 11th grade on the topic “Solving logical problems” lesson plan in computer science and ICT (grade 11) on the topic


Lesson 27§22. Logical problems and methods for solving them

Home | Computer Science and Information and Communication Technologies | Lesson planning and lesson materials | 10th grade | Planning lessons for the school year (FSES) | Logical problems and methods for solving them

Lesson content:

22.1. Method of Reasoning 22.2. Problems about knights and knaves 22.3. Matching tasks. Table method. 22.4. Using truth tables to solve logical problems 22.5. Solving logical problems by simplifying logical expressions is THE MOST IMPORTANT. Questions and assignments Materials for the lesson

22.3. Matching tasks. Table method. 22.4. Using truth tables to solve logical problems
22.2. Problems about knights and knaves 22.5. Solving logical problems by simplifying logical expressions

22.3. Matching tasks. Table method

Many logical problems involve the consideration of several finite sets and connections between their elements. To solve such problems, they often resort to tables or graphs. The success of solving the problem largely depends on how well their structure is chosen.

Example 5 . At the summer camp, Alyosha, Borya, Vitya and Grisha lived in the same tent. They are all of different ages, study in different grades (from 7th to 10th) and are involved in different clubs: mathematics, aircraft modeling, chess and photography. It turned out that the photographer is older than Grisha, Alyosha is older than Vitya, and the chess player is older than Alyosha. On Sunday, Alyosha and the photographer played tennis, and at the same time Grisha lost to an airplane modeler in the towns.

Let's determine who is involved in which circle.

In this problem we are talking about an expressive form (predicate) of the form “Student x studies in circle y.” It is necessary to determine such values ​​of x and y that the statement form turns into a true statement.

Let's make a table:

Let's consider the conditions:

1) the photographer is older than Grisha; 2) Alyosha is older than Vitya, and the chess player is older than Alyosha; 3) on Sunday Alyosha and the photographer played tennis, and at the same time Grisha lost to an aircraft model designer in the towns.

We can draw conclusions: Grisha is not a photographer (1); the chess player is not Alyosha or Vitya (2); Alyosha is not a photographer or an aircraft modeller, Grisha is not a photographer or an aircraft modeller (3). Let's note this in the table:

The available information is enough to state that Alyosha studies mathematics, and Grisha studies chess:

From the fact that Grisha is a chess player, and conditions (1) and (2), it follows that we can arrange the students by age (in ascending order): Vitya - Alyosha - chess player Grisha - photographer. Therefore, Borya is a photographer. This is enough to completely fill out the table:

So, Alyosha is in a math club, Borya is in a photography club, Vitya is in an aircraft modeling club, Grisha is in a chess club.

Draw your own conclusion about which of the children is in which class.

22.4. Using truth tables to solve logical problems

The apparatus of logical algebra allows one to apply universal methods based on the formalization of the conditions of the problem to a wide class of logical problems.

One of these methods is the construction of a truth table based on the conditions of the problem and its analysis. To do this you should:

1) select elementary (simple) statements from the problem conditions and designate them with letters; 2) write down the condition of the problem in the language of logical algebra, combining simple statements into compound statements using logical operations; 3) build a truth table for the resulting logical expressions; 4) choose a solution - a set of logical variables (elementary statements), in which the values ​​of logical expressions correspond to the conditions of the problem; 5) make sure that the resulting solution satisfies all the conditions of the problem.

Example 6 . Three divisions A, B, C of a trading company sought to obtain maximum profit at the end of the year. Economists have made the following assumptions:

1) if A receives the maximum profit, then B and C will receive the maximum profit; 2) A and C will or will not receive the maximum profit at the same time; 3) a necessary condition for division C to obtain maximum profit is to obtain maximum profit for division B.

At the end of the year, it turned out that one of the three assumptions was false, and the other two were true.

Let's find out which of the named divisions received the maximum profit.

Let's consider elementary statements:

• A - “A will receive the maximum profit”; • B - “B will receive the maximum profit”; • C - “C will receive the maximum profit.”

Let us write down the forecasts made by economists in the language of logical algebra:

Let's create a truth table for F1, F2, F3.

Now remember that out of three predictions F1, F2, F3, one turned out to be false, and the other two turned out to be true. This situation corresponds to the fourth row of the table.

Thus, divisions B and C received the maximum profit.

Download lesson materials

Solving logical problems

The variety of logical problems is very large. There are also many ways to solve them. But the most widespread are the following three methods of solving logical problems:

  • by means of algebra of logic;
  • tabular;
  • through reasoning.

Let's get to know them one by one.

The following solution scheme is usually used:

1. the condition of the problem is studied;

2. a notation system for logical statements is introduced;

3. a logical formula is constructed that describes the logical connections between all statements of the problem conditions;

4. the truth values ​​of this logical formula are determined;

5. From the obtained truth values ​​of the formula, the truth values ​​of the entered logical statements are determined, on the basis of which a conclusion about the solution is made.

Example 1. Three friends, fans of Formula 1 auto racing, were arguing about the results of the upcoming stage of the race.

“You’ll see, Schumacher won’t come first,” John said. Hill will be the first.

“No, the winner will be, as always, Schumacher,” Nick exclaimed. “And there’s nothing to say about Alesi, he won’t be the first.”

Peter, whom Nick turned to, was indignant:

“Hill won’t be in first place, but Alesi is piloting the most powerful car.”

At the end of the racing stage, it turned out that each of the two assumptions of the two friends was confirmed, and both of the assumptions of the third friend were incorrect. Who won the race stage?

Solution. Let us introduce notation for logical statements:

Ш - Schumacher will win; X - Hill will win; A - Alesi will win.

Nick's line "Alesi drives the most powerful car" does not contain any statement about the place that this driver will take, so it is not taken into account in further reasoning.

Let's record the statements of each of the friends:

John: ¬Ш/\Х

Nick: Ш/\¬А

Peter: ¬X

The statement Ш /\ ¬ А /\ ¬Х is true only when Ш=1, А=0, Х=0.

Answer. The winner of the racing stage was Schumacher.

When using this method, the conditions contained in the problem and the results of reasoning are recorded using specially compiled tables.

Example 2. The symphony orchestra hired three musicians: Brown, Smith and Wesson, who could play the violin, flute, viola, clarinet, oboe and trumpet.

It is known that:

  1. Smith is the tallest;
  2. the violin player is shorter than the flute player;
  3. violin and flute players and Brown love pizza;
  4. when a quarrel arises between a violist and a trumpet player, Smith reconciles them;
  5. Brown can't play the trumpet or oboe.

What instruments does each musician play if each plays two instruments?

Solution. Let's draw up a table and reflect the conditions of the problem in it, filling in the corresponding cells with the numbers 0 and 1, depending on whether the corresponding statement is false or true.

Since there are three musicians, six instruments, and each one plays only two instruments, it turns out that each musician plays instruments that the others do not know.

From condition 4 it follows that Smith does not play the viola or trumpet, and from conditions 3 and 5 that Brown cannot play the violin, flute, trumpet and oboe. Therefore, Brown's instruments are viola and clarinet. Let’s put this in the table, and fill the remaining cells of the “viola” and “clarinet” columns with zeros:

The table shows that only Wesson can play the trumpet.

From conditions 1 and 2 it follows that Smith is not a violinist. Since neither Brown nor Smith plays the violin, Wesson is the violinist. Both instruments that Wesson plays are now defined, so the remaining cells of the string "Wesson" can be filled with zeros:

The table shows that only Smith can play the flute and oboe.

Answer: Brown plays viola and clarinet, Smith plays flute and oboe, and Wesson plays violin and trumpet.

This method is usually used to solve simple logical problems.

Example 3. Vadim, Sergey and Mikhail are learning various foreign languages: Chinese, Japanese and Arabic. When asked what language each of them was studying, one replied: “Vadim is studying Chinese, Sergei is not studying Chinese, and Mikhail is not studying Arabic.” Subsequently, it turned out that in this answer only one statement is true, and the other two are false. What language is each young person learning?

Solution . There are three statements:

  1. Vadim is studying Chinese;
  2. Sergey does not study Chinese;
  3. Mikhail does not study Arabic.

If the first statement is true, then the second is also true, since young men learn different languages. This contradicts the statement of the problem, so the first statement is false.

If the second statement is true, then the first and third must be false. It turns out that no one studies Chinese. This contradicts the condition, so the second statement is also false.

It remains to consider the third statement to be true, and the first and second to be false. Consequently, Vadim does not study Chinese, Sergei studies Chinese.

Answer: Sergey is studying Chinese, Mikhail is studying Japanese, Vadim is studying Arabic.

Example 4. The foreign ministers of Russia, the United States and China discussed behind closed doors the draft agreement on complete disarmament presented by each country. Then answering the journalists’ question: “Whose project exactly was adopted?”, the ministers gave the following answers:

Russia - “The project is not ours, the project is not the USA”; USA - “It’s not a Russian project, it’s a Chinese project”; China - “The project is not ours, it’s Russia’s project.”

One of them (the most outspoken) told the truth both times; the second (most secretive) told a lie both times, the third (cautious) told the truth once, and another time - a lie.

Determine which countries the frank, secretive and cautious ministers represent.

Solution. For ease of recording, let’s number the diplomats’ statements:

Russia - “The project is not ours” (1), “The project is not the USA” (2); USA - “Project not of Russia” (3), “Project of China” (4); China - “The project is not ours” (5), “Russia’s project” (6).

Let's find out which of the ministers is the most outspoken.

If this is a Russian minister, then from the validity of (1) and (2) it follows that the Chinese project won. But then both statements of the US Secretary of State are also true, which cannot be the case according to the condition.

If the most outspoken one is the US minister, then again we get that the Chinese project won, which means both statements of the Russian minister are also true, which cannot be the case according to the condition.

It turns out that the Chinese minister was the most outspoken. Indeed, from the fact that (5) and (6) are true, it follows that the Russian project won. And then it turns out that of the two statements of the Russian minister, the first is false, and the second is true. Both statements by the US Secretary of State are incorrect.

Answer: The Chinese minister was more open, the Russian minister was more cautious, and the US minister was more secretive.

Method of reasoning

The reasoning method is the most primitive method and is usually used to solve the simplest logical problems. The idea of ​​the method is to carry out reasoning by sequentially using all the conditions of the problem, as a result of which they come to a conclusion, which is the answer to the problem.

Finished works on a similar topic

  • Coursework Solving logical problems 480 rub.
  • Abstract Solving logical problems 230 rub.
  • Test work Solving logical problems 250 rub.

Receive completed work or advice from a specialist on your educational project Find out the cost
Example 1

Vladimir, Semyon and Oleg are studying different foreign languages: English, French and German. When asked what language each of them was studying, one answered: “Vladimir is studying English, Semyon is not studying English, and Oleg is not studying German.” Subsequently, it turned out that in this answer only one statement is true, and the other two are false. What language is each student studying?

Solution:

We have three statements. If we accept the first statement as true, then the second is also true, because students study different languages, which contradicts the conditions of the problem. Thus the first statement is false.

If the second statement is true, then the first and third must be false. In this case, we find that no one is learning English. This contradicts the condition, so the second statement is also false.

The third statement remains, which we can consider true, and the first and second - false. Thus, Vladimir does not study English, Semyon studies it.

Answer: Semyon is studying English, Oleg is studying French, Vladimir is studying German.

Too lazy to read?

Ask a question to the experts and get an answer within 15 minutes!

Ask a Question

Rating
( 2 ratings, average 4 out of 5 )
Did you like the article? Share with friends: