Date: Mon, 16 Aug 1999 11:17:04 +0200
From: "Gatherer, D. (Derek)" <D.Gatherer@organon.nhe.akzonobel.nl>
Subject: Class defections etc
To: "'memetics@mmu.ac.uk'" <memetics@mmu.ac.uk>
# Perl 5.005
# establishing input/output stream
open(OUTFILE, '>outfile.xls') or die "can't find the outfile $!\n"; # output
dumped to Excel spreadsheet
print "\nPlease enter the following variables.";
print "\nnumber of people in the professional class: ";
chomp ($P = <STDIN>);
print "\nnumber of people in the working class: ";
chomp ($W = <STDIN>);
print "\nthe reproductive rate of the professional class: ";
chomp ($Rp = <STDIN>);
print "\nthe reproductive rate of the working class: ";
chomp ($Rw = <STDIN>);
$proportion = $P/($P+$W);
print "\nthe number of cycles to simulate over: ";
chomp ($cycle = <STDIN>);
print OUTFILE "cycle\told money\tnew money\tno. workers"; # just formatting
table
print OUTFILE "\n0\t$P\t\t$W";
for ($round = 1; $round <= $cycle; $round++)
{
$P_old_money = ($P * $Rp); # this is the rate the upper class
reproduce
$W = $W * $Rw; # this is the rate the workers reproduce
$total = $P_old_money + $W; # this is the total size of the next
generation
$P_new_money = ($proportion * $total) - $P_old_money; # the
vacancies in the upper class
$W = $W - $P_new_money; # the workers are reduced by movement
upwards
$P = $P_old_money + $P_new_money; # the new upper class is a mixture
of old and defectors
print OUTFILE "\n$round\t$P_old_money\t$P_new_money\t$W";
}
#running this with Tim's starting values, the social structure is maintained
at 10% professional class and 90% workers, but the last expected living
descendent of the original upper class will be dead by generation 8 or 9.
Note that I don't use Tim's concept of defection rate, since I don't think
it has any validity.
===============================================================
This was distributed via the memetics list associated with the
Journal of Memetics - Evolutionary Models of Information Transmission
For information about the journal and the list (e.g. unsubscribing)
see: http://www.cpm.mmu.ac.uk/jom-emit