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