Question

In: Computer Science

How is Logics such as (Predicate Logic, Propositional Logic, and Logical Reasoning) used in Computer Science?...

How is Logics such as (Predicate Logic, Propositional Logic, and Logical Reasoning) used in Computer Science?

Examples of how it implies to computer science would be great.

Solutions

Expert Solution

Predicate logic, Propositional logic and Logical Reasoning in Computer Science

Propositional logic

  • It is also a part of Artificial Intelligence study
  • It is about asserting a statement whether it is true or false based on proved facts and validating it as Boolean result
  • Propositional logic can be used for encoding arguments. The arguments are involved in natural languages.
  • It can help validating using truth tables
  • Examples are
    • “Mango is yellow”
    • “Earth is spherical” ,
    • 2+2 =4
  • In computer science it finds it way as
    • digital electronic circuits
    • Conditions using loops like for, while , do while switch case , if , else, in programming
    • Boolean operators in programming
    • Database queries

Technical Example

  1. A :Good televisions are not cheap
  2. B : Cheap televisions are not good
  3. C : A implies B
  4. D : B implies A<>
  5. E: A is equivalent to B

Result : C, D and E are correct using a truth table as below explained

a and b are 2 propositions

a : Good televisions
b: cheap televisions

A and B can be expressed as follows

A: a --> ~b
B: b--> ~a

Let u check using Truth table as below

a b ~a ~ b A B
T T F F F F
T F F T T T
F T T F T T
F F T T T T

Since A and B are equal, C, D, E are correct.

Predicate Logic

Predicate logic also part of Artificial Intelligence and it is the general notation of a property or a characteristic of a subject referred in a statement

Example:

Create definition and Premises to prove using Predicate Logic.

L :≡ Labrador ( is a popular breed of a dog)

A (x) :≡ " x is an animal"

M(x) :≡ "x is Mortal"

A(L) - Labrador is a animal

x A(x) -> M(X) - "All animals are mortal"

Result : It is proved that Labrador is mortal

Logical Resulting

  • Logical Reasoning is the key aspect in computer science and software programming
  • Logical reasoning is applied in problem solving
  • Logical reasoning is applied in Machine Learning algorithms to predict a output as true or false based on input variables
  • Based on input data , one system can conclude a result
  • Computer science uses set of rules , applied by algorithms using logical reasoning
  •   Logical reasoning is reaching into conclusions based on Propositional logic , predicate logic too.

Examples which I explained in above are applicable to logical reasoning. Let me some more below

  • When a fruit is round , big ,depressed on top and red in colour it can be an apple . Saying apple based on the given data , is the conclusion as a logical reasoning. This kind of conclusion and analysis can be done using Machine Learning algorithms by training the machine with data about fruits which will group and classify based on their unique features and with the predefined output as apple, orange or banana etc as part of Supervised Learning .
  • In an Unsupervised Learning, the input variables will be trained to the machine without output variable as the machine . So the machine will group the fruits based on its features like colour (red, yellow, green) and produce an output variable without seeing it earlier and without predefined output .

Related Solutions

Conceptually the two most common logics are propositional logic and Predicate Logic. An undergraduate student who...
Conceptually the two most common logics are propositional logic and Predicate Logic. An undergraduate student who took a course of discrete mathematics is inquiring as to how propositional and predicate logics can be used in software testing. How are ask to guide this student in this quest. One pointer may consist in presenting the characteristics and limitations of both logic as well as their use as a mean for software testing. Which Logic is most adequate for formal verification of...
Propositional Logic Using operator properties and other logical equivalences (not truth tables), prove these statements. 1....
Propositional Logic Using operator properties and other logical equivalences (not truth tables), prove these statements. 1. ((p→r)∧(q→r)∧(p∨q))→r (tautology) 2. ¬(q→p)∧(p∧q∧s→r)∧p (contradiction) 3. (p→q)∧(p→r)≡p→(q∧r)
Mathematics is known to be rooted in logic and reasoning. How do you perceive it to...
Mathematics is known to be rooted in logic and reasoning. How do you perceive it to be an important tool in dealing with practical problems in life because of this? (minimum of 8 semtences essay type)
1.      How do differing philosophies of science (received view or logical positivism and perceived view) influence...
1.      How do differing philosophies of science (received view or logical positivism and perceived view) influence whether nursing is considered a hard, soft, applied, or human science? 2.      Whall (2012/2005, Ch # 9)) states that “Practice is not a ‘stand alone’ phenomenon; rather, it is a direct outcome of philosophic beliefs.” What does this mean in relation to your practice as an APN? Describe assumptions you have about your philosophy of science as it relates to your practice. (DNP Essential:...
What are the data structures. How these are useful in different fields of computer science. Discuss...
What are the data structures. How these are useful in different fields of computer science. Discuss at least three fields.
Describe the purpose of the logic model and how it is used in program development. Discuss...
Describe the purpose of the logic model and how it is used in program development. Discuss the purpose of input, output, and outcomes in the model.
I have a program to code for my computer science class, and Im not sure how...
I have a program to code for my computer science class, and Im not sure how to do it. If someone can explain it step by step I would appreciate it. Problem Description: Define the GeometricObject2D class that contains the properties color and filled and their appropriate getter and setter methods. This class also contains the dateCreated property and the getDateCreated() and toString() methods. The toString() method returns a string representation of the object. Define the Rectangle2D class that extends...
What is the logic of domination and how is it used to dominate women, non-white peoples...
What is the logic of domination and how is it used to dominate women, non-white peoples and the environment according to Warren?
Select one of the following three common computer science problems and describe how recursion can be...
Select one of the following three common computer science problems and describe how recursion can be used to solve this problem more efficiently (sorting, minimum cost spanning tree, knapsack problem). You must generally describe the algorithm that would be used to solve the problem and detail how recursion makes the algorithm more asymptotically efficient.
Computer Science - Java Programming How do you read a text file and store three different...
Computer Science - Java Programming How do you read a text file and store three different pieces of information in the database when the given text file contains this info.: 12345 Computer Science Bob Stone 23456 Art James G. Ocean? These are written in the format as ID Class Name. I was going to take the three different pieces of information by separating them by spaces, but the number of spaces is random and I don't know how to adjust...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT