--- Log opened Fri Nov 22 00:00:45 2019 |
00:20 | | Kindamoody is now known as Kindamoody[zZz] |
00:23 | <@Alek> | https://i.imgur.com/g94GZCy.jpg |
00:23 | <&McMartin> | Excellent |
00:47 | <&McMartin> | Sent that to the local incorrigible punster |
00:47 | <&McMartin> | His reply: "I feel like the first is a private joke, and the second turns a B-movie into a C-movie" |
01:14 | | celmin|away is now known as celticminstrel |
02:17 | | Degi [Degi@Nightstar-35s8vd.dyn.telefonica.de] has quit [Ping timeout: 121 seconds] |
02:22 | | Degi [Degi@Nightstar-m5uag2.dyn.telefonica.de] has joined #code |
03:19 | | himi-cat [sjjf@Nightstar-1drtbs.anu.edu.au] has quit [Ping timeout: 121 seconds] |
05:34 | | himi-cat [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code |
05:40 | | Vorntastic [uid293981@Nightstar-6br85t.irccloud.com] has joined #code |
05:40 | | mode/#code [+qo Vorntastic Vorntastic] by ChanServ |
06:05 | | celticminstrel [celticminst@Nightstar-2kik29.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
07:40 | | JustLurk [justbob@ServerAdministrator.Nightstar.Net] has joined #code |
07:40 | | JustBob [justbob@Nightstar.Customer.Dissatisfaction.Administrator] has quit [NickServ (RECOVER command used by JustLurk)] |
07:40 | | JustLurk is now known as JustBob |
07:40 | | mode/#code [+o JustBob] by ChanServ |
09:04 | | McMartin [mcmartin@Nightstar-ipm463.ca.comcast.net] has quit [Operation timed out] |
09:04 | | McMartin [mcmartin@Nightstar-ipm463.ca.comcast.net] has joined #code |
09:04 | | mode/#code [+ao McMartin McMartin] by ChanServ |
10:36 | | * TheWatcher hugs `git log -u -L <line>,<line>:<filename>` |
10:36 | <&McMartin> | ? |
10:37 | <@TheWatcher> | It has nicely informed me who I need to apply the concussion to for a very stupid piece of code |
10:38 | <&McMartin> | How does this beat blame? |
10:38 | <&McMartin> | skip past "fix whitespace" commits? |
10:48 | <@TheWatcher> | I can't get `git blame` to show me the full history for the specified lines, only the last person to touch them (which may be driver error, of course). There's been a number of revisions of the line, but I wanted to find out who was responsible for it originally. |
10:48 | <&McMartin> | got it |
12:27 | | Kindamoody[zZz] is now known as Kindamoody |
12:56 | <@sshine> | https://ncpc16.kattis.com/problems/raffle |
12:57 | <@sshine> | the task is, given a number of existing tickets in a raffle and the number of prizes that are drawn, return the highest probability of winning, assuming you're willing to add more than one ticket to the raffle, knowing that if your name is drawn twice or more, you'll lose your prize. |
12:58 | <@sshine> | so the optimal solution is not necessarily to play fair. |
12:58 | <@sshine> | but the problem feels a bit constructed: it assumes that nobody else is cheating, and it lets you enter your tickets last. |
12:59 | < ErikMesoy> | I think it only assumes nobody else is *caught* cheating |
12:59 | <@sshine> | so I wonder how to model the solution to another problem: assume everyone is cheating, and that you don't know who puts in the tickets when. |
12:59 | < ErikMesoy> | "You know the number of names in the raffle box placed by other people" <-- doesn't say they are unique, someone else may have cheated! |
12:59 | <@sshine> | ErikMesoy, that's true. |
13:00 | < ErikMesoy> | neat question |
13:00 | <@sshine> | ErikMesoy, I think it simplifies that part a bit. |
13:00 | <@sshine> | yes |
13:00 | <@sshine> | they just announced a raffle at work, and some of the guys in tech recalled this problem. |
13:03 | <@sshine> | so, rather than knowing the number of tickets in the bowl, you know the number of participants and you don't know how many tickets each one is going to add. |
13:04 | <@sshine> | since it's not reasonable to make guesses at how many people who are going to cheat (too many social factors to make it an interesting computing problem), you assume that everyone plays optimally. |
13:10 | < ErikMesoy> | Seems to me the optimal solution there is to put in slightly more tickets than every other cheater, and you get an infinite regress. |
13:10 | <~Vorntastic> | Wait |
13:11 | <~Vorntastic> | Do you get the number of distinct babes or the number of tickets |
13:11 | <~Vorntastic> | ... Names |
13:12 | | celticminstrel [celticminst@Nightstar-2kik29.dsl.bell.ca] has joined #code |
13:12 | | mode/#code [+o celticminstrel] by ChanServ |
13:14 | <~Vorntastic> | Actually the question is underspecified; what happens if a name is drawn twice? Do they discard both and continue drawing until they have a set of unique names s.t. each is only seen once |
13:18 | <~Vorntastic> | Though I suppose the simplest is just those prizes aren't awarded at all; this comports with the result for (3, 2); if you put in 3 of your own name there's a 3/15 chance that none of your tickets get picked, and a 3/15 chance that 2 do, leaving 9/15 = 0.6 |
13:19 | <~Vorntastic> | Actually the same if you put 2; 3/10 no pick, 1/10 caught |
13:32 | <@sshine> | Vorntastic, you get N number of participants and P prizes. |
13:33 | <@sshine> | Vorntastic, if a name is drawn more than once, that person loses their prize and are disqualified (and subsequent draws of that name are discarded) |
13:33 | <@sshine> | Vorntastic, ah yes, you mean, what happens to the disqualified prizes. |
13:35 | | Kindamoody is now known as Kindamoody|afk |
13:35 | <@sshine> | yes, I guess for simplicity they get discarded. |
13:36 | <~Vorntastic> | Ok this is an easy problem |
13:36 | <@sshine> | but... since you don't know the total number of tickets, only the number of participants, would you then assume that the number of tickets = the number of tickets you add * P? |
13:37 | <~Vorntastic> | No, just go with tickets = number of participants |
13:37 | <~Vorntastic> | That's how you actually get the answer they give |
13:45 | <~Vorntastic> | (if you assume everyone is cheating then everybody gets the same answer and everybody ends up with a less than 1/(n+1) chance of winning |
13:51 | | celticminstrel is now known as celmin|away |
14:06 | <@sshine> | Vorntastic, so the probability is the same, but what's the number of tickets I'll add? |
14:15 | <~Vorntastic> | Dunno exactly |
14:16 | <~Vorntastic> | That's actually hard game theory |
15:35 | <@sshine> | hmm |
15:35 | <@sshine> | I should say that at my work, they would just re-award a lost prize. |
15:35 | <@sshine> | this makes the problem harder I think. |
15:36 | <@sshine> | at least harder to express. |
15:36 | <@sshine> | (apparently I like to turn everyday work situations into puzzles. like here: https://github.com/exercism/problem-specifications/issues/1570 ) |
15:55 | <@sshine> | and yes, it certainly smells of game theory |
15:56 | <@sshine> | so my colleague said another factor is communication. if nobody communicates, it makes sense to add one more than everyone else, which diverges. |
16:04 | <@sshine> | if a group decides to put in some fixed number of tickets, any other group will considerably worsen their odds. |
16:05 | <@sshine> | but if we assume that people aren't allowed to communicate, they can only speculate that about this. |
16:06 | <@sshine> | so I might be inclined to pick, as a base, whatever's optimal given that everyone either doesn't cheat or picks whatever's optimal given that everyone doesn't cheat (which is closer to the solution to the NCPC '16 problem where you know the number of tickets) |
16:07 | <@sshine> | so, say, there's 100 participants and 25 prizes. in the NCPC '16 problem (translating 100 participants into 100 tickets) that'd give optimal odds at cheating with 4 tickets. |
16:07 | <@sshine> | (http://www.cs.ucf.edu/~dmarino/progcontests/mysols/collegeregional/ncpc/2016/f.java for those who don't want to solve this problem.) |
16:09 | <@sshine> | I don't know that there are 100 tickets, but I can assume that everyone plays optimally and have, as base, 100. so if they went with this strategy and assumed, initially, 100 tickets, they'd end up putting 4 in each, shifting the base to 4*100. |
16:28 | <&ToxicFrog> | Hang on, in every raffle I've seen entering multiple tickets was not merely permitted but encouraged |
16:28 | < Yossarian> | same |
17:03 | | Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has joined #code |
17:18 | | Kindamoody|afk is now known as Kindamoody |
17:28 | | Vorntastic [uid293981@Nightstar-6br85t.irccloud.com] has quit [[NS] Quit: Connection closed for inactivity] |
20:36 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
20:36 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
22:34 | | Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client] |
23:08 | | Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has quit [Ping timeout: 121 seconds] |
--- Log closed Sat Nov 23 00:00:47 2019 |