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

Hi,

I'm learning scheme and stuck on a problem.  Please help,

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 you, please post or email me your answer

Thank again,

Tran



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

I'm learning scheme and stuck on a problem.  Please help,

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 you, please post or email me your answer

Thank again,

Tran



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

: Hi,
:
: I'm learning scheme and stuck on a problem.  Please help,
: ....
: 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.
: ...
: Thank you, please post or email me your answer

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.

Begin answer
##################################################################
##################################################################
##################################################################
##################################################################
##################################################################
##################################################################
##################################################################
##################################################################
##################################################################
##################################################################
##################################################################
##################################################################
##################################################################
##################################################################
End answer
--
Antoun (Tony) Kanawati

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



Thu, 30 Jul 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. HELP!! with Scheme programming

2. Help! Need scheme program fast!

3. Need help with Chomp (a game for scheme)--Using Dr. Scheme to Program

4. scheme-features: a Scheme evaluation program

5. Looking for uncorrupted PC Scheme and help with MIT Scheme 6.001

6. Help me evaluate computer programming languages and know what kind of programs are in demand

7. Help: Fortran program as a thread of a C program

8. Help: Executing lisp programs from C-programs?

9. CFP: 2nd Scheme and Functional Programming

10. CFP: 2nd Scheme and Functional Programming

11. Scheme programming environments

12. Answers to Scheme and the Art of Programming

 

 
Powered by phpBB® Forum Software