[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*Subject*: HELP!! with Scheme programming*From*: tran0204@tc.umn.edu (Phuong-Hy H. Tran)*Date*: Sat, 10 Feb 1996 11:17:30 GMT*Newsgroups*: comp.org.lisp-users*Organization*: UM

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 tran0204@tc.umn.edu Thank again, Tran tran0204@tc.umn.edu

- Prev by Date:
**Frequently Asked Questions [Weekly reminder]** - Next by Date:
**Frequently Asked Questions [Weekly reminder]** - Previous by thread:
**Stacker Trouble** - Next by thread:
**DOW96: Call For Papers** - Index(es):