Search found 491 matches

by >-)
Sat Jul 01, 2017 7:10 pm UTC
Forum: Mathematics
Topic: distribution of a quadratic function of a multivariate normal
Replies: 2
Views: 570

distribution of a quadratic function of a multivariate normal

if x is drawn from a multivariate normal with mean mu and covariance sigma, what's the distribution of z = x.T P x (.T denotes transpose and P is an arbitrary square matrix) i suspect that f(z) = ∫ p(x) dx where the integral is over all x such that x.T P x = z but i'm not sure how to carry out this ...
by >-)
Tue May 30, 2017 4:37 am UTC
Forum: Mathematics
Topic: properties of a certain game
Replies: 2
Views: 669

Re: properties of a certain game

thanks for the observations. i actually played a few test games against a friend yesterday and did notice the things you mention (though that may just be confirmation bias). hastily written code attached. in a spoiler tag, because the forum wouldn't let me attach any files for some reason #!/usr...
by >-)
Fri May 26, 2017 2:52 pm UTC
Forum: Science
Topic: Superconducting CPU?
Replies: 66
Views: 2644

Re: Superconducting CPU?

i don't see any reason why, here's the wikipedia page on it
https://en.wikipedia.org/wiki/Superconducting_computing
by >-)
Fri May 26, 2017 2:39 am UTC
Forum: Coding
Topic: Neighbors of a cluster: What is this called?
Replies: 8
Views: 1083

Re: Neighbors of a cluster: What is this called?

one way to get it down to about O(nk) where n is the number of points and k is the number of close-to-B points is by doing a dijkstra like algorithm. first treat the points as a graph with n vertices and n^2 edges. then run dijkstra, but start with the set B instead of the singleton set containing t...
by >-)
Thu May 25, 2017 2:42 pm UTC
Forum: Mathematics
Topic: Interesting question regarding Fermat nested radicals
Replies: 9
Views: 896

Re: Interesting question regarding Fermat nested radicals

here's the corresponding OEIS page and it provides a an alternate equivalent formula which looks much easier to work with and also a efficient algorithm

https://oeis.org/A273580

and a lookup in https://isc.carma.newcastle.edu.au/advancedCalc gives no results ;(
by >-)
Thu May 25, 2017 6:38 am UTC
Forum: Mathematics
Topic: properties of a certain game
Replies: 2
Views: 669

properties of a certain game

this is a two player, zero-sum game. the state is 2 vectors and two scalars (one vector and scalar per player). call the vectors x and y and the scalars p and q respectively. x and y have some fixed dimension k. (and if it makes things easier, feel free to let k be infinite) player 1 wins if p > 0 a...
by >-)
Sat May 20, 2017 3:16 pm UTC
Forum: Mathematics
Topic: Any machine learning folks on this forum?
Replies: 3
Views: 806

Re: Any machine learning folks on this forum?

linear regression models are pretty fundamental and widely used -- in fact, my school has an entire semester long course on various forms of linear regression. and i would bet that in terms of "number of times applied", this would be the winner two other good ones are decision trees + thei...
by >-)
Mon May 01, 2017 6:41 pm UTC
Forum: Mathematics
Topic: Halting Problem
Replies: 200
Views: 6078

Re: Halting Problem

(y, y) is a pair, which is encoded as string x, so x = <(y,y)> which i've written with a bit of notation abuse as x = <y,y>
by >-)
Mon May 01, 2017 5:30 pm UTC
Forum: Coding
Topic: Basic Question Involving Functions (Python)
Replies: 18
Views: 2520

Re: Basic Question Involving Functions (Python)

if the function name is fn, you can run the command help(fn) to print out instructions and information on what inputs it takes. google is also another resource
by >-)
Mon May 01, 2017 5:21 pm UTC
Forum: Mathematics
Topic: Halting Problem
Replies: 200
Views: 6078

Re: Halting Problem

try to think of them as physical machines instead of programs. a machine takes in a string as an input, and spits out yes, no, or loops forever now if you try to put one machine D inside another machine M, that's not possible, because machines can only take string as input. so what we do instead is ...
by >-)
Mon May 01, 2017 5:16 pm UTC
Forum: Mathematics
Topic: Halting Problem
Replies: 200
Views: 6078

Re: Halting Problem

yes, we write D to represent the program (program-use), and <D> to refer to the "string-use" (aka encoded) version of D
by >-)
Mon May 01, 2017 5:06 pm UTC
Forum: Mathematics
Topic: Halting Problem
Replies: 200
Views: 6078

Re: Halting Problem

yes, that makes sense. it will help to understand the idea of encoding something often, we want programs to take other mathematical objects as input, such as pairs of numbers, lists of pairs of numbres, or even other computer programs however, formally, computer programs can only take strings as inp...
by >-)
Mon May 01, 2017 4:59 pm UTC
Forum: Mathematics
Topic: Halting Problem
Replies: 200
Views: 6078

Re: Halting Problem

no, i don't think so. but there are not that many programs and arguments. we have M, the halting problem solving program, which takes the bare minimum it needs! it only takes the program and the input you want to test. then we have D, the program which we are designing to mess up M. D only takes a s...
by >-)
Mon May 01, 2017 4:54 pm UTC
Forum: Mathematics
Topic: Halting Problem
Replies: 200
Views: 6078

Re: Halting Problem

it's not super important, but under the turing model of computation, turing machines (aka computer programs) take exactly one string as an input. of course, if you want to feed a machine two inputs, you can just combine the two inputs and put a delimiter between them. for example, you might feed two...
by >-)
Mon May 01, 2017 4:49 pm UTC
Forum: Mathematics
Topic: Halting Problem
Replies: 200
Views: 6078

Re: Halting Problem

what i gave is a proof-by-contradiction type proof. just try to follow all the inputs and explain where you get stuck -- there are only two machines, each of which takes one input (well M takes one pair...)
by >-)
Mon May 01, 2017 4:46 pm UTC
Forum: Mathematics
Topic: Halting Problem
Replies: 200
Views: 6078

Re: Halting Problem

What I'd like to make sense of now is the program-within-a-program paradox Here's a pretty standard proof I think. I'll use <> angle brackets to denode encoding. First we suppose that we have some program M, such that M(x) tells us if the program and input pair encoded by x will halt. In other word...
by >-)
Mon May 01, 2017 4:32 pm UTC
Forum: Mathematics
Topic: Halting Problem
Replies: 200
Views: 6078

Re: Halting Problem

well suppose you wrote a program to multiply two numbers. it doesn't make much sense to talk about whether the program halts, because it won't really do anything unless you give it some input (the numbers to be multiplied). even the empty string is a valid input, of course formally, the halting prob...
by >-)
Mon May 01, 2017 4:27 pm UTC
Forum: Mathematics
Topic: Halting Problem
Replies: 200
Views: 6078

Re: Halting Problem

That is a great explanation, thank you. What I'm stuck on is the standard explanation in which one assumes that there's a program that can tell you whether any particular program fed into it will halt (or not halt). That's where I get hung up. the proof usually follows this logic: suppose it is pos...
by >-)
Mon May 01, 2017 2:56 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9708
Views: 1447388

Re: Coding: Fleeting Thoughts

just to eek that last bit of performance out of python, i manually inlined all my helper functions into one single monstrous blob of code. just about doubled the speed too, which is way more than i expected, but it still wasn't good enough, so i had to rewrite it in c++
by >-)
Mon May 01, 2017 2:20 am UTC
Forum: Mathematics
Topic: Math/Cryptography Questions
Replies: 8
Views: 712

Re: Math/Cryptography Questions

no, it is possible to quickly prove that a number is prime without trying to factor it! the first (and possible only known) deterministic algorithm for doing so is the AKS primality test https://en.wikipedia.org/wiki/AKS_primality_test for some intuition, suppose i randomly generate a function f whi...
by >-)
Mon May 01, 2017 2:11 am UTC
Forum: Mathematics
Topic: Math/Cryptography Questions
Replies: 8
Views: 712

Re: Math/Cryptography Questions

polynomial means the running time grows polynomially in the size of the prime you want to generate. for example, if the polynomial were n^2, you could guarantee testing if a 4096 bit number is prime would take not more than 4^2 = 16 times as long as testing a 1024 bit number factoring is not known t...
by >-)
Mon May 01, 2017 2:02 am UTC
Forum: Mathematics
Topic: Math/Cryptography Questions
Replies: 8
Views: 712

Re: Math/Cryptography Questions

1. yes, it is much easier to test if a number is prime (polynomial), than it is to factor a prime (unknown if polynomial). even though factoring a prime is not known to be NP-complete, this is kind of like many other NP-complete problems, where something like finding the shortest traveling salesman ...
by >-)
Sat Apr 01, 2017 4:40 pm UTC
Forum: Computer Science
Topic: Deliberately bad algorithms
Replies: 120
Views: 29093

Re: Deliberately bad algorithms

I guess it's just convention really, since i've only ever seen log log n written as log log n
by >-)
Wed Mar 29, 2017 1:57 am UTC
Forum: Mathematics
Topic: behavior of best estimator on some constructed mixture distribution
Replies: 3
Views: 1108

Re: behavior of best estimator on some constructed mixture distribution

can you explain why the mixed distribution has some oher best estimator? is it based off of intuition or some paper?

thanks
by >-)
Mon Mar 27, 2017 8:38 pm UTC
Forum: Computer Science
Topic: Deliberately bad algorithms
Replies: 120
Views: 29093

Re: Deliberately bad algorithms

because a binary counter going from 1 to n needs at least log n bits. I'm not sure how cpp iterators are implemented, but they are probably just 64 bit datatypes, in which case do not actually solve this problem correctly for graphs with more than 2^64 vertices ive always written it as log^2 n as op...
by >-)
Mon Mar 27, 2017 3:05 pm UTC
Forum: Computer Science
Topic: Deliberately bad algorithms
Replies: 120
Views: 29093

Re: Deliberately bad algorithms

Yes, that is indeed where the extra log factor comes from. And it does work for both directed and undirected versions -- I was just mentioning at the end that in the undirected case, there is an even more efficient algorithm which runs in just log n space.
by >-)
Sun Mar 26, 2017 10:12 pm UTC
Forum: Computer Science
Topic: Deliberately bad algorithms
Replies: 120
Views: 29093

Re: Deliberately bad algorithms

i learned this algorithm for finding a path from vertices s to t in a graph in class recently: //is there a path of length at most k from s to t? loop over vertices w in V: recursively compute if there is a path from s to w with length at most ceil(k/2) recursively compute if there is a path from w ...
by >-)
Thu Mar 16, 2017 7:55 pm UTC
Forum: Mathematics
Topic: behavior of best estimator on some constructed mixture distribution
Replies: 3
Views: 1108

behavior of best estimator on some constructed mixture distribution

I'm taking a course in statistical inference. We showed in class that: 1. the best estimator for the mean of a normal distribution (and probably most common distributions?) is the sample mean 2. the best estimator for the range of a uniform distribution which goes from 0 to theta involves multiply t...
by >-)
Tue Mar 07, 2017 1:39 pm UTC
Forum: Mathematics
Topic: vertex cut / graph / combinatorics problem
Replies: 5
Views: 1155

Re: vertex cut / graph / combinatorics problem

wow, that looks like a pretty solid proof to me, thanks! for the last part, we can do it rigorously by induction clearly, the first path of the villian is at least as high as q1 in all countries then when considering the qk and vk (the villian's kth path), we know that q(k-1) <= v(k-1) then delete a...
by >-)
Mon Mar 06, 2017 9:25 pm UTC
Forum: Mathematics
Topic: vertex cut / graph / combinatorics problem
Replies: 5
Views: 1155

Re: vertex cut / graph / combinatorics problem

I'm not quite sure that works out for example, consider 3 countries and the elevation of their cities: country 1 has 10 5 4 country 2 has 9 8 3 2 country 3 has 7 6 1 then your method removes nothing, and shuts down 3 airports (either in country 1 or 3) whereas the greedy strategy removes the path 10...
by >-)
Mon Mar 06, 2017 6:05 pm UTC
Forum: Mathematics
Topic: vertex cut / graph / combinatorics problem
Replies: 5
Views: 1155

vertex cut / graph / combinatorics problem

suppose there are a bunch of countries, each containing a set of cities, and each city has an elevation (all distinct). also suppose someone on a glider wants to visit exactly one city from every country. obviously, since she's on a glider, she can only go from higher elevation to lower elevation ci...
by >-)
Mon Feb 27, 2017 7:10 pm UTC
Forum: Mathematics
Topic: Help with a 9 Variable Equation
Replies: 6
Views: 1317

Re: Help with a 9 Variable Equation

what exactly do you mean by proportion of a variable and H? is it the ratio?
by >-)
Mon Feb 27, 2017 12:36 pm UTC
Forum: Mathematics
Topic: WoW: A Strange Game. The only way to win is not to play.
Replies: 7
Views: 1433

Re: WoW: A Strange Game. The only way to win is not to play.

I would think evo algs are better than most optimization algs at dealing with highly nonconvex functions, since if an individual does take a step in the wrong direction and becomes terrible, it is immediately eliminated. plus in the vast majority of cases, deviating a strategy should result in prett...
by >-)
Wed Feb 22, 2017 10:43 pm UTC
Forum: Computer Science
Topic: Why don't we use composite hashes?
Replies: 5
Views: 1442

Re: Why don't we use composite hashes?

yes in that case, where you want to fake a certificate, definitely makes the security at least as good as before, because any algorithm which can create fake certificate for the concatenated hash also makes a fake certificate for all the component hashes
by >-)
Wed Feb 22, 2017 2:06 pm UTC
Forum: Computer Science
Topic: Why don't we use composite hashes?
Replies: 5
Views: 1442

Re: Why don't we use composite hashes?

i think it's possible that there could be some problems with this, even though it sounds pretty good in practice for example, suppose it just happened that (sha2(x) and md5(x)) xor sha1(x) = x (the first 256 bits of x, or something) [edit: just saw your bit in the post about m1 != m2, but isn't allo...
by >-)
Mon Feb 20, 2017 11:13 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9708
Views: 1447388

Re: Coding: Fleeting Thoughts

That sounds pretty horrifying, and i'm not sure it would run faster after all the overhead. Luckily, I was dealing with prime gaps, so even though the primes themselves had to be put in int64's, the gaps were nice and small enough to fit in a float edit: hmm, so according to nvidia's cuda documentat...
by >-)
Sat Feb 18, 2017 6:53 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9708
Views: 1447388

Re: Coding: Fleeting Thoughts

i've been playing around with brute force testing some open but obscure number theory conjectures on a high end GPU recently. the speedup is nice about 10x ... but not as much as expected. i think this is due to the relatively low int64 compute performance on a gpu compared to the float32 performanc...
by >-)
Tue Jan 31, 2017 1:15 pm UTC
Forum: Mathematics
Topic: variance of a sum of iid random variables
Replies: 2
Views: 1125

Re: variance of a sum of iid random variables

ah, nice spot, I'd somehow forgotten about those terms
by >-)
Tue Jan 31, 2017 4:04 am UTC
Forum: Mathematics
Topic: variance of a sum of iid random variables
Replies: 2
Views: 1125

variance of a sum of iid random variables

consider y_1 to y_n as i.i.d. random variables with mean u, and let X = sum 1 to n of y_i then E[X]^2 = (nu)^2 E[X^2] = E[(sum i = 1 to n of y_i)^2] = E[sum i, j from 1,1 to n,n of y_i y_j] = sum i,j from 1,1 to n,n of E[y_i y_j] (by linearity of expectation) = sum i,j from 1,1 to n,n of E[y_i] E[y_...
by >-)
Sun Dec 25, 2016 11:27 pm UTC
Forum: Mathematics
Topic: chain rules matrix derivatives
Replies: 2
Views: 1117

chain rules matrix derivatives

I have trouble with taking derivatives / gradients / jacobians of matrix expressions. I don't have any "formal education" in this area, and when I search, i can find a lot of identities, which don't help that much. My (naive) approach to finding the gradient of expressions ∇_x f(x) is 1. t...

Go to advanced search