pieguy
Re:The Waiting Time Paradox, Or, Why Is My Bus Always Late?
on Sunday October 28, 2018 @02:37PM (#18322097)
In statistics, "average" often means "expected value". No time frame is specified (although you could consider it an infinite time frame). With a small sample size your actual average might not be 10 minutes, but as your sample size grows, it will tend toward 10 minutes.
Re:Unexpected hanging paradox
on Sunday July 01, 2018 @01:35PM (#17436543)
Let me say it again in a different way. My resolution of the paradox is that the prisoner incorrectly negates "x will happen" as "x won't happen" instead of negating "x definitely will happen" as "x might not happen". Thus,the prisoner cannot conclude that the hanging won't be a surprise. The prisoner can only conclude that the hanging might not be a surprise.
Re:Unexpected hanging paradox
on Sunday July 01, 2018 @11:45AM (#17436012)
> he believes he wouldn't be hanged at all
> he assumes what the judge said is true
The judge says he will be hanged. Your comments are inconsistent.
Re:Unexpected hanging paradox
on Sunday July 01, 2018 @02:54AM (#17434462)
He cannot logically conclude that. He can only conclude that either he won't be hanged or his hanging might not be a surprise.
Re:Unexpected hanging paradox
on Sunday July 01, 2018 @02:00AM (#17434312)
No, it would not have been a surprise if he were hanged on Friday. The prisoner disproves the existence of a strategy for the judge that guarantees surprise, but does not disprove the existence of a strategy that gives the possibility of surprise.
Re:Unexpected hanging paradox
on Saturday June 30, 2018 @07:19PM (#17433242)
Here's my take. The prisoner considers the statement "I will be hanged, and it will be a surprise", and after "proving" it false, takes its negation "Either I won't be hanged, or it won't be a surprise". But this is not correct. The prisoner actually disproves the statement "I will be hanged, and it will be a surprise no matter which day it happens". When you negate this statement, you obtain "Either I won't be hanged, or there is a day that it would not be a surprise", which is consistent with the outcome.
Re:Show HN: Cost of a 51% Attack on Popular Cryptocurrencies
on Monday May 28, 2018 @12:52PM (#17173405)
I don't think multi-algorithm is taken into account for multi-algorithm coins. Several coins have multiple independent mining algorithms each with their own difficulty, and need to be attacked simultaneously.
Re:Fully Homomorphic Encryption: Secret Key Homomorphic Encryption Ove...
on Friday April 27, 2018 @12:10PM (#16941889)
(c(mod p)) (mod 2) = (p * q + 2 * r + m (mod p)) (mod 2) = 2r + m (mod 2) = m
This breaks if 2*r > p. Even if you choose r to be small during encryption, the r values accumulate with each homomorphic operation and will eventually be too big. The only restriction stated is that r is "from a different interval than the private key one". This should be made more clear.
Re:Don't give away historic details about yourself
on Tuesday April 10, 2018 @04:07PM (#16804803)
I used to answer secret questions with bogus answers that I deemed unguessable. Then I discovered that when my bank asks me the questions back it does multiple choice, displaying the answer I gave along with 4 other possible options! Sometimes my answer would not be shown and the correct answer is "none of the above", but otherwise my answer sticks out like a sore thumb.
Re:Secret Service Warns of Chip Card Scheme
on Thursday April 05, 2018 @04:50PM (#16768679)
Computerphile video on Chip+PIN fraud: https://www.youtube.com/watch?v=Ks0SOn8hjG8
Re:Mark Felt-Tipped: Uncovering top-secret information by counting pixels
on Sunday February 25, 2018 @06:44PM (#16461919)
This was the goal of The Underhanded C Contest in 2008.
Re:"Pwned Passwords" V2 With Half a Billion Passwords
on Wednesday February 21, 2018 @05:04PM (#16433403)
On my machine this produces
(STDIN)= 5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8
Which is obviously not what you want. So I changed it to: echo -n "$password" | openssl sha1 -binary | xxd -p -u
Re:Xerox Alto zero-day: cracking disk password protection on a 45 year...
on Friday January 05, 2018 @02:38AM (#16077188)
There's a decent chance the passwords you found aren't the actual passwords either, considering how easy it is to generate collisions for the hash function.
Re:Write a hash table in C
on Wednesday August 23, 2017 @06:41PM (#15085827)
"(long)pow(a, len_s - (i+1))" is both inefficient and inaccurate. You should store the current power in a variable which you multiply by 'a' and reduce by 'm' on each iteration.
Also, your double hashing scheme has a bug. You identified that it's problematic if hash_b returns 0, but adding 1 to the result doesn't actually solve anything, because now you have the same problem if hash_b returns num_buckets-1.
Re:Bitcoin Surpasses $4,000, Reaches Another Milestone
on Sunday August 13, 2017 @02:27AM (#15001776)
Not sure how you came up with 5 cents but I get $1.36:
4000 dollars/btc * 10^-8 btc/satoshi * 150 satoshi/byte * 226 bytes/transaction = $1.356 per transaction
Re:The Hunting of the SNARK – Zero-Knowledge Proofs Introduction
on Monday July 17, 2017 @12:34PM (#14790062)
The solution to 1.1 is incomplete - Alice can set p=1 and q=n
Re:The Rule of 72 (2007)
on Thursday June 23, 2016 @03:47PM (#11963841)
I prefer the approximation (4+832/N), which gives its result in months. Not as easy to do in your head but it's quite accurate.
Re:Lock freedom without garbage collection in Rust
on Thursday August 27, 2015 @10:29PM (#10133441)
A couple years ago I saw a 3.5x improvement migrating a lockfree skiplist from hazard pointers to epochs. The problem with hazard pointers is that they require memory barriers after every assignment, whereas epochs only require one at the start.
Re:Quantum Computing Primer
on Friday August 21, 2015 @05:27PM (#10100364)
A study published in Science in June 2014, described as "likely the most thorough and precise study that has been done on the performance of the D-Wave machine" and "the fairest comparison yet", found that the D-Wave chip "produced no quantum speedup".
Re:Build a 300-Mile Wall Around SF During Burning Man
on Wednesday August 05, 2015 @03:31PM (#10012234)
The "quarter mile stretch of wall all to your own" reward already has over 16k backers. How are they planning to deliver when the wall is only 300 miles?
Re:Our perfect submission
on Thursday June 04, 2015 @04:02PM (#9661674)
IPSC 2014 problem E looks like a machine learning problem, but the intended solution was to make multiple submissions and use the judge feedback to reverse-engineer the test data. The winning team needed only 6 submissions to hit 95% accuracy. It was one of my favourite problems from the contest.
Re:Marilyn vos Savant and the Monty Hall Problem
on Thursday February 19, 2015 @11:26PM (#9078909)
What many descriptions of the problem leave out is that it is critical that Monty knowingly picks a door with a goat. If Monty chooses at random, then the winning odds do indeed increase to 50% if he happens to open a door with a goat behind it.
The randomized variant, by the way, tends to garner roughly the same degree of "you're completely wrong" responses when given to people who know just enough about the normal Monty-hall problem not to be fooled by it.
Re:Technical interviews and the Towers of Hanoi
on Monday January 05, 2015 @06:05PM (#8841855)
I removed the free() call because it was crashing. I also added a cast to the malloc() because I was compiling in C++. Compiled with
g++ -o hanoi hanoi.cpp -O2 -lrt
Re:Technical interviews and the Towers of Hanoi
on Monday January 05, 2015 @04:56PM (#8841476)
Here's an iterative solution which is shorter and 3 times as fast:
void iterative(int n)
{
int from[2][3] = {{0,1,2},{0,2,1}};
int to[2][3] = {{1,2,0},{2,1,0}};
for(int i=1; i<1<<n; i++)
{
int disk = __builtin_ctz(i);
int count = (i>>(1+disk))%3;
int parity = (disk^n)&1;
move(from[parity][count], to[parity][count]);
}
}
Re:Ifs and &&s and Plan 9's Source Code
on Friday May 24, 2013 @04:09PM (#5764949)
And what's the alternative for if(A && B){ x(); }else{ y(); }? Seems very easy to shoot yourself in the foot with this approach.
Re:The theory of relativity in words of four letters or less
on Friday May 17, 2013 @04:49PM (#5726627)
There are many interesting pages on this site. The brainfk and Intercal resources are a fun read, also the tiny executables. The Tile World downloads are a bit out-of-date though.
Re:The McDonald's Theory of Bad Ideas
on Wednesday May 01, 2013 @12:09AM (#5636395)
Congress tried this...and we got the sequester.
Re:Ruby is too slow for programming competitions
on Sunday April 21, 2013 @05:01PM (#5586393)
I participated in this contest, and solved this problem. The problem with the post is that it's basically saying "This correct ruby program is way slower than this incorrect go program, therefore ruby is bad for programming competitions". Obviously not a valid argument.