Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: sirJS
  • Order by date
  1. sirJS

    [HELP] Need Idea.

    I need an idea about what project that we can solved using prolog. Project in this context is a bigger one, not just a simple prolog code. May be someone have an idea. New idea is not a must, coz i prefer to project that has been done by others. And if its possible,please tell me where i could...
  2. sirJS

    [NEED HELP] Recursion case

    Thanks mr. Joel. It was solved.
  3. sirJS

    [NEED HELP] Recursion case

    Yaa.. coz rule travel(A,B) :- (byCar(A,C);byTrain(A,C);byPlane(A,C)),travel(C,B). is needed to solve a question before this. So, this rule should be in my code. this is the question before : Write a predicate travel/2 which determines whether it is possible to travel from one place to another...
  4. sirJS

    [NEED HELP] Recursion case

    i'm sorry before. that is not the only answer for the query. but it is infinite as below : X = go(d, c) ; X = go(d, c) ; X = go(d, c) ; X = go(d, c) ; X = go(d, e, go(e, c)) ; X = go(d, e, go(e, c)) ; X = go(d, e, go(e, g, go(g, c))) ; X = go(d, e, go(e, g, go(g, i, go(i, c)))) ; X = go(d, e...
  5. sirJS

    [NEED HELP] Recursion case

    Thanks for the answer. it's very helpfull. By the way, there is some typos for travel/2. Here is the correct one : travel(A,B):-byCar(A,B);byTrain(A,B);byPlane(A,B). travel(A,B):-(byCar(A,C);byTrain(A,C);byPlane(A,C)),travel(C,B). The second problem it was solved, but for the first, when i try...
  6. sirJS

    [NEED HELP] Recursion case

    I'm just starting to learn prolog. And i'm getting stuck in this problem. May be anyone can help me out of this. Given some fact below : byCar(auckland,hamilton). byCar(hamilton,raglan). byCar(valmont,saarbruecken). byCar(valmont,metz). byTrain(metz,frankfurt)...
  7. sirJS

    [NEED HELP] Recursion case

    I'm just starting to learn prolog. And i'm getting stuck in this problem. May be anyone can help me out of this. Given some fact below : [highlight #A40000]byCar(auckland,hamilton). byCar(hamilton,raglan). byCar(valmont,saarbruecken). byCar(valmont,metz). byTrain(metz,frankfurt)...

Part and Inventory Search

Back
Top