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

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
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)& <=X&X<= Q :p(X):-e(X)& <=X&X<= Q :p(X):-e(X)& <=X&X<= 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)& arc(Z,W)&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)&path(Z,Y) F reeze Q ,sayw...
View Full Document

Page1 / 5

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

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online