Lecture 2 Applications of Propositional Logic. Translating English into Logic " The right of the...

10
Lecture 2 Applications of Propositional Logic

Transcript of Lecture 2 Applications of Propositional Logic. Translating English into Logic " The right of the...

Page 1: Lecture 2 Applications of Propositional Logic. Translating English into Logic " The right of the people to be secure in their persons, houses, papers,

Lecture 2Applications of Propositional Logic

Page 2: Lecture 2 Applications of Propositional Logic. Translating English into Logic " The right of the people to be secure in their persons, houses, papers,

Translating English into Logic

" The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no warrants shall issue, but upon probable cause, supported by oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized."

r - search/seizure is reasonable

w - a warrant is issued

p - there is probable cause

o - there is an oath or affirmation

d - warrant describes the places to be searched and things to be seized

F - Fourth Amendment is upheld

Page 3: Lecture 2 Applications of Propositional Logic. Translating English into Logic " The right of the people to be secure in their persons, houses, papers,

Warrantless Wiretaps and Extraordinary Rendition

We conclude that the President has both constitutional and statutory authority to use the armed forces in military operations, against terrorists, within the United States. We believe that these operations generally would not be subject to the constraints of the Fourth Amendment, so long as the armed forces are undertaking a military function. Even if the Fourth Amendment were to apply, however, we believe that most military operations would satisfy the Constitution's reasonableness requirement and continue to be lawful.

m - action is a military operation

𝐹≡ (𝑚⋀ 𝑟 )∧¬𝑤

Page 4: Lecture 2 Applications of Propositional Logic. Translating English into Logic " The right of the people to be secure in their persons, houses, papers,

Is this System Consistent?

To simplify this analysis we will assume that m is true and p.o.d is true. We are interested only in those instances in which F is true.

m w r rw w=pod mr mrw' 0 0 0 0 0 0 00 0 1 0 0 0 00 1 0 0 1 0 00 1 1 1 1 0 01 0 0 0 0 0 01 0 1 0 0 1 11 1 0 0 1 0 01 1 1 1 1 1 0 NO!

Page 5: Lecture 2 Applications of Propositional Logic. Translating English into Logic " The right of the people to be secure in their persons, houses, papers,

P = (a b c d e f g h)Q = (d e f g h i j k l)R = (h i j k l m n o p)S = (a b m n)

P AND Q = (d e f g h)Q AND R = (h i j k l)P AND R = (h)R AND S = (m n)

P AND (NOT Q) = (a b c)

Boolean Searches

Web searches are examples of boolean searches. We can ask for a list of sites that include terms A AND B but NOT C. The boolean operators are implicit in most search engines e.g. Google search ( A B -C).

Page 6: Lecture 2 Applications of Propositional Logic. Translating English into Logic " The right of the people to be secure in their persons, houses, papers,

Boolean Expressions and Logic Circuits

𝑃 (𝑎 ,𝑏 ,𝑐 )=(¬𝑎∨𝑏∨¬c)∧ (𝑎∨¬𝑏∨𝑐 )∧ (𝑎∨𝑏∨𝑐 )

Propositional Logic can be used in the design and development of computer hardware.

Page 7: Lecture 2 Applications of Propositional Logic. Translating English into Logic " The right of the people to be secure in their persons, houses, papers,

Automated Theorem Proving

Page 8: Lecture 2 Applications of Propositional Logic. Translating English into Logic " The right of the people to be secure in their persons, houses, papers,

Automated Theorem Provingapplied to Game Strategy

Hex is a two-player game played on a rhombic board with hexagonal cells. The classic board is 11×11, but it can be any size. The 10×10 and 14×14 board sizes are also popular. The players, Black and White, take turns putting pieces of their color on empty cells of the board. Black's objective is to connect the two opposite black sides of the board with a chain of black pieces. White's objective is to connect the two opposite white sides of the board with a chain of white pieces

Page 9: Lecture 2 Applications of Propositional Logic. Translating English into Logic " The right of the people to be secure in their persons, houses, papers,
Page 10: Lecture 2 Applications of Propositional Logic. Translating English into Logic " The right of the people to be secure in their persons, houses, papers,

if White plays at a, Black can reply with b, forcing White to occupy c. Then Black plays d securing the connection. A computer program was used to verify that no combination of AND and OR(n) rules can establish the overall connection.

A Sample Solution