Not a number less than 50 and an even number. Examples of problem solving

Logic is widely used not only in life, but also in the implementation of digital technology, including computers. Digital technology contains so-called logical elements that implement certain logical operations.

Logic uses simple and compound logical statements (narrative statements) that can be true ( 1 ) or false ( 0 ).

Example of simple statements:

  • "Moscow is the capital of Russia" (1)
  • "Twice two is three" (0)
  • "Great!" (not a statement)

To combine several simple statements into one compound, logical operations are used. There are three basic logical operations: AND, OR, NOT.

Order of operations:

  1. actions in brackets, comparison operations (<, ≤, >, ≥, =, ≠)

Let's consider each of the three operations separately.

1. Operation NOT changes the meaning of a logical statement to the opposite. This operation is also called "inversion", "logical negation". Operation sign: ¬

Truth table:

A NOT A
0 1
1 0

2. Operation I for a compound statement gives truth only if all the constituent simple statements are true. This operation can also be called "logical multiplication" or "conjunction". Operation sign: , & , /\

Truth table:

A B A AND B
0 0 0
0 1 0
1 0 0
1 1 1

3. The OR operation for a compound statement gives truth when at least one of the input simple statements is true. "Logical addition", "disjunction". Operation sign: + , v

A B A OR B
0 0 0
0 1 1
1 0 1
1 1 1

Examples of problem solving

Example 1.

For which of the following numbers is the statement false:

NOT(number > 50) OR(even number)?
1) 9 2) 56 3) 123 4) 8

Solution. First we perform comparisons in parentheses, then the NOT operation, and lastly the OR operation.

1) Substitute the number 9 into the expression:
NOT (9 > 50) OR(9 even)
NOT(lie) OR(false) = true OR false = true

9 does not suit us, since according to the condition we must receive a lie.

2) Substitute the number 56 into the expression:
NOT (56 > 50) OR(56 even)
NOT(true) OR(true) = false OR true = true

56 doesn't work either.

3) Substitute 123:
NOT (123 > 50) OR(123 even)
NOT(true) OR(false) = false OR false = false

The number 123 came up.

This problem could be solved in another way:
NOT(number > 50) OR(even number)

We need to get a false value. We see that the OR operation will be performed last. The OR operation will yield false when both the expressions NOT(number) and (even number) are false.

Since the condition (the number is even) must be equal to a false value, we immediately reject the options with the numbers 56, 8.

So, you can solve by direct substitution, which takes a long time and can cause an error when calculating the expression; or you can solve the problem quickly by analyzing all the simple conditions.

Answer: 3)

Example 2

For which of the given numbers is the following statement true:

NOT(First digit is even) AND NOT(Last digit is odd)?

1) 6843 2) 4562 3) 3561 4) 1234

First, we perform comparisons in parentheses, then NOT operations on parentheses, and lastly, the AND operation. This entire expression must evaluate to true.

Since the operation does NOT reverse the meaning of the statement, we can rewrite this complex expression as follows:

(First digit is odd) AND(Last digit is even) = true

As you know, logical multiplication AND gives truth only when all simple statements are true. So both conditions must be true:

(First digit is odd) = true (Last digit is even) = true

As you can see, only the number 1234 is suitable

Answer: 4)

Example 3

For which of the given names is the statement true:
NOT(First letter is vowel) AND(Number of letters > 5)?

1) Ivan 2) Nikolai 3) Semyon 4) Illarion

Let's rewrite the expression:
(First letter is not a vowel)AND(Number of letters > 5) = true
(First letter is consonant)AND(Number of letters > 5) = true

“Complex numbers” - The name “imaginary numbers” was introduced by the French mathematician and philosopher R. Descartes. Imaginary unit. Solution. The first scientist to propose introducing numbers of a new nature was George Cordano. Complex numbers. The square root of a positive number has two meanings - positive and negative. Numbers of the form a + bi, where a and b are real numbers, i is an imaginary unit, are called complex.

“Number systems” - ts Conversion from binary number system to octal and hexadecimal. Decimal number system. The position of a digit in a number is called its digit, and the number of digits in a number is its digit. The number of digits in SS is called its base. Hexadecimal number system. In a positional system, the weight of a digit depends on its position (place) in the number.

“Propositional Algebra” - Combining two statements a and b into one using the conjunction “and”. Equivalence -. Conjunction (logical multiplication) -. Stages of development of logic. Basic operations of propositional algebra. We will call simple statements logical variables, and complex ones logical functions. Logic: The word “logic” denotes a set of rules that govern the process of thinking.

“Number 4” - 4. Develop attention and logical thinking. 2.Mastering mathematical symbolism. 3. Formation of basic concepts: quantitative, natural numbers. Number and figure 4. Composition of number 4. =1+3=4. 1. Introducing the number 4, the number 4. = 3+1=4. Goals and objectives: Consolidation. = 2+2=4.

“Number systems” - Octal number system. What number systems are used to communicate with a computer? Number systems. Hexadecimal number system. Slavic number system. Roman number system - letters of the Latin alphabet are used to write numbers. Unit (“stick”, “unary”) number system.

“Lesson on numbers from 1 to 10” - Which cards are upside down? Composition of the number 5. Geometric shapes. Composition of the number 6. One, two, three, four, five! Work in notebooks. Fairy tale. Composition of the number 7. Work in a notebook. Physical education minute. 8 Game “Release the fish in the sea.” Game "Add 1 and subtract 1". Let's repeat it together. Now we’ll rest and start counting again.