Re: For the Mathematicians.

2022-01-24 Thread Roger Guay via use-livecode
Thanks again for all the information. You've had a very impressive as well as a 
varied career!  I shall be poking around your dissertation as it sounds quite 
interesting.

Roger

> On Jan 23, 2022, at 7:25 PM, doc hawk via use-livecode 
>  wrote:
> 
> 
> Roger rumbled,
> 
>> Thank you very much for your reply.
> 
> You’re quite welcome.
> 
> Accumulated knowledge is wasted if not shared!
> 
> I used to find it online quite easily.  But not any more.
> 
>> Again I thank you for taking the time to respond. Is your dissertation 
>> readable to a LiveCoder that has no experience in any other programming 
>> language?
> 
> The code  Fortran, so  it should be readable.
> 
> The descriptions are probably largely accessible, with 2d and I think 3d 
> graphics to illustrate.
> 
> But the math for the underlying problem. . . I looked at it two or three 
> years later, and . . . I was quite impressed with the math, could see *why* 
> it was right, but generally had *no* idea why I ever would have thought to 
> make those steps!
> 
> It would go on for two or three pages of matrix calculus at times.  And 
> within those were multinomial factors 
> 
> You don’t need the underlying math of the genetic problem to make sense of 
> the algorithm, though.  
> 
> I just found that it can now be downloaded.  Chapter 3 seems to be the guts 
> of the algorithm.  It certainly came from googling the full title below.
> 
> Btw, my undergrad was in physics, then law school and practicing, before 
> returning for the Ph.D. jointly in Econo9mics & Statistics, a few years at a 
> university, and returning to law to pay tuition for my own kids . . .
> 
> I think I got to it for download from 
> http://dissertation.com/abstracts/1701716 
> .
> 
> And some info at:
> 
> https://www.econ.iastate.edu/RePEc/isu/genstf/genstf_4657.rdf 
> 
> 
> 
> Template-Type: ReDIF-Paper 1.0
> Title: Numerical optimization of recursive systems of equations with an 
> application to optimal swine genetic selection
> Author-Name: Hawkins, Richard Edmund
> Abstract: A new dynamic programming method is developed for numerical 
> optimization of recursive systems of equations, in which continuous choice 
> variables determine the allowed choices in subsequent stages of the problem. 
> The method works by dynamically creating bubbles, or subspaces, of the total 
> search space, allowing the indexing of states visited for later use, and 
> taking advantage of the fact that states adjacent to a visited state are 
> likely to be visited. The method thereby allows search of spaces far larger 
> than would traditionally be permitted by memory limitations. The search 
> allows an infinite planning horizon, and tests at each stage to determine 
> whether further optimization is worth the costs, reverting to a default 
> choice when no longer profitable. The method is applied to the quantitative 
> genetics problem of finding the optimal selection choices for quantitative 
> traits using an identified locus, using the present discounted value of all 
> generations. The method is then applied to the Estrogen Receptor Gene (ESR) 
> to find the economic value of testing for this particular gene.
> Creation-Date: 1999-01-01
> File-URL: 
> https://lib.dr.iastate.edu/cgi/viewcontent.cgi?article=13457=rtd
> Number: 199901010813457
> Handle: RePEc:isu:genstf:199901010813457
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: For the Mathematicians.

2022-01-23 Thread doc hawk via use-livecode

Roger rumbled,

> Thank you very much for your reply.

You’re quite welcome.

Accumulated knowledge is wasted if not shared!

I used to find it online quite easily.  But not any more.

>Again I thank you for taking the time to respond. Is your dissertation 
>readable to a LiveCoder that has no experience in any other programming 
>language?

The code  Fortran, so  it should be readable.

The descriptions are probably largely accessible, with 2d and I think 3d 
graphics to illustrate.

But the math for the underlying problem. . . I looked at it two or three years 
later, and . . . I was quite impressed with the math, could see *why* it was 
right, but generally had *no* idea why I ever would have thought to make those 
steps!

It would go on for two or three pages of matrix calculus at times.  And within 
those were multinomial factors 

You don’t need the underlying math of the genetic problem to make sense of the 
algorithm, though.  

I just found that it can now be downloaded.  Chapter 3 seems to be the guts of 
the algorithm.  It certainly came from googling the full title below.

Btw, my undergrad was in physics, then law school and practicing, before 
returning for the Ph.D. jointly in Econo9mics & Statistics, a few years at a 
university, and returning to law to pay tuition for my own kids . . .

I think I got to it for download from http://dissertation.com/abstracts/1701716 
.

And some info at:

https://www.econ.iastate.edu/RePEc/isu/genstf/genstf_4657.rdf 



Template-Type: ReDIF-Paper 1.0
Title: Numerical optimization of recursive systems of equations with an 
application to optimal swine genetic selection
Author-Name: Hawkins, Richard Edmund
Abstract: A new dynamic programming method is developed for numerical 
optimization of recursive systems of equations, in which continuous choice 
variables determine the allowed choices in subsequent stages of the problem. 
The method works by dynamically creating bubbles, or subspaces, of the total 
search space, allowing the indexing of states visited for later use, and taking 
advantage of the fact that states adjacent to a visited state are likely to be 
visited. The method thereby allows search of spaces far larger than would 
traditionally be permitted by memory limitations. The search allows an infinite 
planning horizon, and tests at each stage to determine whether further 
optimization is worth the costs, reverting to a default choice when no longer 
profitable. The method is applied to the quantitative genetics problem of 
finding the optimal selection choices for quantitative traits using an 
identified locus, using the present discounted value of all generations. The 
method is then applied to the Estrogen Receptor Gene (ESR) to find the economic 
value of testing for this particular gene.
Creation-Date: 1999-01-01
File-URL: 
https://lib.dr.iastate.edu/cgi/viewcontent.cgi?article=13457=rtd
Number: 199901010813457
Handle: RePEc:isu:genstf:199901010813457



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: For the Mathematicians.

2022-01-23 Thread Roger Guay via use-livecode
Thank you very much for your reply. It looks like I did indeed bite off more 
than I can chew. But I really appreciate that you’ve given me some avenues to 
explore. I’m a retired Physicist that loves math, and particularly how to use 
computers to model the real world. 

Again I thank you for taking the time to respond. Is your dissertation readable 
to a LiveCoder that has no experience in any other programming language?

Roger


> On Jan 23, 2022, at 5:11 PM, doc hawk via use-livecode 
>  wrote:
> 
> 
> roger reasoned,
> 
>> Yet, as I mentioned in the beginning, Graphing tools like Good Grapher on 
>> the Mac can do it. And, I wonder how?
> 
> My guess would be using either differentials or differences, and drawing from 
> the current point for a small distance, with some watching for branch points.
> 
> There are any number of numeric methods to approximate the derivative.   
> 
> You could even iterate after each point until “close enough”.
> 
> E.g., if your calculated x,y(x) is 4.2, 7.4, you would plug these into the 
> original function and see if it indeed is zero.  
> 
> If so, good, go to the next point.  If not, try a smaller move, or plug in 
> adjacent values of 7.3 and 7.5 for y, and see if either gets you closer to 
> zero.
> 
> For my dissertation, I developed a third branch of dynamic programming, which 
> built spaces around trial solutions, and then collapsing to successively 
> finer grds.
> 
> In the process, I unwittingly reinvented cache memory . . . the search space 
> was *far* to large to keep all potential moves, so they were dropped from the 
> cache and recalculated when needed.
> 
> We never did calculate the dimensionality of the baseline problem we were 
> working on—we know that it was *at least* sixty dimensional, but almost 
> certainly past that, as the choice spaces were very much not compact . . .
> 
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: For the Mathematicians.

2022-01-23 Thread doc hawk via use-livecode

roger reasoned,

> Yet, as I mentioned in the beginning, Graphing tools like Good Grapher on the 
> Mac can do it. And, I wonder how?

My guess would be using either differentials or differences, and drawing from 
the current point for a small distance, with some watching for branch points.

There are any number of numeric methods to approximate the derivative.   

You could even iterate after each point until “close enough”.

E.g., if your calculated x,y(x) is 4.2, 7.4, you would plug these into the 
original function and see if it indeed is zero.  

If so, good, go to the next point.  If not, try a smaller move, or plug in 
adjacent values of 7.3 and 7.5 for y, and see if either gets you closer to zero.

For my dissertation, I developed a third branch of dynamic programming, which 
built spaces around trial solutions, and then collapsing to successively finer 
grds.

In the process, I unwittingly reinvented cache memory . . . the search space 
was *far* to large to keep all potential moves, so they were dropped from the 
cache and recalculated when needed.

We never did calculate the dimensionality of the baseline problem we were 
working on—we know that it was *at least* sixty dimensional, but almost 
certainly past that, as the choice spaces were very much not compact . . .




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: For the Mathematicians.

2022-01-23 Thread Roger Guay via use-livecode
Yet, as I mentioned in the beginning, Graphing tools like Good Grapher on the 
Mac can do it. And, I wonder how?

Thanks,

Roger

> On Jan 23, 2022, at 4:51 PM, doc hawk via use-livecode 
>  wrote:
> 
> Implicit functions are not, in general, directly plowable, as there is no 
> general y(x) explicit function available.
> 
> You *could*use differentials and derivates to take small steps, if you’re 
> careful and watch for points with multiple solutions (in the example 
> function, when it crosses either axis)
> 
> I think the best you’re going to be able to do is find broad classes of 
> functions that you can have solutions prepared to handle.
> 
> Either that, or a brute-forced grid drawing, in which you solve for all 
> values of y for each value of x.  Even then, you’d need a way to connect them.
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: For the Mathematicians.

2022-01-23 Thread doc hawk via use-livecode
Implicit functions are not, in general, directly plowable, as there is no 
general y(x) explicit function available.

You *could*use differentials and derivates to take small steps, if you’re 
careful and watch for points with multiple solutions (in the example function, 
when it crosses either axis)

I think the best you’re going to be able to do is find broad classes of 
functions that you can have solutions prepared to handle.

Either that, or a brute-forced grid drawing, in which you solve for all values 
of y for each value of x.  Even then, you’d need a way to connect them.


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: For the Mathematicians.

2022-01-22 Thread Roger Guay via use-livecode
Hi François, 

My aim is to find a way to plot any and all implicit functions, not to plot 
only the lemniscate. But, that is a very interesting Wikipedia entry. Sorry I 
wasn’t clear!

Thanks,

Roger

> On Jan 22, 2022, at 4:37 PM, francois.chaplais via use-livecode 
>  wrote:
> 
> In
> https://en.wikipedia.org/wiki/Lemniscate_of_Bernoulli 
> 
> use the formulation in polar coordinates.
> You sample theta, compute the corresponding radius r, convert the polar 
> coordinates to usual cartesian coordinates, and draw a line between each 
> point for successive angles theta.
> 
> This is an explicit formulation (up to the sign or r, but the figure is 
> obviously symmetric with respect to the origin).
> 
> HTH
> François
> 
>> Le 22 janv. 2022 à 21:04, Roger Guay via use-livecode 
>>  a écrit :
>> 
>> Thanks, Thomas. I’ve done some of that but you suggest some better keywords 
>> to search with. I will give it another go.
>> 
>> Roger
>> 
>>> On Jan 22, 2022, at 12:34 PM, Thomas von Fintel via use-livecode 
>>>  wrote:
>>> 
>>> I am not a mathematician, but this kind of equation is called implicit 
>>> function, implicit equation or implicit curve. If you search for that 
>>> combined with draw or plot, you might find explanations. But it seems to be 
>>> complicated.
>>> 
>>> Hope this helps.
>>> Thomas
>>> 
>>> 
>>> 
 Am 22.01.2022 um 17:56 schrieb Roger Guay via use-livecode 
 :
 
 This equation for the lemniscate, (x^2+y^2)^2 = 100*(x^2-y^2) is an 
 example of a 2 variable function f(x,y). I am trying to figure how to plot 
 such functions in LC. I can do simple functions like y = f(x) and x = 
 f(t), y = f(t). Calculators such Good Grapher on the Mac do these f(x,y) 
 functions with apparent ease. How? 
 
 The only thing I’ve come up with so far is to imbed a y-repeat loop within 
 an x-repeat loop where for each value of x (within a certain range), every 
 value of y (within a certain range) is tested for the equation being true. 
 If true, a point is generated in a point list of a polygon. I think, in 
 principle, this should work and with persistence, I might be able make it 
 work, but so far, no cigar. 
 
 Is there a better way?
 
 
 Thanks,
 
 Roger
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your 
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: For the Mathematicians.

2022-01-22 Thread francois.chaplais via use-livecode
In
https://en.wikipedia.org/wiki/Lemniscate_of_Bernoulli 

use the formulation in polar coordinates.
You sample theta, compute the corresponding radius r, convert the polar 
coordinates to usual cartesian coordinates, and draw a line between each point 
for successive angles theta.

This is an explicit formulation (up to the sign or r, but the figure is 
obviously symmetric with respect to the origin).

HTH
François

> Le 22 janv. 2022 à 21:04, Roger Guay via use-livecode 
>  a écrit :
> 
> Thanks, Thomas. I’ve done some of that but you suggest some better keywords 
> to search with. I will give it another go.
> 
> Roger
> 
>> On Jan 22, 2022, at 12:34 PM, Thomas von Fintel via use-livecode 
>>  wrote:
>> 
>> I am not a mathematician, but this kind of equation is called implicit 
>> function, implicit equation or implicit curve. If you search for that 
>> combined with draw or plot, you might find explanations. But it seems to be 
>> complicated.
>> 
>> Hope this helps.
>> Thomas
>> 
>> 
>> 
>>> Am 22.01.2022 um 17:56 schrieb Roger Guay via use-livecode 
>>> :
>>> 
>>> This equation for the lemniscate, (x^2+y^2)^2 = 100*(x^2-y^2) is an 
>>> example of a 2 variable function f(x,y). I am trying to figure how to plot 
>>> such functions in LC. I can do simple functions like y = f(x) and x = f(t), 
>>> y = f(t). Calculators such Good Grapher on the Mac do these f(x,y) 
>>> functions with apparent ease. How? 
>>> 
>>> The only thing I’ve come up with so far is to imbed a y-repeat loop within 
>>> an x-repeat loop where for each value of x (within a certain range), every 
>>> value of y (within a certain range) is tested for the equation being true. 
>>> If true, a point is generated in a point list of a polygon. I think, in 
>>> principle, this should work and with persistence, I might be able make it 
>>> work, but so far, no cigar. 
>>> 
>>> Is there a better way?
>>> 
>>> 
>>> Thanks,
>>> 
>>> Roger
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: For the Mathematicians.

2022-01-22 Thread Roger Guay via use-livecode
Thanks, Thomas. I’ve done some of that but you suggest some better keywords to 
search with. I will give it another go.

Roger

> On Jan 22, 2022, at 12:34 PM, Thomas von Fintel via use-livecode 
>  wrote:
> 
> I am not a mathematician, but this kind of equation is called implicit 
> function, implicit equation or implicit curve. If you search for that 
> combined with draw or plot, you might find explanations. But it seems to be 
> complicated.
> 
> Hope this helps.
> Thomas
> 
> 
> 
>> Am 22.01.2022 um 17:56 schrieb Roger Guay via use-livecode 
>> :
>> 
>> This equation for the lemniscate, (x^2+y^2)^2 = 100*(x^2-y^2) is an example 
>> of a 2 variable function f(x,y). I am trying to figure how to plot such 
>> functions in LC. I can do simple functions like y = f(x) and x = f(t), y = 
>> f(t). Calculators such Good Grapher on the Mac do these f(x,y) functions 
>> with apparent ease. How? 
>> 
>> The only thing I’ve come up with so far is to imbed a y-repeat loop within 
>> an x-repeat loop where for each value of x (within a certain range), every 
>> value of y (within a certain range) is tested for the equation being true. 
>> If true, a point is generated in a point list of a polygon. I think, in 
>> principle, this should work and with persistence, I might be able make it 
>> work, but so far, no cigar. 
>> 
>> Is there a better way?
>> 
>> 
>> Thanks,
>> 
>> Roger
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: For the Mathematicians.

2022-01-22 Thread Thomas von Fintel via use-livecode
I am not a mathematician, but this kind of equation is called implicit 
function, implicit equation or implicit curve. If you search for that combined 
with draw or plot, you might find explanations. But it seems to be complicated.

Hope this helps.
Thomas



> Am 22.01.2022 um 17:56 schrieb Roger Guay via use-livecode 
> :
> 
> This equation for the lemniscate, (x^2+y^2)^2 = 100*(x^2-y^2) is an example 
> of a 2 variable function f(x,y). I am trying to figure how to plot such 
> functions in LC. I can do simple functions like y = f(x) and x = f(t), y = 
> f(t). Calculators such Good Grapher on the Mac do these f(x,y) functions with 
> apparent ease. How? 
> 
> The only thing I’ve come up with so far is to imbed a y-repeat loop within an 
> x-repeat loop where for each value of x (within a certain range), every value 
> of y (within a certain range) is tested for the equation being true. If true, 
> a point is generated in a point list of a polygon. I think, in principle, 
> this should work and with persistence, I might be able make it work, but so 
> far, no cigar. 
> 
> Is there a better way?
> 
> 
> Thanks,
> 
> Roger
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


For the Mathematicians.

2022-01-22 Thread Roger Guay via use-livecode
This equation for the lemniscate, (x^2+y^2)^2 = 100*(x^2-y^2) is an example of 
a 2 variable function f(x,y). I am trying to figure how to plot such functions 
in LC. I can do simple functions like y = f(x) and x = f(t), y = f(t). 
Calculators such Good Grapher on the Mac do these f(x,y) functions with 
apparent ease. How? 

The only thing I’ve come up with so far is to imbed a y-repeat loop within an 
x-repeat loop where for each value of x (within a certain range), every value 
of y (within a certain range) is tested for the equation being true. If true, a 
point is generated in a point list of a polygon. I think, in principle, this 
should work and with persistence, I might be able make it work, but so far, no 
cigar. 

Is there a better way?


Thanks,

Roger
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode