# Script (c) Copyright 2009 TheGreenPapers.com # Richard E. Berg-Andersson, Research and Commentary # Tony Roza, Webmaster # URL: http://www.TheGreenPapers.com # ******************************************************************** # declare 2010 estimated census values (from 1 July 2008) for each state $StatePopulation{"Alabama"}=4661900; $StatePopulation{"Alaska"}=686293; $StatePopulation{"Arizona"}=6500180; $StatePopulation{"Arkansas"}=2855390; $StatePopulation{"California"}=36756666; $StatePopulation{"Colorado"}=4939456; $StatePopulation{"Connecticut"}=3501252; $StatePopulation{"Delaware"}=873092; $StatePopulation{"Florida"}=18328340; $StatePopulation{"Georgia"}=9685744; $StatePopulation{"Hawaii"}=1288198; $StatePopulation{"Idaho"}=1523816; $StatePopulation{"Illinois"}=12901563; $StatePopulation{"Indiana"}=6376792; $StatePopulation{"Iowa"}=3002555; $StatePopulation{"Kansas"}=2802134; $StatePopulation{"Kentucky"}=4269245; $StatePopulation{"Louisiana"}=4410796; $StatePopulation{"Maine"}=1316456; $StatePopulation{"Maryland"}=5633597; $StatePopulation{"Massachusetts"}=6497967; $StatePopulation{"Michigan"}=10003422; $StatePopulation{"Minnesota"}=5220393; $StatePopulation{"Mississippi"}=2938618; $StatePopulation{"Missouri"}=5911605; $StatePopulation{"Montana"}=967440; $StatePopulation{"Nebraska"}=1783432; $StatePopulation{"Nevada"}=2600167; $StatePopulation{"New Hampshire"}=1315809; $StatePopulation{"New Jersey"}=8682661; $StatePopulation{"New Mexico"}=1984356; $StatePopulation{"New York"}=19490297; $StatePopulation{"North Carolina"}=9222414; $StatePopulation{"North Dakota"}=641481; $StatePopulation{"Ohio"}=11485910; $StatePopulation{"Oklahoma"}=3642361; $StatePopulation{"Oregon"}=3790060; $StatePopulation{"Pennsylvania"}=12448279; $StatePopulation{"Rhode Island"}=1050788; $StatePopulation{"South Carolina"}=4479800; $StatePopulation{"South Dakota"}=804194; $StatePopulation{"Tennessee"}=6214888; $StatePopulation{"Texas"}=24326974; $StatePopulation{"Utah"}=2736424; $StatePopulation{"Vermont"}=621270; $StatePopulation{"Virginia"}=7769089; $StatePopulation{"Washington"}=6549224; $StatePopulation{"West Virginia"}=1814468; $StatePopulation{"Wisconsin"}=5627967; $StatePopulation{"Wyoming"}=532668; print "The formula used to determine the number of House Seats for each State\n"; print "is the Method of Equal Proportions. Each State is automatically assigned\n"; print "one seat to start with (as each State MUST have at least one seat in\n"; print "Congress). First, assign seats 1 thru 50 of 435.\n\n"; $iSeat=1; # seat number 1 to 435 @ListOfStates=sort(keys(%StatePopulation)); foreach $State (@ListOfStates) { print "$iSeat: $State, Population $StatePopulation{$State}\n"; $TotalPopulation += $StatePopulation{$State}; $StatesSeatNumber{$State}=1; $iSeat++; } print "\nTotal Population = $TotalPopulation\n"; print "\nEqual Proportions are used to determine which states shall receive\n"; print "seats 51 thru 435. Divide each State's population by the square root\n"; print "of n(n-1) where n equals the number of potential seats for a given\n"; print "State. The result is called the Priority Value.\n"; print "\nPriority Value = Population ÷ SQRT( ( N×(N-1) ) );\n"; print "where N = potential seats (2 to 53) for the state\n"; # Compute the Priority Value for seats 2 thru 60 for each state. for($iPotentialSeat=2; $iPotentialSeat <= 60; $iPotentialSeat++) { # for potential seats 2 thru 60, compute square root ( n * (n-1) ) $fRoot = sqrt( $iPotentialSeat*($iPotentialSeat-1) ); # sqrt( n * (n-1) ) foreach $State (@ListOfStates) { $value = sprintf( "%12.3f", $StatePopulation{$State} / $fRoot ); $PriorityValue{ $value } = $State; } } # sort priority values in decending order @ListOfPriority=reverse(sort(keys(%PriorityValue))); print "\nAssign seats 51 to 435 from those states with the largest priority values.\n\n"; while( $iSeat <= 445 ) { $Priority = @ListOfPriority[$iSeat-51]; if( $iSeat==436 ) { print "\nJust for grins show where additional seats would have gone.\n\n" } $State=$PriorityValue{$Priority}; $SeatNumber = ++$StatesSeatNumber{$State}; print "$iSeat: $State Seat $SeatNumber, PV=" . int($Priority) . "\n"; if( $iSeat > 435 ) { $StatesSeatNumber{$State}-- }; # fix up! $iSeat++; } print "\nShow how many House Seats each state received.\n\n"; foreach $State (@ListOfStates) { print "$State - $StatesSeatNumber{$State} seats\n"; }