HNHacker News
TopNewBestAskShowJobs

knappa

273 karma · joined June 3, 2016

submissionscomments
knappa··on Algebra, Topology, Differential Calculus, and Optimization Theory [pdf]
There are different sum- and product-like operations for different types of things: For sets (and topological spaces), the sum operation is the disjoint union and the product is the Cartesian product. For vector spaces, the sum operation is the Cartesian product and the product operation is the tensor product.

If you think of finite dimensional vector spaces as functions on finite sets, then these all match up. i.e. if V (vector space) is the functions on S (set) and W (vector space) is the functions on T (set), then the functions on S⊔T are V⊕W because you just list the values of the functions on S and then on T. Further, you can see that functions on S×T are V⊗W since the natural basis for V⊗W consists of vectors e_s⊗e_t that pick out elements (s,t) ∈ S×T.

knappa··on Algebra, Topology, Differential Calculus, and Optimization Theory [pdf]
It's the unique thing that makes the commutative diagram from the wikipedia article work. As in: You want V⊕W to be a vector space that contains the vector spaces V and W. You want that for any linear maps V → U and W → U, you get a linear map V⊕W → U which agrees on the inclusions. Since these maps can be arbitrary, you know that dim(V⊕W)≥dim(V)+dim(W) since you can't have any colinearities between the images of V and W in V⊕W. Plus you want that the map V⊕W → U is unique. This means that the images of V and W span V⊕W. Otherwise you have another vector that you can send to arbitrary places. This all means that V⊕W must be a vector space that has dim(V⊕W)=dim(V)+dim(W). Now all you have to do is provide a concrete candidate for V⊕W and the set of ordered pairs (v,w)∈V×W with coordinate-wise addition (+etc.) works.
knappa··on Algebra, Topology, Differential Calculus, and Optimization Theory [pdf]
> It is unfortunate coincidence, but Haskell sum types don't correspond to sums of spaces.

It depends on the perspective. Both are a form of coproduct https://en.wikipedia.org/wiki/Coproduct which forms a disjoint set for types (and sets and topological spaces) while forming a direct product for vector spaces. Confusingly, the vector space sum is a product of sets. (but you can see that it is an addition when you look at the resulting dimensions) The product operation for vector spaces is the tensor product.

knappa··on Algebra, Topology, Differential Calculus, and Optimization Theory [pdf]
Yes, this looks like an error. You don't want unordered pairs, which do not form a vector space, but an isomorphism of under order permutation of the terms. Roughly speaking, V⊕W is not the same as W⊕V, but if you swap the order everywhere then math won't notice.
knappa··on How not to teach recursion (2021)
Eventually your (for example) great*N paternal grandfather is going to show up on your mother's side, forming a loop. That's just due to bounds on the human population and how the number of labels for previous generations grows exponentially backwards in time.
knappa··on Pre-Allocated Lists in Python

  In [1]: length = 10_000

  In [2]: %%timeit
     ...: pre = [None] * length
     ...: 
     ...: 
  38.7 µs ± 128 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)
  
  In [3]: %%timeit
     ...: pre = np.empty(length, dtype=int)
     ...: 
     ...: 
  1.32 µs ± 6.59 ns per loop (mean ± std. dev. of 7 runs, 1,000,000 loops each)
knappa··on Lead exposure from routine consumption of coffee and tea from ceramic mugs
Beware the Green Decorative mug!
knappa··on Convolution Is Fancy Multiplication
Let me show you some things: https://en.wikipedia.org/wiki/Multiplication_algorithm#Fouri... https://en.wikipedia.org/wiki/Sch%C3%B6nhage%E2%80%93Strasse...
knappa··on Intro to Fully Homomorphic Encryption
I'm always confused by people complaining about knowing 'advanced' mathematical notation. The thing that requires effort to understand is the actual mathematics, not the notation.
knappa··on Can 1/3 and 1/3 = 2/6? It seemed so
From a 'not currently in front of the class' perspective, it's pretty clear what the student meant by 1/3 + 1/3 = 2/6. They were taking + to mean something like a general 'and' or combining action, not in the strict sense of standard fraction addition. It even has a name in mathematics, 'Farey addition'.

The kids clearly want to write it in shorthand, so maybe the thing to do is to come up with another symbol for this similar but distinct operation. For example, ⊕.

knappa··on Symbolic Maths in Python (2017)
Sagemath includes a lot more math, esp. number theoretic stuff, and is a quite large. (~1.6G compressed) Sympy is _much_ smaller and integrates more easily into python code that isn't solely mathematical.
knappa··on SAT Scores Fall as More Students Take the Test
Thank you, the corresponding Washington Post article (which I have access to) does not seem to have that information.
knappa··on SAT Scores Fall as More Students Take the Test
A more interesting statistic would be the (percentage) change in the number of students whose scores indicate that they are college-ready. Increasing that number is, presumably, what these get-more-kids-to-take-the-SAT programs are about.
knappa··on Mathematical Jargon Failures
"Cobordism" is actually more descriptive than he thinks, but it is French derived. "bord" means edge or boundary and a cobordism is something which connects two boundaries.
knappa··on Suse is once again an independent company
It was my first exposure to linux; the 1994 version.
knappa··on Simpson’s Paradox (2016)
The sex-discrimination lawsuit against UC Berkley seems to be a kind of academic urban myth; the administration was apparently afraid of such a lawsuit and the study was done in response to those administrative fears.
knappa··on GNU Octave 5.1.0
Is there a story behind why the version numbers went from 4.4 to 5.1?
knappa··on What Is Differentiable Programming?
I don't think you mean to use a term as strong as diffeomorphism. A diffeomorphism is differentiable, sure, but it is also invertable with a differentiable inverse. They have a lot of properties that machine learning honestly does not want, like preservation of dimension.
knappa··on To protect kids, don’t send report cards home on Fridays
That's a lot of overlap of those confidence intervals in Table 3.
knappa··on The weird and wonderful world of constructive mathematics (2017) [pdf]
Well, x mod 1 is just x minus a series of Heaviside step functions, each of which are non-constructive. The core problem is determining if your real number x is equal to an integer. You might be able to prove that x is close to a particular n, but there may not be a constructive proof of either x<n, x=n, or x>n. Hence you don't know if x mod 1 should be x-(n-1) or x-n.
knappa··on Rust Ownership Explained with Python
Unfortunately, tee's are backed by a queue and upon each read of a "fresh" value from one of the branches of the tee, the shared queue is appended to. There is no opportunity to remove an element from the queue until all branches of the tee have consumed it, so this will end up using O(n) memory as squares_min is completely consumed before squares_max is accessed. (Alternatingly calling next on the branches of the tee will solve the issue.) See the "Roughly equivalent to" and immediately previous text in your link.
knappa··on A PhD should be about improving society, not chasing academic kudos
A lot of this seems ridiculous:

> Mental health issues are rife: approximately one-third of PhD students are at risk of having or developing a psychiatric disorder like depression.

The baseline percentage of the population which experience depression (and other mental illness) each year is known to be pretty high -- and highest in for people in their 20's. One third sounds fairly normal; at any rate, there is a burden here to show that this is an exceptional proportion.

> For instance, a PhD in Germany is supposed to take three years, according to university regulations, but most students need five years to complete one.

If you are starting from an undergraduate degree, you probably need at least two years to take the PhD intro classes. One year to start a research program might work in a subject like the author's where your papers are chats about social implications, but there are plenty of subjects where even the data collection is going to take longer than that.

> In the US, meanwhile, the average completion time for a PhD in education sciences surpasses 13 years.

These programs are dominated by people who are working teachers, working on PhDs part-time.

> One study found that for every 200 people who complete a PhD, only seven will get a permanent academic post and only one will become a professor.

Being a professor is only one possible goal and for some fields, it isn't even the primary one.

knappa··on Evolving Floorplans
I like it, despite the infeasibility. Here are a few more things missing from the plan: 1) The main door should be by the admin offices, for security reasons. 2) The gym has to be rectangular for the basketball court, or large enough that it can contain it. 3) One of the gym's looks slightly non-convex, which is pointless. (Although that might be an artifact of rendering the door.)
knappa··on Why Philosophers Should Care About Computational Complexity (2011) [pdf]
No it isn't unsound, it is an application of the pigeonhole principle. A finite memory and finite set of states implies that there are some finite number of configurations (call it N) that the computer can be in. Once you let the computer go N+1 steps, there must be at least one repeated configuration; which might be halting or not.
knappa··on Jane Street Puzzles
I haven't thought it through yet, but Pick's theorem ( https://en.wikipedia.org/wiki/Pick%27s_theorem ) might be useful for the current puzzle.
knappa··on Trillions of Viruses Fall from the Sky Each Day
I would think that the virii that have that kind of prevalence are mostly bacteriophages.
knappa··on What makes a tree a tree?
https://imgur.com/a/czq93
knappa··on London murder rate overtakes New York for first time ever
Not according to the article. (Well, they compare different time scales. So...maybe?)

> While New York City's murder rate has gone down - decreasing by around 87 per cent since the 1990's - the Big Smoke’s has simultaneously surged. London's has increased by nearly 40 per cent in the space of three years alone - not including deaths caused by terrorist attacks.

knappa··on A History of Capacity Challenges in Computer Science [pdf]
Having watched a few rounds of CS faculty searches, I'm certain the shortage will still be there. (At least at my university.) The reasons are more or less what you mention, but objectively, it really isn't a particularly difficult life and teaching can be fun - especially when you hire a student to grade.
knappa··on Why is writing mathematical proofs more fault-proof than writing code? (2011)
Mathematician here: It isn't exactly that proof assistants are looked down upon. Rather, most of us don't do 1st order logic and it isn't on anybodies radar. Even if it were, it is often new proof techniques that lead to new interpretations, generalizations and discoveries about what we should be trying to prove in the first place. It is very hard to interpret a wall of 1st order logic.

Not to mention decidability issues.

← PreviousPage 2 of 3Next →