ullman-CQgen

# ullman-CQgen - CS N o tesforLectu re G enera lizat iontoU n...

This preview shows pages 1–3. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS N o tesforLectu re// G enera lizat iontoU n ion so fCQ 's P [ P [[ P k Q [ Q [[ Q n i for a ll P i thereissom eone Q j suchthat P i Q j . P roo f(If) O bv iou s . P roo f(O n lyIf) A ssum ethecon ta inm en tho ld s . L et D bethecanon ica l(frozen )databasefrom CQ P i . S incethecon ta inm en tho ld s ,and P i ( D ) su re ly inc ludesthefrozenheado f P i ,there m u stbesom e Q j suchtha t Q j ( D )inc ludes thefrozenheado f P i . Thu s , P i Q j . U n ionTheorem Ju stM issesB e ingF a lse C on s idergenera lizedCQ 'sa llow ingar ithm et ic- com par isonsubgoa ls . P :p(X):-e(X)&amp;amp; &amp;lt;=X&amp;amp;X&amp;lt;= Q :p(X):-e(X)&amp;amp; &amp;lt;=X&amp;amp;X&amp;lt;= Q :p(X):-e(X)&amp;amp; &amp;lt;=X&amp;amp;X&amp;lt;= PQ [ Q ,bu t PQ and PQ are bo th fa lse . CQC on ta ined inR ecu rs iveD ata log T estre liesonm ethodo fcanon ica lDB 's ;con ta in- m en tm app ingapp roachdoesn 'tw ork( it 'sm ean- ing less) . M akeDB D from frozenbodyo fCQ . A pp lyp rogram to D .Iffrozenheado fCQ appearsinresu lt ,thenyes(con ta ined ) ,e lse no . Exam p le : Q :path(X,Y):-arc(X,Z)&amp;amp; arc(Z,W)&amp;amp;arc(W,Y) Q istheva lueo f pa th inthefo llow ingrecu rs ive D a ta logp rogram : r :path(X,Y):-arc(X,Y) r :path(X,Y):-path(X,Z)&amp;amp;path(Z,Y) F reeze Q ,sayw...
View Full Document

{[ snackBarMessage ]}

### Page1 / 5

ullman-CQgen - CS N o tesforLectu re G enera lizat iontoU n...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online