1 logical operation
Logical operation, also known as Boolean operation, is a mathematical method to solve or study logical problems, that is, discrete symbols "1" and "0" are used to represent the truth and falsehood in logic, and a set of related logical operation rules based on AND or NAND are used to solve practical logical problems, thus realizing the transformation from complex logical operation to simple numerical calculation.
Although the Internet query system has different principles, it is similar to (&; ), or (||) and non-(-) wildcards are the same, which is the best example of logical operation. Let's discuss the application of logic operation in circuit design:
Wang, a company, wants to move into a new house. Before moving, he needs to complete the design and installation of the circuit. Because the house and surrounding buildings are downtown, the lighting of the living room is seriously affected. So Wang wants to design a circuit that requires four lights in the living room to be controlled by a switch. Press the switch to turn on one light at a time, then press the switch to turn on two lights, and so on, until all the lights go out when pressed for the fifth time. Suppose that the four lights are A, B, C and D in turn, the lights are on as 1, the lights are off as 0, and the switch has pulse input as 1, otherwise the truth table can be obtained according to the meaning of the question (as shown in figure 1).
Let the final state be gone. The n light is Nn, but it is not in the current state. N+ 1 lamp is Nn+ 1, and the pulse input state is M, then:
NN+1= nn ∧ m (and operation of n0 and m)
Where Nn=NA∧NB...∧Nn- 1 lights up in the following situations: (a ∧┐ b ∧┐ c ∧┐ d) ∩ (a ∧ b ?.
For example, the condition that B light is on is that A light is on and pulse input, and the condition that C light is on is that AB light is on and pulse input. The function of this circuit can be accomplished by connecting an AND gate and a counting trigger. When the switch is input for the fifth time, the output signal of the counter is set to 0, all lights are turned off, and all devices are reset at this time. As shown in figure 2.
2 paradigm theory
Normal form is the standard expression form of logical operation symbol representation. According to this method, the proposition disguised as much as possible in the same type and the symbolic content with complete functions are combined by conjunction and disjunction without changing their logical functions.
There are four people, A, B, C and D, and only two people take part in the Go game. Regarding who will take part in the competition, the following four judgments are correct:
(1) Only one of Party A and Party B will participate in the competition.
(2) C will participate, and D will also participate.
(3) At most one person from Party B or Party D will participate.
(4) If D does not participate, A will not participate.
Please infer which two people will take part in the Go game.
Suppose A: A took part in the competition.
B: B took part in the competition.
C: C took part in the competition.
Ding took part in the competition.
( 1) (a∧┐b)∨(┐a∧b)
(2) c→d
(3) ┐(b∧d
⑷┐d→┐a
So,
((a∧┐b)∨(┐a∧b))∧(c→d)∧(┐(b∧d))∧(┐d→┐a)
(a∧┐b∧┐c∧d)∨(a∧┐b∧d)∨(┐a∧b∧┐c∧┐d)
According to the meaning of the question, only two people participated.
So ┐ A ∧ B ∧ C ∧┐ D is 0, so
(a∧┐b∧┐c∧d)∨(a∧┐b∧d) is 1,
That is, A and Ding took part in the competition.
Another example is that in a seminar, three participants judged which province and city Professor Wang came from according to his accent:
A says Professor Wang is not from Suzhou, but from Shanghai.
B says Professor Wang is not from Shanghai, but from Suzhou.
C says Professor Wang is neither from Shanghai nor from Hangzhou.
Professor Wang listened to the judgments of the above three people and said with a smile, one is all right, one is half right and the other is all wrong. Try to use logical algorithm to analyze where Professor Wang is from.
Proposition P: Professor Wang is from Suzhou.
Q: Professor Wang is from Shanghai.
R: Professor Wang is from Hangzhou.
Obviously, there is only one true proposition in P, Q, r Q and R.
The judgment of a is a1= ┐ p ∧ q.
The judgment of B is A2 = P ∧┐ Q.
The judgment of C is A3 = ┐ Q ┐ R.
So,
A's judgment is right. B 1 = A 1 = ┐ P ∧ Q
A's judgment is half right B2=(┐p∧┐q)∨(p∧q)
A's judgment is completely wrong B3 = P ∧┐ Q.
B's judgment is right. C 1 = A2 = P ∧┐ Q
Half judgment of b C2 = (p ∧ q) ∨ (p ∧ q)
B's judgment is completely wrong C3 = ┐ P ∧ Q.
C's judgment is right. D1= A3 = ┐ Q ┐ R.
C's judgment is half right. D2 = (q ∧┐ r) ∨ (? q ∧ r)
C's judgment is completely wrong D3 = q ∧ r.
Professor Wang s disjunctive paradigm;
e =(b 1∧C2∧D3)∨( b 1∧C3∧D2)∨( B2∧c 1∧D3)∨( B2∧C3∧d 1)∨( B2∨c 1∧D2)∨( B3∧C2∧d 1)
A true proposition.
After calculus to the principal disjunctive paradigm, we can get
e? (┐p∧q∧┐r)∨(p∧┐q∧r)
According to the topic, Professor Wang Can can't be from Shanghai and Hangzhou, so there must be a false proposition in P and R, that is, p∧┐q∧r? 0,
therefore
e? ┐p∧q∧┐r
As true propositions, there must be P and R as false propositions and Q as true propositions, that is, A is all right, C is half right and B is all wrong. Professor Wang is from Shanghai.
3 equivalent calculus
Equivalence calculus refers to the reasoning and calculus of propositional formulas by using logical identities, substitution rules, substitution rules and duality principles. The purpose of equivalence calculus is to simplify the complex propositional formula, so as to extract the core elements of propositional equivalence and make it easy to use.
The following is a record of the debate on whether modern society needs professionals or generalists more. :
Pro: My opponent, since you say that professionals are flawed, do you still think professionals are more needed than generalists? Since you still think professionals are so important, what else do we need to do, eat?
Opposing party: The opposing party argues that generalists are more needed than professionals, but we didn't say that generalists are not needed!
In this short and intense debate, the opposing debater obviously found a strong rebuttal point. So what is this entry point? Try to do an analysis:
P:P means that it is wrong for a specialist to need more than a generalist;
Q: Q means generalists are useless.
Then the meaning of the square can be expressed as p ∧ (p→ q).
According to the implication equivalence formula (A→B? ┐A∨B) and the law of absorption (A∧(A∨B)? A) Is there a p ∧ (? p→ q) in simplification? P∧(P∨Q)? P
After simplification, we get p, which is the focus of P∧(┐P→Q), and the truth values of p and P∧(┐P→Q are the same. Therefore, the opposing side quickly retorted according to P (breakthrough point), "We don't need generalists". Obviously, it is logical to draw such a conclusion.
4 Logical reasoning
"Logical reasoning is the thinking process of inferring conclusions from premises" (1) (Tsinghua University Publishing House, Geng Suyun, Qu Wanling, and The Theory of Reasoning on Page 22 of Discrete Mathematics (Fourth Edition)) refers to a method of obtaining unknown (implied) results by constantly introducing premises, equivalence, substitution, etc. In the process of logical reasoning. Logical reasoning is widely used in artificial intelligence, case detection and trial, personnel research and daily life. The following will reflect the basic application of logical reasoning from the perspective of case detection.
Once the police received an alarm and a serious criminal case occurred in an alley. When the police arrived at the crime scene in time, five people died, leaving only Party A and Party B still fighting to the death. During the trial, the two sides accused each other of being criminals and victims, and they fought in self-defense. According to the evidence, the police finally judged the following facts:
A: One of Party A and Party B must be a criminal and the other a victim.
B: If A acted in self-defense, he must have been injured.
C: A is not injured.
Push who is the criminal. Of course, this problem is obvious at a glance, but we still try to make the following analysis logically:
Suppose: P: A is self-defense;
Q: A is a criminal;
R: A is injured.
┐┐q→p → R.
Analysis:
( 1)┐r; Introduction of preconditions
(2)p→r; Introduction of preconditions
(3)┐r→┐p; (2) Rejection type
(4)┐p;
(5)┐q→p; Introduction of preconditions
(6)┐p→q; (5) Rejection type
(7)q. (4)(6) Hypothetical reasoning makes A a criminal.
philology
[1] Geng Suyun Qu Wanling Sean Discrete Mathematics (4th Edition) [M] Beijing Tsinghua University Publishing House [
2] The application of deductive reasoning of Xu Xiaoping's propositional logic in daily life [A] Classification number: TO 142 Document identification number: A document number:1009-2854 (2007)1-0013-.
Journal of Xiangfan University
[3] The application of Teng Dingming's propositional logic in pragmatic research [A] (classification number: H 030 document identification number: A document number: 16732-2804(2008)
032-00882-03) Journal of Hebei Polytechnic University (Social Science Edition)
[4] Research on the Application of Liu Haihui's Mathematical Logic in Life [A] (ClassificationNo.: O 14 Document IdentificationNo.: A DocumentNo.:1673-9795 (2007)1(a)-0097-00.
China Science and Education Innovation Guide.