Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1995
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1995

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

Search the Archive

Re: Logic Problems

  • To: mathgroup at smc.vnet.net
  • Subject: [mg2454] Re: Logic Problems
  • From: bshoels at rs5.tcs.tulane.edu (Brett Shoelson)
  • Date: Wed, 8 Nov 1995 23:46:09 -0500
  • Organization: Tulane University

DR JOHN C ERB (TTCJ34A at prodigy.com) wrote:
: Can Mathematica be used to solve logic problems?  As a
: simplistic example: Mary is older than Tom; Tom is older
: than Sue; is Mary older than Sue?  I would like to be able
: to do this type of problem without specifying values (i.e., 
: ageMary=35).
: Thank you.
: John C. Erb 

Try this:

In:

mary>tom;
tom>sue;
Sort[{mary,tom,sue},(#2<#1)&]

Out:

{mary, tom, sue}

Of course, this implies some personal bias (namely, "older than" =
"greater than"). Hope this helps.
Brett
bshoels at rs6000.tcs.tulane.edu



  • Prev by Date: Numbered Countour Lines
  • Next by Date: simplification
  • Previous by thread: Logic Problems
  • Next by thread: Re: Logic Problems