# Script (c) Copyright 2020 TheGreenPapers.com # Richard E. Berg-Andersson, Research and Commentary # Tony Roza, Webmaster # URL: http://www.TheGreenPapers.com # ******************************************************************** # declare 2020 census values (from 23 December 2020) for each state $StatePopulation{"Alabama"}=5030053; $StatePopulation{"Alaska"}=736081; $StatePopulation{"Arizona"}=7158923; $StatePopulation{"Arkansas"}=3013756; $StatePopulation{"California"}=39576757; $StatePopulation{"Colorado"}=5782171; $StatePopulation{"Connecticut"}=3608298; $StatePopulation{"Delaware"}=990837; $StatePopulation{"Florida"}=21570527; $StatePopulation{"Georgia"}=10725274; $StatePopulation{"Hawaii"}=1460137; $StatePopulation{"Idaho"}=1841377; $StatePopulation{"Illinois"}=12822739; $StatePopulation{"Indiana"}=6790280; $StatePopulation{"Iowa"}=3192406; $StatePopulation{"Kansas"}=2940865; $StatePopulation{"Kentucky"}=4509342; $StatePopulation{"Louisiana"}=4661468; $StatePopulation{"Maine"}=1363582; $StatePopulation{"Maryland"}=6185278; $StatePopulation{"Massachusetts"}=7033469; $StatePopulation{"Michigan"}=10084442; $StatePopulation{"Minnesota"}=5709752; $StatePopulation{"Mississippi"}=2963914; $StatePopulation{"Missouri"}=6160281; $StatePopulation{"Montana"}=1085407; $StatePopulation{"Nebraska"}=1963333; $StatePopulation{"Nevada"}=3108462; $StatePopulation{"New Hampshire"}=1379089; $StatePopulation{"New Jersey"}=9294493; $StatePopulation{"New Mexico"}=2120220; $StatePopulation{"New York"}=20215751; $StatePopulation{"North Carolina"}=10453948; $StatePopulation{"North Dakota"}=779702; $StatePopulation{"Ohio"}=11808848; $StatePopulation{"Oklahoma"}=3963516; $StatePopulation{"Oregon"}=4241500; $StatePopulation{"Pennsylvania"}=13011844; $StatePopulation{"Rhode Island"}=1098163; $StatePopulation{"South Carolina"}=5124712; $StatePopulation{"South Dakota"}=887770; $StatePopulation{"Tennessee"}=6916897; $StatePopulation{"Texas"}=29183290; $StatePopulation{"Utah"}=3275252; $StatePopulation{"Vermont"}=643503; $StatePopulation{"Virginia"}=8654542; $StatePopulation{"Washington"}=7715946; $StatePopulation{"West Virginia"}=1795045; $StatePopulation{"Wisconsin"}=5897473; $StatePopulation{"Wyoming"}=577719; 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"; }