mersenneforum.org  

Go Back   mersenneforum.org > Fun Stuff > Puzzles

Reply
 
Thread Tools
Old 2020-12-02, 03:18   #12
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

6,287 Posts
Default

Quote:
Originally Posted by tgan View Post
must admit that i did not totally understood the puzzle. do we look for a maximum or we need to get the required number?
The way I understood it was to simply generate a set of populations, compute what is the most number of votes achievable and still lose on the electors count, then see if the total votes divided by the total population is the given number.

There are solutions to give both higher percentages and lower percentages, so those can be eliminated quickly.

Indeed the given percentage is very specific, and that is why it was easy to find the answers. It could also be done by hand if one were so inclined, it wouldn't take very long at all.

Last fiddled with by retina on 2020-12-02 at 03:21
retina is online now   Reply With Quote
Old 2020-12-02, 04:47   #13
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
"name field"
Jun 2011
Thailand

263B16 Posts
Default

Agree from this part of the world, if you limit your pi's to [100,150], there are about 350 millions (51^5) possibilities in the whole search space, so a brute force is quite fast, without any "intelligence" behind. Write a pari line with 5 for or while loops one inside the other and forget it for a while (pun intended).
(Edit: I considered that the "odd pi" trick is there only to ensure there is no "tie" in voting, but as long as there is no tie, the even numbers work as well, that is why I said 51, and not 25).

Last fiddled with by LaurV on 2020-12-02 at 04:54
LaurV is offline   Reply With Quote
Old 2020-12-02, 06:28   #14
tgan
 
Jul 2015

22·7 Posts
Thumbs up

Quote:
Originally Posted by retina View Post
The way I understood it was to simply generate a set of populations, compute what is the most number of votes achievable and still lose on the electors count, then see if the total votes divided by the total population is the given number.

There are solutions to give both higher percentages and lower percentages, so those can be eliminated quickly.

Indeed the given percentage is very specific, and that is why it was easy to find the answers. It could also be done by hand if one were so inclined, it wouldn't take very long at all.
Thanks for your explanation now I understand the puzzle
tgan is offline   Reply With Quote
Old 2020-12-02, 07:09   #15
retina
Undefined
 
retina's Avatar
 
"The unspeakable one"
Jun 2006
My evil lair

628710 Posts
Default

Quote:
Originally Posted by LaurV View Post
Agree from this part of the world, if you limit your pi's to [100,150], there are about 350 millions (51^5) possibilities in the whole search space, so a brute force is quite fast, without any "intelligence" behind. Write a pari line with 5 for or while loops one inside the other and forget it for a while (pun intended).
(Edit: I considered that the "odd pi" trick is there only to ensure there is no "tie" in voting, but as long as there is no tie, the even numbers work as well, that is why I said 51, and not 25).
I tried your suggestion of including even population counts (but not your suggestion of 5 nested while loops).

And I find 1336 results.

Also, I now find 104 results for the original puzzle, after seeing that I did indeed have a mistake.

And curiously these results are the same for both 1000 and 1001 electors, so the error in the definition statement makes no difference.
retina is online now   Reply With Quote
Old 2020-12-02, 12:51   #16
Dr Sardonicus
 
Dr Sardonicus's Avatar
 
Feb 2017
Nowhere

22×32×139 Posts
Default

Quote:
Originally Posted by retina View Post
The way I understood it was to simply generate a set of populations, compute what is the most number of votes achievable and still lose on the electors count, then see if the total votes divided by the total population is the given number.
And there's an obvious way to insure the maximum number of votes to win the electors of a given set of states.

Quote:
Indeed the given percentage is very specific, and that is why it was easy to find the answers. It could also be done by hand if one were so inclined, it wouldn't take very long at all.
Curious they didn't ask for the maximum percentage.

One of the present-day complications in the US presidential election system is that Maine and Nebraska do not assign electors by "winner take all."

Possibly the most undemocratic US presidential election was that of 1824. According to History.com,
Quote:
Andrew Jackson of Tennessee won 99 electoral and 153,544 popular votes; John Quincy Adams of Massachusetts received 84 electoral and 108,740 popular votes
No majority in the Electoral College, so for the second time in US history (the first being the election of 1800), the election went to the House of Representatives. Henry Clay, who had come in fourth in electoral votes, was out of the running. But he helped Adams, and so John Quincy Adams became President, despite Jackson's lopsided win in the popular vote.

Then there was the election of 1876...
Dr Sardonicus is offline   Reply With Quote
Old 2020-12-03, 02:07   #17
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
"name field"
Jun 2011
Thailand

9,787 Posts
Default

Quote:
Originally Posted by Dr Sardonicus View Post
Curious they didn't ask for the maximum percentage.
Because that's trivial. 74.5424292845258 for odds, and 74.6268656716418 when evens are included too, due to the fact that you can make the "won" electorates 150, while in the first case you can only make them 149, so you got a bit higher percentage
You only need pencil, paper, and 3 minutes to find that out.

Last fiddled with by LaurV on 2020-12-03 at 04:13
LaurV is offline   Reply With Quote
Old 2020-12-03, 02:24   #18
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
"name field"
Jun 2011
Thailand

230738 Posts
Default

Quote:
Originally Posted by retina View Post
I tried your suggestion of including even population counts (but not your suggestion of 5 nested while loops).
Well, I put those 5 loops in excel, with calculation of the maximal losing vote in the innermost one, which makes it 6 nested loops , because that calculation (the stupidest implementation possible, also brute force) is also a "for loop" from 1 to 31 where each bit 1 shows the electorate you lost, and the excel "macro" goes through all possible population combinations in less than a minute, in spite of such a slow, interpreted, excel VBA. Because the search space is much smaller than what I said yesterday, if you keep the population vector always sorted (i.e. for p1=100 to 150, for p2=p1 to 150, for p3=p2 to 150, etc). When you step only through the odd numbers, for example, there are only Combin(25,5)*31=1674030, versus 350 millions that I was blabbing yesterday.

Last fiddled with by LaurV on 2020-12-03 at 04:23
LaurV is offline   Reply With Quote
Old 2020-12-03, 14:17   #19
Dieter
 
Oct 2017

112 Posts
Default

Has anyone a link to a list of the number of eligible voters for each state of the USA and to the real-world non-simplified formula, how the electors are computed?
I found a list, how many voters voted in each state, but I guess that we shall use the number of eligible voters.
Or is that the real task?
Dieter is offline   Reply With Quote
Old 2020-12-03, 15:22   #20
Dr Sardonicus
 
Dr Sardonicus's Avatar
 
Feb 2017
Nowhere

22·32·139 Posts
Default

Quote:
Originally Posted by Dieter View Post
Has anyone a link to a list of the number of eligible voters for each state of the USA and to the real-world non-simplified formula, how the electors are computed?
I found a list, how many voters voted in each state, but I guess that we shall use the number of eligible voters.
Or is that the real task?
Number of presidential electors is easy: for each State, add the number of Senators (2) to the number of US Representatives. Constitution of the United States, Article II, Section 1, Clause 2:

Quote:
Each State shall appoint, in such Manner as the Legislature thereof may direct, a Number of Electors, equal to the whole Number of Senators and Representatives to which the State may be entitled in the Congress: but no Senator or Representative, or Person holding an Office of Trust or Profit under the United States, shall be appointed an Elector.
Clause 3, the way the Electoral College actually selects the president and vice-president, was superseded by the Twelfth Amendment in the wake of the election of 1800. Some of it, in turn, was changed by the Twentieth Amendment, AKA the "Lame Duck Amendment," which set Inauguration Day as January 20, and the day the new session of Congress begins.

Each State's electors are assigned according to State law. In all but Nebraska and Maine, the rule is "winner take all." Nebraska and Maine divide the electors to reflect the popular vote, but I don't know the formula.

As to eligible voters, the basic requirement is citizenship, and the age requirement is at least 18, by the Twenty-Sixth Amendment. Some (natural-born or naturalized) US citizens who are old enough to vote are ineligible because e.g. they are convicted felons.

In order to cast a ballot, an otherwise eligible voter has to register to vote. This part of the process allows States to prevent otherwise eligible people from voting because they are not rich enough, not white enough, or not Republican enough. The number of registered voters in each State is probably available on line. You might try the US Census or ballotpedia,org

EDIT: This Ballotpedia page has a table of registered voters by state as of 2018.

Last fiddled with by Dr Sardonicus on 2020-12-03 at 17:14 Reason: xifgin posty; and as indicated
Dr Sardonicus is offline   Reply With Quote
Old 2020-12-03, 18:51   #21
Uncwilly
6809 > 6502
 
Uncwilly's Avatar
 
"""""""""""""""""""
Aug 2003
101×103 Posts

1001610 Posts
Default

Quote:
Originally Posted by Dr Sardonicus View Post
Each State's electors are assigned according to State law. In all but Nebraska and Maine, the rule is "winner take all." Nebraska and Maine divide the electors to reflect the popular vote, but I don't know the formula.
Nebraska and Maine allot 1 elector per congressional district (most votes in that district determines who gets that elector) and then the 2 remaining electors "at-large" are assigned based on who got the most votes in the state.
Uncwilly is offline   Reply With Quote
Old 2021-01-10, 15:35   #22
uau
 
Jan 2017

23·3·5 Posts
Default

Adding my solution here since the month is over:

This was quite an easy problem, with a straightforward solution that requires no programming either.

That each state is between 100 and 150 population means that the candidate that wins 3 states is always the overall winner (wins states with at least 303 votes, opponent at most 298 - the details of the elector stuff can never matter). Maximal loss in this setup means getting every vote in the 2 biggest states, and maximum non-winning amount in the 3 smallest.

The only possible ratio within the given population sizes that is close to 71.781305% is 405/567 (as you can see with standard rational approximation, or just an exhaustive search). So the total population is 567, and the loser gets 405 votes.

The winning candidate gets 567-407=160 votes. In a minimal win, he gets (population+1)/2 votes in each of the smallest 3 states. So (p1+p2+p3+3)/2=160, and p1+p2+p3=317. Any state sizes where the sum of the 3 smallest is 317 and total population is 567 are a valid solution.
uau is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
December 2019 yae9911 Puzzles 59 2020-01-18 13:36
December 2017 Batalov Puzzles 4 2018-01-04 04:33
December 2016 Xyzzy Puzzles 11 2017-01-24 12:27
December 2015 Xyzzy Puzzles 15 2016-01-06 10:23
December 2014 Xyzzy Puzzles 13 2015-01-02 19:41

All times are UTC. The time now is 11:24.


Mon Oct 25 11:24:10 UTC 2021 up 94 days, 5:53, 0 users, load averages: 0.77, 0.94, 1.01

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.