MathGroup Archive 2003

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

Search the Archive

Re2: Is it doable in Mathematica? How?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg39727] Re2: [mg39704] Is it doable in Mathematica? How?
  • From: Helge Andersson <helge at envic.chalmers.se>
  • Date: Mon, 3 Mar 2003 23:50:29 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Dennis,

Here is a slightly neater and clearer version of my earlier posting.

tab1=Flatten[Table[{i,j,k},{i,0,1},{j,0,1},{k,0,1}],2]/.{0->False,1->True};
{P,Q,R}=Transpose[tab1];
och=And[P[[#]],Q[[#]],R[[#]]]&/@Range[Length[tab1]];
eller=Or[P[[#]],Q[[#]],R[[#]]]&/@Range[Length[tab1]];
ellermedfor=Implies[Or[P[[#]],Q[[#]]],R[[#]]]&/@Range[Length[tab1]];
TableForm[Fold[Append,Transpose[tab1],{{},och,eller,ellermedfor}],TableHeadings->{{"P","Q","R"," 
","And[P,Q,R]","Or[P,Q,R]","Implies[Or[A,B],C]"},Range[Length[tab1]]}]

/Helge Andersson
Chalmers
Sweden


At 04:25 2003-03-03 -0500, you 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?
>
>--
>
>Vänligen
>Konrad
>---------------------------------------------------
>phone #1:  (+46/0) 708 - 70 73 92
>phone #2: (+46/0) 704 - 79 96 95
>url: http://konrads.webbsida.com
>e-mail: chamsterkonrad at bigfoot.com
>-----------------------------------
>
>Sleep - thing used by ineffective people
>             as a substitute for coffee
>
>Ambition - a poor excuse for not having
>                  enough sence to be lazy
>---------------------------------------------------



  • Prev by Date: Re: Jacobi Matrix Exponential
  • Next by Date: Re: Is it doable in Mathematica? How?
  • Previous by thread: Re: Is it doable in Mathematica? How?
  • Next by thread: Re: Re2: Is it doable in Mathematica? How?