程式語言考古題 - 考試
By David
at 2015-06-27T11:24
at 2015-06-27T11:24
Table of Contents
考慮下述Prolog程式:
ancestor(x,x).
ancestor(x,y) :- ancestor(z,y), parent(x,z).
parent(Allen, John).
用一個subgoal的搜尋樹(search tree),描述此Prolog程式在執行查詢:
ancestor(Allen,X)時的執行步驟。
可以請問大家 為什麼右邊是stop嗎 ?
上完課還是有點聽不懂
ancestor(Allen,X)
/ \
/ \
1 / \ 2
/ \
/ \
ancestor(Allen,Allen) Stop
{ X = Allen }
success
--
Tags:
考試
All Comments
By Tom
at 2015-06-27T17:32
at 2015-06-27T17:32
By Ophelia
at 2015-06-30T01:47
at 2015-06-30T01:47
By Ursula
at 2015-06-30T15:17
at 2015-06-30T15:17
Related Posts
行政法選擇一問
By Regina
at 2015-06-27T09:39
at 2015-06-27T09:39
上榜生達特全科
By Tom
at 2015-06-27T00:17
at 2015-06-27T00:17
唐智立國文
By Brianna
at 2015-06-27T00:04
at 2015-06-27T00:04
想問超級函授105年 DVD vs 雲端
By Adele
at 2015-06-26T22:29
at 2015-06-26T22:29
考場問題
By Ethan
at 2015-06-26T21:45
at 2015-06-26T21:45