Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2003

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

Search the Archive

Re: Is it doable in Mathematica? How?

  • To: mathgroup at
  • Subject: [mg39751] Re: Is it doable in Mathematica? How?
  • From: Paul Abbott <paul at>
  • Date: Thu, 6 Mar 2003 02:34:57 -0500 (EST)
  • Organization: The University of Western Australia
  • References: <b3v7ef$k96$>
  • Sender: owner-wri-mathgroup at

In article <b3v7ef$k96$1 at>,
 "Konrad Den Ende" <chamsterkonrad at> wrote:

> I'd like to create a truth table for, say, A, B and C, as
> well as two different expression, say, A&&B&&C and
> (A||B) -> C. How do i go about that?
> I have tried Table, but since True/False are not allowed
> there i got stuck. The help in Mathematica was of little
> help in this case. Any hints or suggestions?

You can use Distribute (or Outer) to produce all possible A, B, C. Then 
you can use @@@ (Apply at level 1) to apply the Boolean operators:

  Join[Transpose[tab],{And @@@ tab},{Implies[#1 || #2, #3] & @@@ tab}]]]

Then use TableForm to display with headings:

 TableForm[%, TableHeadings -> 
   {None, {A, B, C, A && B && C, Implies[A || B, C]}}]


Paul Abbott                                   Phone: +61 8 9380 2734
School of Physics, M013                         Fax: +61 8 9380 1014
The University of Western Australia      (CRICOS Provider No 00126G)         
35 Stirling Highway
Crawley WA 6009                      mailto:paul at 

  • Prev by Date: Mathlink problem with in Linux
  • Next by Date: How do i open a notebook from mathlink (python)
  • Previous by thread: Re: Re2: Is it doable in Mathematica? How?
  • Next by thread: Re: Is it doable in Mathematica? How?