I’m working on a algorithms & data structures question and need a sample draft to help me learn.
Background: Almost everyone is aware of, if not exactly fond of, the British royal family. For this portion of the homework, you are to represent a branch of the royal family (see the family tree image, on the next page, for the portion of interest) in Prolog and write several rules that ‘reason’ about the family relationships.
Assignment: Create a Prolog database in a file named royals.pl that allows the user to ask query the royal family tree. In particular, here’s what we want your database to include:
– married(W,M) – States the fact that woman W married man M. Repeat as many times as necessary
for all of the married pairs of royals.
– childOf2(C,W,M) – States that C is the child of woman W and man M.
For this assignment, we’ll use the facts given in the family tree fragment shown below. Identify the people by their first names. If you find a duplicate, give the younger person’s name a digit suffix. E.g., frank and frank2.
– equal(X,X). – That’s it, exactly. Type it as you see it. You’ll probably find it useful as part of another rule later on.
– childOf1(C,W) – Determines if C is a child of woman W.
– childOf1(C,M) – Determines if C is a child of man M.
– sibling(X,Y) – For this assignment, siblings are considered to be people who share the same two parents.
– auntOrUncleByBlood(C,O) – Your mother’s sister is an example of an aunt by blood. As the name suggests, uncles by blood count here, too.
Important Notes:
– We will not accept rules that include predetermined answers. Write the rules so that Prolog has to figure out the answers for you. If you find yourself trying to put constants in your rules instead of variables, you’re not writing the rules correctly.
– When defining the childOf1 rules, you’ll get a “warning: singleton variables” message or two. That’s OK; don’t worry about it.
– When you separate like–named facts and rules, you can get ‘discontiguous predicate’ warnings. Simple fix: Keep all like–named items together.
– To negate a rule in prolog, use the \+ operator. For example, \+equal(X, Y) would be true if X and Y are not equal. The British Royal Family Tree Fragment:
Requirements: unknown | Order any type of Service We Provide We are the best assignment service that can satisfy student’s demands in different scientific fields. We perform tasks of any kind. Our specialists provide diverse custom assignment writing services to students from all over the world every day. You can contact us for assistance with: • Essays of any type (application, scholarship, argumentative, personal, informative, persuasive, compare and contrast, narrative, analytical, cause and effect, critical, process, descriptive, expository essays); • Homework, • Assignments, • Reviews of all types (for a book, an article, or a film), • Reports, • Annotated bibliography, • Projects, • Thesis, • Term papers, • Presentations, • Lab works, • Research papers, • Speeches, • Critical thinking, • Capstone projects; • plan; • Coursework’s; • Dissertations. The list is far from complete! Representatives of our student assignment service are connoisseurs of the peculiarities of presentation in regards to academics. …….
Order any type of Service We Provide
We are the best assignment service that can satisfy student’s demands in different scientific fields. We perform tasks of any kind. Our specialists provide diverse custom assignment writing service to students from all over the world every day. You can contact us for assistance with:
The list is far from complete!
Representatives of our student assignment service are connoisseurs of the peculiarities of presentation in regards to academics. Your college assignment will never turn out an untoward surprise! Whether you need research for high school, an undergraduate program, or a Master’s or Doctoral degree, you will get exactly what you are looking for to sound smart and well-informed.
If you are pressed for time, request to our experts!
We are your academic saver. It is a perfect solution for people who need academic help but have no professionals nearby to provide it. Just redirect your home tasks to us and forget about any educational issues. With us, you will get 100% plagiarism-free content delivered on time by an experienced specialist in a particular field.
When you order professional assignments here, you will get:
Original custom papers. We value your academic reputation. Just as well, we value the years of thorough work on our reputation for reliability and never compromise the originality of delivered papers. We will never endanger both. Every custom assignment is written from zero – the only possible first stage of work on the order is research. We apply the latest plagiary checking tools on the final stage, so plagiarism has no chance to emerge in your college assignment writing.
Control over the order completion. To make the process of collaboration comfortable and efficient, we offer our clients to choose the writer themselves taking into account all the requirements and the budget. For you to save nerves, having entrusted your fateful task to some qualified “stranger”, we enable communication with the assigned writer in the process of order completion.
Affordable assistance. . help with college assignments. We are eager to help you start investing in your career growth today. That is why our service is so affordable. We don’t charge to pay for the latest marketing tricks or advertisements – we choose the best experts in the labor market who write great custom papers in any area, level of complexity, and time frame. Our client’s grateful feedback is a top advertising trick.
On-time delivery. The quality of a paper is only valued when it is delivered within the determined time frame – you will get your custom assignment writing service in time and have a couple of days to revise it and ask for changes in case they are needed. And you will still have time to learn the material.
Protection. We value your trust and take all measures needed to keep your private and banking details safe. We offer only well-tested payment methods. Due to the system of encryption and protected servers, no third party can have access to your data.
Custom support 24/7. We do our best to make the process of collaboration comfortable for the customer. Our “write my assignment” help is always here for you to provide a solution to your problems, give you a prompt answer to any question, and offer clarification as to any issue related to the services. Feel free to contact us anytime!
If you feel that your dissatisfaction with student life is growing every day and you just feel exhausted, don’t hesitate to change the situation for the better today. Order your first assignment from reliable custom assignment services today to evaluate the advantages.
Having seen the difference once, you won’t want to go back to your previous lifestyle. You deserve to find fulfilment in other spheres of your life, have hobbies, spend time with close people but continue making progress. It is possible when you have a professional helper. Don’t put off your life for someday after graduation!
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more