User talk:Ledrug: Difference between revisions

 
(6 intermediate revisions by 4 users not shown)
Line 77:
Cudos for catching this! :) I remembered to fix the one thing but forgot about the other... Cheers. [[User:WillNess|WillNess]] 06:41, 3 December 2011 (UTC)
 
Is there any documentation for the version of the code that is written and runs as PERL? "[[User:Cacher|Cacher]] ([[User talk:Cacher|talk]]) 403:54, 5 August, 2014] (UTC)"
 
The setting up of the "property names and values" is straight forward, but the "constraints" section is a bit difficult to figure out.
Line 84:
Trying to set up the following variant of the puzzle:
 
# Puzzle: Given the following, where does everybody live?
 
# There is one house between the person eating potatoes and the person eating pancakes.
Line 105:
# The person smoking Cubans eats spaghetties.
 
# Answer: Should be: Spanish (4), German (5), Swede (3), British (2), Greek (1)
 
== Amazon links ==
Line 154:
::: What I wrote above was only to demonstrate how <math>p(1-p)</math> comes about; it's not actually how variance is derived. For that you need to take the binomial distribution, and calculate the variance of observed <math>n</math> (see [[wp:Variance#Binomial_distribution]]). When you throw <math>N</math> events, and receive <math>n</math> positives, the variance of <math>n</math> is <math>\mathrm{Var}(n) = Np(1-p)</math>. Without getting into too much details, let's say your result really means <math>N{\pi\over 4} = n\pm \sqrt{Np(1-p)}</math>, which leads to <math>\pi = {4n\over N} \pm 4 \sqrt{p(1-p)\over N}</math>, i.e., <code>error = sqrt(val*(1 - val)/sampled)*4</code>. I must admit that the first <tt>val</tt> in the original code is spurious; I don't know what I was thinking. But that shouldn't give an error that's off by orders of magnitude.
::: As a rule of thumb, sum of random samples deviates from "true" value by <math>\sqrt{N}</math>, while mean of random samples deviates by <math>1/\sqrt{N}</math>, as long as the distribution is something reasonable. This is why repeating an experiment many times reduces statistical uncertainty, but repeating too many times might not be worth the effort (because of the square root). Now I should go fix the code. --[[User:Ledrug|Ledrug]] ([[User talk:Ledrug|talk]]) 08:14, 18 May 2014 (UTC)
 
== Topographical Sort ==
 
 
Hi - just wanted to say thanks for doing the C version of the topological sort. I found it to be easier to follow than even some of the other "higher-level" implementations. Also the additional compile levels or layering of dependencies was exactly what I was looking for. Thank you!
 
== Total Area Circle - analytical solution ==
 
Hello i am beginning programmer, and your Total Area Circle Analytical solution is exactly what i need to solve a current problem i am working on, but i am working in C++ and cannot follow the Haskell code at all. I would like to ask you for your help writing it in C++, please? This was the only way method i could find to contact you. I hope to hear from you. Thank you. - vballhermie007
 
== Pentagram ==
 
Your PostScript entry is short and sweet, but it's not entirely correct. It doesn't fill the pentagon. [[User:Fwend|Fwend]] ([[User talk:Fwend|talk]]) 21:32, 21 April 2015 (UTC)
: It depends on what "fill" means. The code before used even-odd winding rule, which may be slightly unusual but I wouldn't exactly call it incorrect. I changed it to produce three different looking stars now, including one that's more likely to meet common expectations. --[[User:Ledrug|Ledrug]] ([[User talk:Ledrug|talk]]) 08:13, 22 April 2015 (UTC)
Anonymous user