Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

prolog like search

  • To: mathgroup at smc.vnet.net
  • Subject: [mg76621] prolog like search
  • From: siewsk at bp.com
  • Date: Thu, 24 May 2007 06:27:36 -0400 (EDT)

I would like to do prolog like searches in Mathematica

entities={ william , henry , diana , charles }
Sonof(william,diana);
Sonof(william,charles);
Sonof(henry,diana);
Sonof(henry,charles);

Married(A,B) := Sonof(S,A) && Sonof(S,B) && A != B;

PrologSearch(Married,entities)

returns { Married(diana,charles), Married(charles,diana) }

Any idea how this could be implemented in Mathematica?



  • Prev by Date: I want some help about ContourPlot function
  • Next by Date: Re: Weird result in Mathematica 6
  • Previous by thread: Re: I want some help about ContourPlot function
  • Next by thread: Re: prolog like search