785 karma · joined Jan 15, 2011 (15y ago) · 257 submissions
comment 12y ago · link · parent
This is actually a great example, because it doesn't need excluded middle. Equality of rational numbers is decidable, which means that classical reasoning is provable. And yes, even if it wasn't, it would still work.
Edit: Ok, this was apparently confusing, so let me repeat it here. Yes, the same proof works. This form of excluded middle is entirely unproblematic.
comment 12y ago · link · parent
This means that classical mathematics still works as expected, so long as you have the assumption that you are working with things that are "set-like". Additionally you can make any type "set-like", since this amounts to manually collapsing its equality type.
However... the truth is that most of the time excluded middle is unnecessary (in a type theory). Having nice equality types is so much more useful that, honestly, you are not making an informed decision.
comment 12y ago · link · parent
Briefly, in Martin-Löf type theory equalities are very strong, but you do not have many tools for proving new equalities. Univalence is one answer to this problem. So the choice is roughly between "having more equalities" (univalence) or "making everything decidable" (excluded middle).
Additionally, in HoTT you can embed classical set theory at "h-level 1". Basically, you get a slightly weaker form of excluded middle + choice, which is nevertheless sufficient for building a model of classical ZFC. The reverse is not possible, as far as I know.
comment 12y ago · link · parent
This has little to do with the reason for constructive logic in HoTT or any type theory. Models of type theory collapse if you add excluded middle and you cannot interpret the resulting structure in any particularly useful way. Without excluded middle you have more freedom in designing new axioms.
This is the reason why HoTT is constructive: You have a choice between classical logic and univalence. The latter turns out to be more useful.
comment 12y ago · link · parent
Performance improved as a result. The number they give is ~20%. The other nice thing was that you could use D3D10+ on Windows XP...
comment 12y ago · link · parent
Outside of machine learning solving a convex relaxation of a discrete optimization problem and then trying to round the result is one of the standard techniques in optimization. This is used all over the place, from straightforward linear relaxations for ILPs through the semidefinite relaxations of problems such as max cut. You start with an intractable problem, embed it into a tractable problem and use the result to gain information about the solutions to your original problem.
comment 13y ago · link · parent
Given your social network, and training data consisting of the public members of a group you can use a semi-supervised learning algorithm to determine group membership. Since social networks have a small diameter and the public members are typically well connected, you would expect this approach to be fairly accurate. Or rather, accurate enough to act on, if you do not need to provide legal justification for your decision.
What's the required legal justification for putting someone on a no-fly list?
If you want to give some real world basis to the legal distinction you need oversight and transparency. In particular, global analysis of the whole dataset must be illegal, since it pretty much corresponds to total surveillance. Your results might not be completely accurate, but they don't need to be if you can act once you have something like 51% confidence.
comment 13y ago · link · parent
Writing a global variable is a side effect, because you change something other than the return value of a function. Reading would still break functional extensionality: Calling a function with equal arguments might yield different results in different contexts.
comment 14y ago · link · parent
To avoid any fluff, let's go with a concrete example: some of the best performing algorithms for segmentation are based on spectral clustering (http://en.wikipedia.org/wiki/Spectral_clustering). What does an eigenvector corresponding to the second-smallest eigenvalue of the normalized graph laplacian have to do with random walks? How do you compute it?
comment 14y ago · link · parent
On the other hand, with address space layout randomization this is almost impossible to exploit. Furthermore, without ADSR and stack canaries you can use return oriented programming to circumvent the lack of writable & executable memory.
comment 15y ago · link · parent
For instance, you don't have to do a rehashing step, which is important for real time applications. Memory usage is also very deterministic at 2*(n-1) words in an n element table (with 2 words per node).
If none of this matters to you and you merely want a map with fast lookups then a simple hash table is probably a better choice.
comment 15y ago · link · parent
At the same time you will not need rehashing once the table "fills up" and since you use don't discard bits from the hash function the expected number of collisions after inserting n elements with a 32 bit hash is n / 2^32 - or 0 for reasonable values of n.
Additionally you can use clustering (e.g. build a crit-nibble tree, with 16 pointers per node - one 64 byte cache line) to reduce the number of cache misses. This can backfire spectacularly unless the data is essentially random, so the hashing step remains important.
It may not be a silver bullet, but there are some interesting trade-offs.
comment 15y ago · link · parent
If you call a nested function it has to know the frame address of the containing function in order to refer to its local variables. So if you take the address of such a function the program actually receives the address of a "trampoline": a small sequence of instructions which first loads the frame address and then calls the real function.
The trampoline itself is generated dynamically and putting it on the stack turns out to be cheaper than heap allocating it.
comment 15y ago · link · parent
This is similar to the behavior of array accesses in Java: If you access an invalid index the JVM is required to throw an out of bounds exception. In practice this would be unacceptably slow and if the compiler can prove that such an exception can never happen, the check will be removed.
As for the "simple" example of testing "y == 0", this is actually already undecidable. If you are interested, you might have a look at Nielson's "Principles of Program Analysis", I think that this particular example (undecidability of MOP Constant Propagation) is worked out there. Also, the book is a nice introduction to the subject.
comment 15y ago · link · parent
Now I'm reasonably certain that the C standard does not allow inline assembly like this. However, given the decades of legacy software that Microsoft has to contend with I would not be too surprised if this was part of the reason.
By the way, GCC's computed gotos are not actually much better. In this case you get a control flow graph where you cannot split all critical edges. There is a workaround for this, but it's probably easier to just disable all optimizations that depend on it.
comment 15y ago · link · parent
Instead, the authors describe the semantics as an extension of lambda calculus. This is both more compact and more useful to other researchers (who might not be working on an ML dialect).
That said I would be grateful to you or anyone with a backup who could restore the article. Looking at the google cache for this page, it was more than a stub and actually did link to a page with references...
Alice is still one of the first semester languages for CS students at Saarland university. I think it would be advantageous if you could find information about related languages and additional features on Wikipedia.
comment 15y ago · link · parent
- From an input sequence of length n, choose a random subsequence of length k.
- Sort the subsequence.
- Partition the remaining (n-k) elements of the original sequence into the (k+1) partitions given by the subsequence.
- Sort the (k+1) partitions.
In the paper, the partitioning and sorting is always done using quicksort. Any n*log(n) sorting algorithm should work though, which includes using samplesort recursively.
If you use an optimal value for k (and this might be a significant fraction of n), you can prove that lim_{n->infty} E(C_n)/log(n!) = 1, where E(C_n) is the expected number of comparisons for a sequence of length n.
Now, using samplesort recursively, quicksort is samplesort with k = 1. Double-Pivot quicksort is samplesort with k = 2.