Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #12030 > unrolled thread

Re: SatisfiabilityInstances[] how to put variables

Started byBob Hanlon <hanlonr357@gmail.com>
First post2012-10-10 05:34 +0000
Last post2012-10-11 06:23 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: SatisfiabilityInstances[] how to put variables Bob Hanlon <hanlonr357@gmail.com> - 2012-10-10 05:34 +0000
    Re: SatisfiabilityInstances[] how to put variables info@dvholten.de - 2012-10-11 06:23 +0000

#12030 — Re: SatisfiabilityInstances[] how to put variables

FromBob Hanlon <hanlonr357@gmail.com>
Date2012-10-10 05:34 +0000
SubjectRe: SatisfiabilityInstances[] how to put variables
Message-ID<k531d4$947$1@smc.vnet.net>
eqns = {x^2 + Pi*y^2 + z^2 == -1, z^2 == 2 x*E - 5 y};

var = Cases[eqns,
   x_Symbol?(! NumericQ[#] &), Infinity] //
  Union

{x, y, z}


Bob Hanlon


On Tue, Oct 9, 2012 at 12:40 AM,  <info@dvholten.de> wrote:
> folks,
> i am playing with the satisfiability-support in Mathematica.
> SatisfiabilityInstances[] gives me the settings of the variables, which return true for the whole formula. However, the input is a little uncomfortable:
> SatisfiabilityInstances[ formulaCNF, { v1, v2, v3, v4, v5 } ]
> needs to be called for a formula with the 5 variabled v1..v5. For a formula with 400 variables this is not practical.
> is there short way to extract a list of variables from the formula?
> is there a short way to build a list of variables names?
> (assuming the variables are named as a sequence like x1, x2...x77 or var1...var999).
> or is there a way to implictily tell SatisfiabilityInstances[] or one of his brothers what the variables are in the formula so that they dont have to be given one by one?
>
> thanks
> DvH
>

[toc] | [next] | [standalone]


#12039

Frominfo@dvholten.de
Date2012-10-11 06:23 +0000
Message-ID<k55olb$eav$1@smc.vnet.net>
In reply to#12030
thanks - thats what i need - now i am satisfied...

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web