You are on page 1of 3

Propositional logic:

The rules of logic give meaning to mathematical statements. These rules are used to distinguish between valid and invalid mathematical arguments.IN addition to its importance in understanding mathematical reasoning, logic has numerous application in computer science.

Proposition:
A proposition is a declarative sentence (that is a sentence that declares a fact) that is either true or false, but not both. Example: 1.what is your name? 2. Tell us truth. 3.1+1=2 4.2+2=3 Sentence 1 and 2 are not proposition because they are not declarative sentence. But sentence 3 and 4 are proposition because they are neither true nor false.

Conditional statements:
A conditional statement, symbolized by p q, is an if-then statement in which p is a hypothesis and q is a conclusion. The logical connector in a conditional statement is denoted by the symbol . The conditional is defined to be true unless a true hypothesis leads to a false conclusion. A truth table for p q is shown below. p T T F F q T F T F p T F T T q

Compound proposition:
A compound proposition is a proposition that involves the assembly of multiple statements.

To write the truth table for a compound proposition, it's best to calculate the statement's truth value after each individual operator. For example, in the statement , it's best to solve for , then for , and finally for the statement as a whole: 1. p = (T, T, F, F); q = (T, F, T, F) 2. p = (T, T, F, F); = (F, T, F, T) 3. = (T, T, F, T) q = (T, F, T, F) 1. = (T, F, T, F)

Tautology:
A tautology is a statement that is always true. Another wording is that a tautology is a statement that is logically equivalent to the constant truth. is an example of a tautology.

Logical operator:
A function on binary variables whose output is also a binary variable. Logical operations are the function of logic gates in digital circuits. Logical operations include AND, OR, NOT, and combinations of those operations.

Translating English Sentence:


There are many reasons to translate English sentences into expressions involving propositional Variables and logical connectives. In particular, English (and every other human language) is Often ambiguous. Translating sentences into compound statements (and other types of logical expressions, which we will introduce later in this chapter) removes the ambiguity. Note that this may involve making a set of reasonable assumptions based on the intended meaning of the Sentence. Moreover, once we have translated sentences from English into logical expressions we can analyze these logical expressions to determine their truth values, we can manipulate Them, and we can use rules of inference (which are discussed in Section 1 .5) to reason about them.

EXAMPLE 12 How can this English sentence be translated into a logical expression? "You can access the Internet from campus only if you are a computer science major or you are not a freshman."

Solution: There are many ways to translate this sentence into a logical expression. Although it

is possible to represent the sentence by a single propositional variable, such as p, this would not be useful when analyzing its meaning or reasoning with it. Instead, we will use propositional variables to represent each sentence part and determine the appropriate logical connectives between them. In particular, we let a, c, and / represent "You can access the Internet from campus," "You are a computer science major," and "You are a freshman," respectively. Noting that "only if" is one way a conditional statement can be expressed, this sentence can be represented as

a -+ (c V -,/).

You might also like