Message Boards Message Boards

6 Replies
2 Total Likes
View groups...
Share this post:

How to enter a long logical expression into Wolfram|Alpha?

Posted 11 years ago
When I enter an logical expression e.g.

( P && Q && R ) || ( Q && R && S )

I get lots of lovely info. However, I've discovered there is a limit to the length of input e.g. 

( P && Q && R && S ) || ( P && Q && R && ~S ) || ( P && Q && ~R && S ) || ( P && Q && ~R && ~S ) || ( P && ~Q && R && S ) || ( P && ~Q && R && ~S ) || ( P && ~Q && ~R && S ) || ( P && ~Q && ~R && ~S )

results in a failure message, "Input Too Long! Upload as data using Data input first."

When I try the data input route, I get another failure message, ""No structured data detected; performing a textual analysis instead."

How do I structure or otherwise mark my input as being a single logical expression?
POSTED BY: Jamie Collins
6 Replies

I don't think Mathematica struggles that much

In[2]:= AbsoluteTiming[
 PowerMod[078435243638422372447672231234716695757593735449641234358462086700559213667152171913, 73328617858256908828323, 

Out[2]= {0.000076, 488852248312393495853898207472820633208110722640160160319617509136528516001303946959159}
POSTED BY: Ilian Gachevski

Raphael, Wolfram|Alpha can't solve that kind of question. Even Mathematica would struggle to do it - your expression would take a ludicrous amount of time to compute. Probably on the order of days.

The exponentiation alone is:^733286178582569088283

60785399379915432324698 digits in length.

That alone would take long enough to compute, but you're expecting a modulus operation on top of that?

It's just not possible. You would need a supercomputer to calculate that result in anything resembling a "quick" time frame.

POSTED BY: Geoff Ellingwood

It has been a year and i do not think they have fixed it. I subscribed to the pro version thinking that inputting data through files would fix the issue but it has not :( I am trying to calculate this. 078435243638422372447672231234716695757593735449641234358462086700559213667152171913^733286178582569088283232046829710496185570977121081786863578840329631292141076523731373 mod1026650243044648666338779501960308972649317942706523177961403694692749456133768845419907

for an assignment and sadly it does not work. any suggetions on what i can do?

Posted 11 years ago
For what it's worth, Simplify (or LogicalExpand) does the trick and returns P.

POSTED BY: Greg Hurst
Posted 11 years ago
Hoping that WolframAlpha will interpret precedence when I eliminate parens and white space I try each of the following

It happily allows me to enter both within the available line length, understands and correctly interprets the first and cannot comprehend the second.

Thus I presume there is more than one internal limit on the length of input and they do not appear to be consistent.
POSTED BY: Bill Simpson
Inputing an expression as data can't be used as a way around the maximimum input length in this case.  Wolfram|Alpha will interpret anything given as data to be a dataset or a piece of text. 

You may want to suggest to the WolframAlpha team that they support boolean expressions as a data format in the future so that you can work with larger boolean expressions than the input bar can handle. 
POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract