Computer Science: An Overview (13th Edition) (What's New in Computer Science)
13th Edition
ISBN: 9780134875460
Author: Glenn Brookshear, Dennis Brylow
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Chapter 6, Problem 58CRP
Program Plan Intro
Prolog
The prolog programming refers to the programming with logics. It is also a declarative programming language. A prolog program consists of some statements. There is a collection of initial statements, followed by some reasonably deducted statements.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Write a single rule in the below Prolog program to have the answer shown in the result window. The comments are provided to give you a better understanding of the program.
greater(a,b). /* a is greater than b */
greater(b,c). /* b is greater than c */
/* Need to write a single rule*/
?- superGreater(a,c). /* is a greater than c? */
/* Result window*/
true
PROLOG! (CAN SOMEONE USE THE POWER OF PROLOG LABGUAGE TO SOLVE THESE 2 HW QUESTIONS)?
I need someone to use prolog language to solve these 2 questions
Only answer if you know this, otherwise you will get a downvote. No Spamming please!!
Explain Prolog search strategy. Make use of the following figure in your explanations.
Chapter 6 Solutions
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
Ch. 6.1 - In what sense is a program in a third-generation...Ch. 6.1 - We can summarize the imperative programming...Ch. 6.1 - Prob. 4QECh. 6.2 - Why is the use of a constant considered better...Ch. 6.2 - Prob. 2QECh. 6.2 - Prob. 3QECh. 6.2 - Identity some common control structures found in...Ch. 6.2 - What is the difference between an array and an...Ch. 6.3 - Prob. 1QECh. 6.3 - Prob. 2QE
Ch. 6.3 - Why do many programming languages implement I/O...Ch. 6.3 - Prob. 4QECh. 6.3 - Prob. 5QECh. 6.4 - Prob. 1QECh. 6.4 - What is a symbol table?Ch. 6.4 - What is the difference between a terminal and a...Ch. 6.4 - Prob. 4QECh. 6.4 - Prob. 5QECh. 6.4 - Prob. 6QECh. 6.5 - What is the difference between an object and a...Ch. 6.5 - Prob. 2QECh. 6.5 - Suppose the classes PartTimeEmployee and...Ch. 6.5 - What is a constructor?Ch. 6.5 - Why are some items within a class designated as...Ch. 6.6 - Prob. 1QECh. 6.6 - Prob. 2QECh. 6.6 - Prob. 3QECh. 6.7 - Prob. 2QECh. 6.7 - Prob. 3QECh. 6.7 - Prob. 4QECh. 6 - Prob. 1CRPCh. 6 - Translate the following Python program into the...Ch. 6 - Prob. 3CRPCh. 6 - Why was it necessary to identify the type of data...Ch. 6 - Prob. 6CRPCh. 6 - Suppose the function f expects two numeric values...Ch. 6 - Suppose f is a function that returns the result of...Ch. 6 - Prob. 9CRPCh. 6 - Summarize the distinction between a machine...Ch. 6 - John Programmer argues that the ability to declare...Ch. 6 - Summarize the distinction between declarative...Ch. 6 - Explain the differences between a literal, a...Ch. 6 - a. What is operator precedence? b. Depending on...Ch. 6 - Prob. 16CRPCh. 6 - What is the difference between the meaning of the...Ch. 6 - Draw a flowchart representing the structure...Ch. 6 - Prob. 19CRPCh. 6 - Prob. 20CRPCh. 6 - Draw a flowchart representing the structure...Ch. 6 - Rewrite the following program segment using a...Ch. 6 - Summarize the following rats-nest routine with a...Ch. 6 - Prob. 24CRPCh. 6 - Prob. 25CRPCh. 6 - Suppose the variable X in a program was declared...Ch. 6 - Prob. 27CRPCh. 6 - Why would a large array probably not be passed to...Ch. 6 - Sometimes an actual parameter is passed to a...Ch. 6 - Prob. 32CRPCh. 6 - What ambiguity exists in the statement X = 3 + 2 ...Ch. 6 - Suppose a small company has five employees and is...Ch. 6 - Prob. 35CRPCh. 6 - Prob. 36CRPCh. 6 - Prob. 37CRPCh. 6 - Prob. 38CRPCh. 6 - Prob. 39CRPCh. 6 - Design a set of syntax diagrams that describes the...Ch. 6 - Prob. 41CRPCh. 6 - Prob. 42CRPCh. 6 - Add syntax diagrams to those in Question 5 of...Ch. 6 - Prob. 44CRPCh. 6 - What code optimization could be performed by a...Ch. 6 - Simplify the following program segment Y = 5 if (Y...Ch. 6 - Simplify the following program segment while (X !=...Ch. 6 - In an object-oriented programming environment, how...Ch. 6 - Describe how inheritance might be used to develop...Ch. 6 - What is the difference between the public and...Ch. 6 - a. Give an example of a situation in which an...Ch. 6 - Describe some objects that might be found in a...Ch. 6 - Prob. 53CRPCh. 6 - Prob. 54CRPCh. 6 - Prob. 55CRPCh. 6 - Prob. 56CRPCh. 6 - Prob. 57CRPCh. 6 - Prob. 58CRPCh. 6 - Prob. 59CRPCh. 6 - In general copyright laws support ownership rights...Ch. 6 - By using a high-level programming language, a...Ch. 6 - Prob. 3SICh. 6 - Prob. 4SICh. 6 - Prob. 5SICh. 6 - Suppose an amateur programmer writes a program for...Ch. 6 - Prob. 7SI
Knowledge Booster
Similar questions
- Consider the following prolog logic program: mother (mary, sue). father (john, sue). mother (mary, bill). father (john, bill). mother (sue, nancy). father (bob, nancy). mother (sue, jeff). father (bob, jeff). mother (jane, ron). Father(bill,ron). Parent(A,B) :- father(A,B). Parent (A,B) :- mother(A,B). Grandparent(C,D) :- parent(C,E), parent(E,D). Add a sibling relationship to the above program and answer the following question: ?- sibling(sue, X).arrow_forwardUrgent.Please solve this question with using Prolog Programming Language.arrow_forwardPLEASE USE GNU PROLOG. PLEASE DO NOT COPY CODE FROM OTHER SOURCES. THANK YOU. Consider to use the minimum number of color to color the following western states of the United States, and make sure that the neighboring states not colored in the same color.Alaska, Arizona, California, Colorado, Hawaii, Idaho, Montana, Nevada, New Mexico, Oregon, Utah, Washington, WyomingA. How many colors you have used?B. Use Prolog facts to represent the neighboring relationship and the color of the states. Note, Alaska and Hawaii have no neighboring states, and two states are neighboring if they share an edge of border, not a point of border. C. Write the adjacent ruleD. Write the miscolor rule to make sure that the neighboring states not colored in the same colorE. Write a rule called q :- condition. When testing, typing q will test your miscolor rulearrow_forward
- Question 3 Full explain this question and text typing work only thanksarrow_forwardWrite a Prolog predicate that sees if the list has duplicate numbers. (Course: Programming languages). note: PLEASE DON'T SOLVE IT WITH CODING LIKE(PYTHON, JAVA..ETC) JUST PROLOG PREDICATE. and please help...asaparrow_forwardFor the following questions, consider this Prolog program: person(mary). person(john). girl(mary). boy(john).arrow_forward
- What does prolog return for the followingquery:no parents(adam, 0) :- !.no_ parents(eve, 0):- !.no parents(, 2).?- no parents (george, X).arrow_forwardFor each of the following statements about regular expressions α, β and languages A, B, state whether they are true or false. Provide a one-sentence justification for each answer.arrow_forwardSuppose a Prolog database exists that gives information about the parts in an automobile engine. Predicates of big, small, and partof are included.a. Write a query to find all small items that are part of other items.b. Write a query to find all big items that have small subitems.c. Formulate a recursive rule to define componentof.arrow_forward
- 7. Translate the following sentences into a Prolog program smart.pro: Messi teaches Prolog language. Prolog is a programming subject. Nabil teaches Algebra. Algebra is a Mathematics subject. Everyone who teaches a programming subject is smart. Consult the above program and query Prolog: "Who are smart"? Print screen and submit the output.arrow_forwardExactly how many different kinds of programming paradigms do you know about? Then, why are there so many different paradigms out there? No, you don't have a choice. Use your own words and put your own spin on it while discussing it.arrow_forwardOkay, let's have a look at a few of the programming paradigms out there. If that's the case, then why do we have so many different models? Why do we even need them if...? Use your own words to describe it.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education