Message Boards Message Boards

0
|
5241 Views
|
8 Replies
|
9 Total Likes
View groups...
Share
Share this post:

Evaluate [omega(1) .. omega(10000)] in Wolfram|Alpha within few seconds?

I'm new here, paid for Pro and tried:

[omega(1) .. omega(10000)] 

It's still 'COMPUTING ...' for more than one whole hour. Yes, my internet connection is fine and I tried this several times, ... it's really just the online wolframalpha.com service.

However,

[omega(1000) .. omega(2000)] 

all the way up to

[omega(9000) .. omega(10000)]

all take just 2 or 3 seconds each.

So, what is going on here?

8 Replies
Posted 8 years ago

I will try, as politely as I possibly can, to explain what I think the several issues are.

1: Due to design decisions in the forum posting software there are not large blinking red buttons labeled "Clearly mark this as a WolframAlpha question", "Clearly mark this as a Mathematica question", etc. to indicate which product a poster was using and asking a question about. Changing that might be much simpler than rewriting the foundation philosophy of the notation which each product will accept.

2: WolframAlpha and Mathematica can sometimes use somewhat similar notation, but also different and incompatible notations.

3: New and novice users can sometimes not really know what notation to use to get an answer, particularly if they are asking questions about why something doesn't work.

4: More experienced users, perhaps tired of seeing a long history of questions showing simple errors in notation usage, sometimes seem to immediately assume any notation that doesn't exactly match what the product they are using expects is obviously written by someone who doesn't understand they should be using the syntax for what I assume they are using. This has happened again and again in the past here.

5: Mathematica and the notation it accepts hasn't got a quarter to take to the clue store and buy a clue to thus understand the meaning of [omega(1000) .. omega(10000)]

6: WolframAlpha and the notation it accepts understands perfectly that [omega(1000) .. omega(10000)] is meant to construct a list of the number of unique prime factors of 1000, 1001,1002, up to 10000. As a side note, I really like that you have somehow stumbled onto this method of telling WolframAlpha that you want the result of a sequence of calculations. I have tried to find a way to do similar things in the past and never succeeded.

7: If I try each of your smaller queries you provide then I see, exactly as you described, it quickly returns a list of 1001 items (on a modest speed machine using the latest version of the Chrome browser).

8: If I increase the length of the list by 1000 at a time then I see that it does take longer and longer to complete. I did see one example of "WolframAlpha doesn't understand your input.", while trying that exact query before and after did provide the correct output. But when I push it up to [omega(1000) .. omega(10000)] I see that it takes perhaps half a minute to do the calculations and a bit longer to format and display the result.

9: Thus I assume, and we unfortunately haven't any way to prove, that something crashed during the process of calculating that particular query. And we almost certainly have no way of figuring out what that was.

10: If you repeat exactly this query does it always take more than a few minutes and not finish? Or does it sometimes finish in less than a minute as mine seem to?

POSTED BY: Bill Simpson

Hi,

I am quite familiar with Factor even in the correct syntax, i.e. starting with a capital F and using square brackets. Factor expects a polynomial as input, I hope that you are familiar with that. So Factor is quite boring when you apply it to integers, which makes me believe that you are not familiar with the function "Factor" in the WolframLanguage. It is relatively straight forward to apply it to standard polynomials in WolframAlpha using for example:

Table[Factor[1 + 2 x - k x^2],{k,1,10}]

as input. This can also be done with arrays:

Table[Factor[1 + j x - k x^2],{k,1,10},{j,1,3}]

In this case the result is an array, i.e. a list of lists.

The thing is that it is quite important what "omega" is supposed to be, because of the way that a CAS simplifies/processes the input. A very simple input is this:

Table[Omega[j,k],{k,1,10},{j,1,3}]

You see from my second reply that WolframAlpha interprets your input "omega" as PrimeNu, which does not appear to be what you want; if you are not familiar with PrimeNu you can look it up here. In case you are more familiar with Sin here is how that works:

Table[N[Sin[i+j]],{i,1,3},{j,1,3}]

If WolframAlpha misinterprets your input, you might want to use the WolframCloud which uses proper Wolfram Language Syntax and often helps to formulate your expression in a more concise way. In that case I would suggest learning the basics about the Wolfram Language first. There are fantastic resources for that like this one.

Cheers,

Marco

POSTED BY: Marco Thiel

omega is not significant here. All I want is repeating a calculation over a range of integers and get the result back in an array.

Can you show me how to do that with for example factor()? Or, if you don't know what that is either, for sin()?

You are quite right. I do not understand the issue. What is omega supposed to mean. There is no definition of it. Many people have named different functions omega. Also, what are the ".." supposed to mean? There is a built in meaning for that in MMA/WL, but it is most likely not what you mean. What do you want to express with the square brackets?

What do you want to calculate? What is the meaning of what you want to code?

Cheers,

Marco

POSTED BY: Marco Thiel

Thanks for your answer, but you don't seem to understand the issue yet it seems.

A. I first tried:

 [omega(1) .. omega(1000)]

which was fine.

B. Then I tried:

[omega(1) .. omega(10000)]

which did not return results, not even after 1 hour.

C. The I tried

[omega(1000) .. omega(2000)]

and

[omega(2000) .. omega(3000)]

etcetera, all the way up to:

 [omega(9000) .. omega(10000)]

these too were all fine and returned results within a few seconds.

So my issue is: Why the heck can't:

[omega(1) .. omega(10000)]

which is just 10 of the above executed in one go, return results in less than say 20 seconds???

I never said I tried

[omega(9000) .. omega(10000)] .. [omega(9000) .. omega(10000)]

The .. in the middle was not between ` `, but I admit that was hard to see. I've edited my original post and replaced it with the textual form.

Any thoughts?

That's what I was trying to explain. Square brackets are used in the Wolfram Language to indicate input to a function. Round brackets are not. The code that you submitted does not conform to the Syntax of the Wolfram Language - also you should post it in a code box in this forum.

Anyway, you are right I did not try your code, because it is obviously not Wolfram Language. Now just to make the obvious absolutely certain, I did type it in and it, of course, gives an error message that the code is not complete. Even a cursory look at the documentation confirms that.

Now, you said that you used WolframAlpha which interprets your input and also accepts syntactically incorrect input. The thing is that it sometimes misinterprets what your input. What I wanted to say is that your input will be difficult to interpret for it; and that also to me it is not quite clear what you want to achieve.

If output is misinterpreted it can take a long time to evaluate. I typed the full input into WolframAlpha and it does evaluate within fractions of a second.

enter image description here

I cannot imagine that this is the interpretation you mean. The shorter input also evaluates in no time at all.

enter image description here

Cheers, M.

POSTED BY: Marco Thiel

Nope, it understands it perfectly well. Did you even try [omega(1000) .. omega(2000)] for example yourself?

Then, if it would not understand, don't you think it should say that immediately instead of 'spinning' for more than an hour (that's when I gave up).

This is just playing with the system, preparing do other things on ranges of integers.

That is probably because the syntax you use is meaningless for the Wolfram Language. In fact, I am not quite sure what you want to achieve based on your input. I guess that Wolfram Alpha cannot parse this and tries something that does not work.

Best wishes,

M.

POSTED BY: Marco Thiel
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract