MathGroup Archive 2004

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

Search the Archive

Re: Re: how to explain this weird effect? Integrate

  • To: mathgroup at smc.vnet.net
  • Subject: [mg46435] Re: [mg46411] Re: how to explain this weird effect? Integrate
  • From: withoff at wolfram.com
  • Date: Wed, 18 Feb 2004 00:37:00 -0500 (EST)
  • References: <c0qjgq$ka6$1@smc.vnet.net> <200402171205.HAA02452@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

> I wanted Mathematica to act as if it was a
> human. (A very smart human at that).
>
> The way I look at it, is that when I tell a computer algebra program
> to solve X, then I expect the program to do what it can and apply
> any number of different steps and 'tricks' to solve X.
>
> I do not have to tell it to do step 1 first, then step 2, then if it
> can't do step 2, then try this trick first, and then do step 2, etc...
>
> All what iam saying is that taking the limit in this case is NOT an
> additional step becuase it would have lead to the solution I wanted.
>
> I guess it is a design issue. Some folks here do not seem to agree
> with this, but I think this is how a computer algebra system should
> work. So, may be we should drop this subject and leave it at that.
> We agree to diagree.
>
> regards,
> Steve

The topic raised here illustrates a prominent concern
in the design of almost anything, not just computer algebra
systems.  Even if the topic is restricted to computer
programming, a history of the people who have raised concerns
just like this one, and of efforts to address those concerns,
would form the better part of the entire history of artificial
intelligence, computer software design, and efforts to get a
machine to behave like a human.

As others have already pointed out, the direct mathematical
response here is that the computer did exactly what it was
asked to do, and furthermore that there is nothing
mathematically wrong with what it did and no unique alternative
behavior that would always be either correct or desirable.
So that part of the issue is rather like the question of whether
or not 2+2 is 4, which be interesting in some other setting,
but it won't get anywhere as a design suggestion.

There is nevertheless an interesting design question here.
One way to explore the broader design issues is to look
up "DWIM" on the internet or in a jargon dictionary.
When I did that I found:

    DWIM; Acronym for `Do What I Mean': Adjective meaning able
    to guess, sometimes even correctly, the result intended when
    bogus input was provided; Of a person, someone whose directions
    are incomprehensible and vague, but who nevertheless has the
    expectation that you will solve the problem using the specific
    method he/she has in mind.  See 'hairy'.

This is precisely where the topic becomes interesting as a
design question.  That is, the design question becomes interesting
with the speculation that, as a practical matter, most users in
realistic situations might expect the software to behavior in some
particular way that was not explicitly specified in the input, and
that the computer should therefore choose that alternate behavior
by default.

In this particular case the suggestion might be that if I
substitute a value into an expression and the result turns out
to be indeterminate, the computer should recognize that this
is probably not what I wanted and should automatically try
computing a corresponding limit.

One problem with this suggestion is that, as a practical matter,
probably about 999 times out of 1000 when a result is
indeterminate it is because it really is indeterminate, and
not a removeable singularity or anything else that would change
by computing a limit.  In those 999 cases the not insubstantial
time needed to compute the limit would be wasted, and so for
every user who might like such a change there will be 999 who
probably will not.

There is also a problem, as has already been pointed out, that
the limiting result may not even be the correct or intended
value, and open questions about what to do with something like
(x-Sqrt[x^2])/x /. x->0 where the limit depends on direction,
and other issues that would need to be resolved in order to
implement such a suggestion.

In my own use of computer software many of the most annoying
problems come up when the software designer has tried to guess
what I wanted, and for example has arranged for a limit to be
computed when that is quite emphatically not what I want, and I
spend hours looking for a way to get the computer to do what
I asked it to do.

On the other hand, there are other design questions, many of them
in Mathematica, where DWIM design is probably a good idea, and
the computer should probably do something automatically even
though the input, if taken literally, was ambiguous or may even
have specified something else entirely.

A lot of very smart people have thought about these issues for
a very long time, and in this particular example have so far
uniformly come to the conclusion that although it would sometimes
be desirable for a computer algebra system to automatically
compute a limit when a substition leads to an indeterminate
result, there is no viable design in which the computer could
guess with any useful degree of reliability when to do that
and when not to do that.

Of course the fact that a lot of very smart people think that
your suggestion is unimplementable does not mean that a suitable
design doesn't exist.  If you think you can come up with a
viable suggestion you could certainly give it a try.  The
artificial intelligence community has been doing that sort of
thing for decades, occasionally with a fair degree of success.

Dave, WRI


  • Prev by Date: Re: Re: how to explain this weird effect? Integrate
  • Next by Date: conerting integer to string
  • Previous by thread: Re: how to explain this weird effect? Integrate
  • Next by thread: RE: Re: how to explain this weird effect? Integrate