Vajad kellegagi rääkida?
Küsi julgelt abi LasteAbi
Logi sisse

Experimenting with predicate provers. (0)

1 Hindamata
Punktid
 
 
 
 
 
 
 
 
Home assignment 3 : Margus Martsepp 121843IAPM 
Experimenting with 
predicate provers. 
Advanced Course  of Applied Logics ( ITV0081 ) 
 
 
Part  A : Warmers 
Task
What is the most general unifier of the  following  atoms:
 
p(X,f(Y),Z) 
p(T,T,g(cat)) 
p(f(dog),S,g(W)) 
 
solution
Θ 
 
 
Task 2 
List all the  binary  resolvants of the following two  clauses : 
p(X,f(Y),Z) | p(T,T,g(cat)) | r(X,T) | ~s(Z,T) 
~p(f(dog),S,g(W)) | s(big,rat) | ~s(small, hamster ) 
 
solution sourse: 
1st option  (1.4-2.2) 
Θ 
p(X,f(Y),big) | p(rat,rat,g(cat)) | r(X,rat) 
~p(f(dog),S,g(W)) | ~s(small,hamster) 
 
2nd option (1.1-2.1) 
Θ 
p(T,T,g(cat)) | r(f(dog),T) | ~s(g(W),T) 
s(big,rat) | ~s(small,hamster) 
 
 
3rd option (1.2-2.1) 
Θ 
p(X,f(Y),Z) | r(X,f(dog)) | ~s(Z,f(dog)) 
s(big,rat) | ~s(small,hamster) 
 
 
Task 3 
List all the resolvants of the following two clauses: 
p(X,f(Y),Z) | p(T,T,g(cat)) | r(X,T) | ~s(Z,T) 
~p(f(dog),S,g(W) | s(big,rat) | ~s(small,hamster) 
 
 
solution sourse: 
1st option - See binary resolution 1st option 
2nd option - See binary resolution 2nd option 
3rd option - See binary resolution 3rd option 
 
4th option ((1.1+1.2)-2.1) 
Θ 
p(f(Y),f(Y),g(cat)) | r(f(Y),f(Y)) | ~s(g(cat),f(Y)) 
~p(f(dog),S,g(W)) | s(big,rat) | ~s(small,hamster) 
 
 
Θ 
r(f(dog),f(dog)) | ~s(g(cat),f(dog)) 
s(big,rat) | ~s(small,hamster) 
 
 
5th option (1.4+2.3) 
Θ 
p(X,f(Y),small) | p(hamster,hamster,g(cat)) | r(X,hamster)  
~p(f(dog),S,g(W)) | s(big,rat) | ~s(small,hamster) 
 
 
Task 4 
List all the factors of the following  clause : 
p(X,f(Y),Z) | ~s(Z,T) | p(T,T,g(cat)) | p(f(dog),S,g(W)) | ~s(small,hamster) 
 
 
1st option 
Θ 
p(X,f(Y),small) | p(hamster,hamster,g(cat)) | p(f(dog),S,g(W)) | 
~s(small,hamster) 
 
 
2nd option 
Θ 
~s(g(cat),f(Y)) | p(f(Y),f(Y),g(cat)) | p(f(dog),S,g(W)) | ~s(small,hamster) 
 
 
3rd option 
Θ 
~s(g(W),T) | p(T,T,g(cat)) | p(f(dog),f(Y),g(W)) | ~s(small,hamster) 
 
 
4th option 
Θ 
p(X,f(Y),Z) | ~s(Z,f(dog)) | p(f(dog),f(dog),g(cat)) | ~s(small,hamster) 
 
 
5th option 
Θ 
~s(g(cat),f(dog)) | p(f(dog),f(dog),g(cat)) | ~s(small,hamster) 
 
 
6th option 
Θ 
~s(g(cat),f(dog)) | p(f(dog),f(dog),g(cat)) | ~s(small,hamster) 
 
 
 
Task 5 
One resolvant of the clauses: 
p(X,f(Y),Z) | p(T,T,g(cat)) | r(X,T) | ~s(Z,T) 
~p(f(dog),S,g(W) | s(big,rat) | ~s(small,hamster) 
is 
r(f(dog),f(dog)) | ~s(g(cat),f(dog)) | s(big,rat) | ~s(small,hamster) 
Show how that may be  formed  by factoring and binary resolution. 
 
 
Θ 
p(f(Y),f(Y),g(cat)) | r(f(Y),f(Y)) | ~s(g(cat),f(Y)) 
~p(f(dog),S,g(W)) | s(big,rat) | ~s(small,hamster) 
 
 
Θ 
r(f(dog),f(dog)) | ~s(g(cat),f(dog)) 
s(big,rat) | ~s(small,hamster) 
 
 
Task 6 
Use resolution to derive the empty clause from the set 

 
 
solution: 
p(f(X)) | p(X)  
~p(X) | p(f(X)) 
 
 
p(f(X)) | p(f(X)) // resolution 
p(f(X))  
 
// factoring 
 
 
~p(X) | ~p(f(X)) 
p(f(X)) 
empty clause  
// resolution applied 2 times  
Task 7 
Draw the  failure  tree for the following set of clauses: 

 
 
solution: 
<, 
Top, VertexLabeling -> True] 
 
 
 
Task 8 
Show the execution of the ANL  loop  to derive the empty clause from: 

Use any  selection   strategy  you want, and number the chosen clause at each iteration. 
 
 
1st ply 
~r(Y) | ~p(Y) + p(b) 
= ~r(Y) 
~r(Y) | ~p(Y) + r(a) 
= ~p(Y)  
~r(Y) | ~p(Y) + p(S) | ~p(b) | ~r(S) 
= ~r(Y) | ~p(b) | ~r(S) = ~r(Y) | ~p(b) = ~r(S) | ~p(b) 
~r(Y) | ~p(Y) + r(c)  
= ~p(Y) 
p(S) | ~p(b) | ~r(S) + p(b) 
= p(S) | ~r(S)  
p(S) | ~p(b) | ~r(S) + r(a) 
= p(S) | ~p(b)  
p(S) | ~p(b) | ~r(S) + r(c) 
= p(S) | ~p(b) 
 
 
2nd ply 
~p(Y) + p(S) | ~p(b) | ~r(S) 
 
= ~p(b) | ~r(S) 
~r(Y) | ~p(b) + p(b) 
 
= ~r(Y) 
~r(Y) | ~p(b) + r(a) 
 
= ~p(b)  
~r(Y) | ~p(b) + p(S) | ~p(b) | ~r(S) 
 
= ~r(Y) | ~p(b) | ~r(S) 
~r(Y) | ~p(b) + r(c) 
 
= ~p(b)  
p(S) | ~r(S) + ~r(Y) | ~p(Y) 
 
= ~r(S) | ~r(Y) = ~r(S) = ~r(Y) 
p(S) | ~r(S) + r(a) 
= p(S) 
p(S) | ~r(S) + p(S) | ~p(b) | ~r(S) 
 
= ~r(S) 
p(S) | ~p(b) + ~r(Y) | ~p(Y) 
 
= ~p(b) | ~r(Y)  
 
 
Task 9 
Inspect if terms have unifiers and  find  the most general unifiers: 
1.  p(f(y), w, g(z)) and p(u, u, v); 
2.  p(f(y), w, g(z)) and p(v, u, v); 
3.  p(a, x, f(g(y))) and p(z, h(z, w), f(w)) 

 
 
1st option  
Θ 
p(f(y), f(y), g(z)) 
p(f(y), f(y), g(z)) 
 
 
2nd option 
Θ 
p(f(y), u, g(z))  
p(f(y), u, f(y)) 
does not have unifier 
 
 
3nd option 
Θ 
p(z, h(z, g(y)), f(g(y)))  
p(z, h(z, g(y)), f(g(y))) 
 
Experimenting with predicate provers #1 Experimenting with predicate provers #2 Experimenting with predicate provers #3 Experimenting with predicate provers #4 Experimenting with predicate provers #5 Experimenting with predicate provers #6
Punktid 100 punkti Autor soovib selle materjali allalaadimise eest saada 100 punkti.
Leheküljed ~ 6 lehte Lehekülgede arv dokumendis
Aeg2013-05-15 Kuupäev, millal dokument üles laeti
Allalaadimisi 5 laadimist Kokku alla laetud
Kommentaarid 0 arvamust Teiste kasutajate poolt lisatud kommentaarid
Autor margusmartsepp Õppematerjali autor
Kolmanda praktikumi A osa

Sarnased õppematerjalid

Hüdro- ja aeromehaanika
12
docx

Hüdro- ja aeromehaanika

2 cosh + A cos h h U h y x - U t v= = U y + ln cosh + A cos = x x 2 h h x -U t A U sin h = y x -U t 2 cosh + A cos h h 2. What advantages gives equations for vorticity transport and streamfuction in comparison with standard equations for velocity field? In what cases these advantages are often used? Vorticity transport depends on the three Partial differential equations (PDEs) for u, v and p in the "primitive variable" form. Stream function depends on only two Partial differential equations (PDEs) for the scalars and . We win on variables and this is the main advantage. 3. How will change vorticity transport equation if Reynold number will increase?

Füüsika
Upstream B2 teacher
309
pdf

Upstream B2 teacher

a. Ask Ssto look at the pictures,Ask them what tooks - Thehousein pictureD is a terraced house.lt is locotedirt u n u s u a l R e a do u t t h e l i s t A s k S s t o m a t c h t h e Headington, England.lt hasgotbrickwallsanda fibreglass words/phrases with the housesin the pictures shark in the roof. lt is spacious,but probablyquite AnswerKey impracticallt'salsoa bit eccentrrc. fivestoreysanda houseon top:C e . 5 s w o r k i n p a i r sa n d d o t h e e x e r c i s eC h e c kS s ,

Inglise keel
Upstream Intermediate B2 - Teacher book
618
pdf

Upstream Intermediate B2 - Teacher book

a. Ask Ssto look at the pictures,Ask them what tooks - Thehousein pictureD is a terraced house.lt is locotedirt u n u s u a l R e a do u t t h e l i s t A s k S s t o m a t c h t h e Headington, England.lt hasgotbrickwallsanda fibreglass words/phrases with the housesin the pictures shark in the roof. lt is spacious,but probablyquite AnswerKey impracticallt'salsoa bit eccentrrc. fivestoreysanda houseon top:C e . 5 s w o r k i n p a i r sa n d d o t h e e x e r c i s eC h e c kS s ,

inglise teaduskeel
Upstream intermediate b2 teacher s book
309
pdf

Upstream intermediate b2 teacher's book

a. Ask Ssto look at the pictures,Ask them what tooks - Thehousein pictureD is a terraced house.lt is locotedirt u n u s u a l R e a do u t t h e l i s t A s k S s t o m a t c h t h e Headington, England.lt hasgotbrickwallsanda fibreglass words/phrases with the housesin the pictures shark in the roof. lt is spacious,but probablyquite AnswerKey impracticallt'salsoa bit eccentrrc. fivestoreysanda houseon top:C e . 5 s w o r k i n p a i r sa n d d o t h e e x e r c i s eC h e c kS s ,

Inglise keel
Inglise keele õpik
309
pdf

Inglise keele õpik

a. Ask Ssto look at the pictures,Ask them what tooks - Thehousein pictureD is a terraced house.lt is locotedirt u n u s u a l R e a do u t t h e l i s t A s k S s t o m a t c h t h e Headington, England.lt hasgotbrickwallsanda fibreglass words/phrases with the housesin the pictures shark in the roof. lt is spacious,but probablyquite AnswerKey impracticallt'salsoa bit eccentrrc. fivestoreysanda houseon top:C e . 5 s w o r k i n p a i r sa n d d o t h e e x e r c i s eC h e c kS s ,

Inglise keel
Christopher Vogler The Writers Journey
904
pdf

Christopher Vogler The Writers Journey

the six feature films as an epic on the theme of father-son relationships • New illustrations and diagrams that give additional depth to the mythic principles • A final chapter, "Trust the Path," an inspiring call to adventure for those who want to discover themselves through writing "This book is like having the smartest person in the story meeting come home with you and whisper what to do in your ear as you write a screenplay. Insightfor insight, step for step, Chris Vogler takes us through the process of connecting theme to story and making a script come alive. " - Lynda Obst, Producer, Sleepless in Seattle, How to Lose a Guy in 10 Days; Author, Hello, He Lied "This is a book about the stories we write, and perhaps more importantly, the stories we live. It

Ingliskeelne kirjandus
Russia Throughout the History
10
docx

Russia Throughout the History

are from as early as the 9th century. Russia has suffered through rough times in war, mad leaders and tough life amongst the locals. Over times the country has had several different names and political systems. They have been an empire ruled by a czar, a communist nation, and a democratic federation. Nowadays the country's official name is the Russian Federation ("Basic facts about,"). The head of the executive branch in Russia is the president who works with the prime minister. The legislative branch is the Bicameral Federal Assembly which consists of the Federation Council and State Duma. The Judicial branch consists of the Constitutional Court, Supreme Court, and the Superior Court of Arbitration ( M c C l e n a g h a n , 2 0 0 3 ) . R u s s i a has over 142 million people. Their major language is Russian and the major religions are Christianity, Islam, Buddhism, and Judaism. The capital of Russia is Moscow ("Basic facts about,").

Inglise keel
English Grammar Book 1
159
pdf

English Grammar Book 1

· A wealth of examples are provided on every topic · Concise explanations are bolstered by extra grammar tips and useful language notes Book 1 Anne Seaton · Y. H. Mew Three Watson Irvine, CA 92618-2767 Web site: www.sdlback.com First published in the United States by Saddleback Educational Publishing, 3 Watson, Irvine, CA 92618 by arrangement with Learners Publishing Pte Ltd, Singapore Copyright ©2007 by Saddleback Educational Publishing. All rights reserved. No part of this book may be reproduced in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage and retrieval system, without the written permission of the publisher. ISBN 1-59905-201-6 Printed in the United States of America 13 12 11 10 09 08 07 9 8 7 6 5 4 3 2 1 Introduction

Inglise keel




Meedia

Kommentaarid (0)

Kommentaarid sellele materjalile puuduvad. Ole esimene ja kommenteeri



Sellel veebilehel kasutatakse küpsiseid. Kasutamist jätkates nõustute küpsiste ja veebilehe üldtingimustega Nõustun