Re: Is it doable in Mathematica? How?
- To: mathgroup at smc.vnet.net
- Subject: [mg39726] Re: [mg39704] Is it doable in Mathematica? How?
- From: Dr Bob <drbob at bigfoot.com>
- Date: Mon, 3 Mar 2003 23:50:24 -0500 (EST)
- References: <200303030925.EAA20707@smc.vnet.net>
- Reply-to: drbob at bigfoot.com
- Sender: owner-wri-mathgroup at wolfram.com
Try:
e1[{a_, b_, c_}] := a && b && c
e2[{a_, b_, c_}] := Implies[a || b, c]
logicals = {False, True};
Flatten[Outer[{#1, #2, #3} &, logicals, logicals, logicals], 2];
TableForm[{Sequence @@ #, e1@#, e2@#} & /@ %, TableHeadings -> {None, {a,
b, c, e1@{a, b, c}, "a||b\[Implies]c"}}]
or (a bit simpler):
row[{a_, b_, c_}] := {a, b, c, a && b && c, Implies[a || b, c]}
logicals = {False, True};
TableForm[
Flatten[
Outer[row, logicals, logicals, logicals], 2],
TableHeadings -> {None, {a, b, c, a && b && c, "(a||b)\[Implies]c"}}]
Bobby
On Mon, 3 Mar 2003 04:25:00 -0500 (EST), Konrad Den Ende
<chamsterkonrad at bigfoot.com> 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
> ---------------------------------------------------
>
>
>
>
>
>
>
>
--
majort at cox-internet.com
Bobby R. Treat
- References:
- Is it doable in Mathematica? How?
- From: "Konrad Den Ende" <chamsterkonrad@bigfoot.com>
- Is it doable in Mathematica? How?