HELP!! with Scheme programming
Author Message
HELP!! with Scheme programming

Hi,

H(sub a) = h  h
hhh
h  h a

Hope you understand what i try to say,

anyway the problem is

Imagine an area populated only by wolves and caribou.  We want to
predict what will happen to their populations over several years.
According to the simpliifed Predator-Prey model w(sub n+1) and c(sub
n+1), the populations of wolves and caribou in year n+1, can be
determined from the populations in year n by the following equations:

c(sub n+1)  =  A c(sub n)  -  B c(sub n) w(sub n)
w(sub n+1) =  C w(sub n)  + D c(sub n) w(sub n)

where A= 1.1, B = 0.01, C = 0.9, and D = 0.02

Write two programs (using state variables wolves, caribou, n, and k)
which runs the wolves-caribou model for n years and outputs its
results every k years.  One program in recursion and the other in
iteration.

Sample output for checking,

in this problem, we start with 10 wolves and 10 caribou and obtain
after 2 years, printing every year, the output:

(population 10 10 2 1)
11.0 10.0
12.1 9.9

Thank again,

Tran

Wed, 29 Jul 1998 03:00:00 GMT
HELP!! with Scheme programming
Hi,

H(sub a) = h  h
hhh
h  h a

Hope you understand what i try to say,

anyway the problem is

Imagine an area populated only by wolves and caribou.  We want to
predict what will happen to their populations over several years.
According to the simpliifed Predator-Prey model w(sub n+1) and c(sub
n+1), the populations of wolves and caribou in year n+1, can be
determined from the populations in year n by the following equations:

c(sub n+1)  =  A c(sub n)  -  B c(sub n) w(sub n)
w(sub n+1) =  C w(sub n)  + D c(sub n) w(sub n)

where A= 1.1, B = 0.01, C = 0.9, and D = 0.02

Write two programs (using state variables wolves, caribou, n, and k)
which runs the wolves-caribou model for n years and outputs its
results every k years.  One program in recursion and the other in
iteration.

Sample output for checking,

in this problem, we start with 10 wolves and 10 caribou and obtain
after 2 years, printing every year, the output:

(population 10 10 2 1)
11.0 10.0
12.1 9.9

Thank again,

Tran

Wed, 29 Jul 1998 03:00:00 GMT
HELP!! with Scheme programming

: Hi,
:
: ....
: Write two programs (using state variables wolves, caribou, n, and k)
: which runs the wolves-caribou model for n years and outputs its
: results every k years.  One program in recursion and the other in
: iteration.
: ...

Here's my answer, encrypted using a very special one-time
pad, then xored with the ascii code for '#'.  If you  can crack
the  code, you'll get the program.  I hope this makes it easier.

##################################################################
##################################################################
##################################################################
##################################################################
##################################################################
##################################################################
##################################################################
##################################################################
##################################################################
##################################################################
##################################################################
##################################################################
##################################################################
##################################################################
--
Antoun (Tony) Kanawati

http://www.{*filter*}com.net/~tonyk/

Thu, 30 Jul 1998 03:00:00 GMT

 Page 1 of 1 [ 3 post ]

Relevant Pages