Hacker Newsnew | past | comments | ask | show | jobs | submit | agrounds's commentslogin

Z is the ring of integers, t is a formal variable allowing us to discuss polynomials whose coefficients are in some ring. That’s what R[t] means: the ring of polynomials of the formal variable t with coefficients in R. Adding in t^-1 lets us include inverted terms like 2t^-3.

An algebra over a ring (call it S so we don’t confuse it with R from the previous paragraph) is a like a vector space over S, with the added structure that you can multiply elements of the algebra together (vector spaces only let you add their elements together). So for example the collection of even integers 2Z is an algebra over the ring of all integers Z. The collection of all polynomials with integer coefficients, Z[t], is another algebra over Z.

This is a great example of how dense language gets in math. There are tons of concepts hiding in the unstated background. Many are quite simple to explain individually, but there are so many of them that an outsider won’t know where to start to tease them apart. There’s a good reason to do it this way though; it would take a very long time to say anything in math without ever increasing levels of information density.


But... what is a ring? What is a formal variable? What is a vector space? What does "algebra over the ring" mean?

His point is the terms are dense too


Absolutely agree. All formal statements (like mathematical ones) are going to have some level of assumed background. And as the assumed background expands, the language naturally becomes more information dense.

As for your specific questions, I believe Wikipedia does a great job of answering two of them for a layperson:

https://en.wikipedia.org/wiki/Ring_(mathematics)

https://en.wikipedia.org/wiki/Vector_space

For the others, I’ll say that a formal variable is just a symbol (literally, like the letter t). With such a symbol, we can construct polynomials like 2t^2 - t + 3. Also, there’s no need to only use integers as the allowed coefficients; you can use any ring you like instead.

An “algebra over the ring R” is what I was attempting to define in my comment above. The algebra is “over” R if we can multiply an element of the algebra by an element of R. The useful analogy here is scalar multiplication in a vector space: you can multiply a vector by 2 to double it or -1/2 to reflect and shorten it. More generally, it makes perfect sense to consider some more general version of vectors which can be scalar multiplied by elements of any ring R.


Ah, t is a formal variable, a symbol, like the letter t.

Not like a drink with jam and bread.


My questions were mostly to agree it's hard to understand, but they were true ignorance.

I'm glad you answered them.

It finally makes sense to me, and now I realize I didn't even understand "over" in that context. That Ring wiki page though, um, nope... :D


> That Ring wiki page though, um, nope... :D

Fair enough! At a super high level, a ring is just a collection that has a similar structure to what you’re used to “numbers” having. That is, you can add, subtract, and multiply them. Not divide! If we restrict ourselves to just whole numbers then 2/3 is not allowed. We also require that something like 0 and 1 have to be there. “Like zero” means 0 + x = x for every x in your collection, and “like one” means 1x = x for every x. And lastly, we require that the distributive property holds.

Examples include the set of whole numbers (Z), the rationals aka fractions (Q), the reals (R), complex numbers (C). These are all infinite rings, but there are also finite rings such as the set of whole numbers modulo a fixed number n, denoted Z/nZ. For instance, Z/2Z has only two elements, namely 0 and 1, with rules like 1 + 1 = 0. There are also polynomial rings, like Z[t], whose elements are all polynomials with integer coefficients (e.g. 3t^3 - t - 2). You can add, subtract, and multiply such polynomials and the result is more polynomials, so this collection is indeed a ring.


> But... what is a ring? What is a formal variable? What is a vector space? What does "algebra over the ring" mean?

All these terms were taught to computer science (and of course math, physics, ...) students as part of getting their degree in computer science, because these concepts are important for many algorithms.


Having studied CS and maths to post-grad, I think you exaggerate. Although a CS course might use these tools, they didn't in my experience go into explaining or defining them. The only use of linear algebra I can remember was in analysis of recurrence relations for algorithms, and for some graph theory. And I had one CS course on multivariate generating functions (formal variables) but most CS students would have been terrified of that. Abstract algebra is also used in combinatorial or search algorithms, but they would never use terminology like "ring".


> Having studied CS and maths to post-grad, I think you exaggerate. Although a CS course might use these tools, they didn't in my experience go into explaining or defining them.

I studied computer science (and mathematics) in Germany. I am very certain that this was taught to computer science students, even though (compared to the lectures for math students) the lecturer did not get very deep into these topics.

> most CS students would have been terrified of that.

This is a feature, not a bug. :-)

Seriously: In Germany, the "math for ..." lectures often are intended to be "weed-out lectures" so that students who simply are not qualified for their major get to quit their degree course fast (either by realizing that the degree course is too hard for them, or by (typically) failing math exams so that they get exmatriculated), so that they don't waste many semesters on a degree course which they simply are not suited for.


Do you think weed-out courses are a good thing? If these courses are so important, they should be taught in a way that students can understand. If they made it to college, and can program, they're clearly smart and motivated.


> If they made it to college, and can program, they're clearly smart and motivated.

You clearly write from the perspective of the US-American university system.

In Germany, basically everybody can enroll into a computer science program at a university, assuming the person has a Abitur (Allgemeine Hochschulreife) certificate (these terms are difficult to translate into English) from the grammar school [1]. So, "have it made to college" is like "not having been a complete failure in school". [2]

So, making it to the university is no achievement in Germany, and also no sign of motivation either.

> If these courses are so important, they should be taught in a way that students can understand.

These courses are taught in a way that students can understand, but not in a way where you can afford to slack off.

It is basically a consensus in Germany that a university is clearly a wrong place for you if you are incapable of closing knowledge gaps on your own (for example by reading books from the library), and you don't have the self-motivation to sit over the lecture material for hours to finally understand it.

So yes, I would say that among the possible options, weed-out courses in mathematics are in my opinion likely the least bad one.

---

[1] In years where there was an insane demand for places at the university to study computer science such as during the dot-com bubble, there were some restrictions (numerus clausus), but for computer science, this was always the exception to the rule.

[2] There exist good reasons for puns like "Abitur: nichts gerafft und doch geschafft" (Abitur: Didn't get a thing, yet still passed) or "A-bier-tur" (a portmenteau of "Abitur" and "beer", which suggests that even pupils who are more into drinking than learning typically get their Abitur certificate).


I studied a lot of abstract algebra in college and grad school and I’m surprised that rings and algebras would come up in a CS degree. What algorithms topics used those concepts? Something about polynomials?


Algebra is useful because graphs are algebraic objects, and a lot of CS is about graphs, in particular search/planning. But no, I never saw rings mentioned except for generating functions, which are used for analysing recurrence relations.

For example in search algorithms where you want to search a space without visiting state nodes twice. Each state in the search space is produced by the sequence (a product of) of operators from the start state: elements of a monoid (or group if actions are invertible) which define the primitive steps. Trivial example being generating all permutations of a list. More interesting, enumerate all graphs with some property with pathwidth at most k, by adding one edge or vertex at a time. So now you want to know the structure of this group so you know which sequences of elements simplify and don't need to be tried, and you want to canonicalise each state to throw out duplicates.

And you can think in terms of orbits: if there are some symmetries then you might want to factor by the symmetry group and only visit one node in each orbit, grouping states into orbits with a single representative state. See eg. Pochter, Zohar and Rosenschein, Exploiting Problem Symmetries in State-Based Planners.


You are talking about (abstract) algebraic structures, and not about rings and algebras (over a ring or field)

> https://en.wikipedia.org/w/index.php?title=Algebra_over_a_fi...

> https://en.wikipedia.org/w/index.php?title=Algebra_over_a_fi...

> https://en.wikipedia.org/w/index.php?title=Associative_algeb...

The latter is what aground asked for in https://news.ycombinator.com/user?id=agrounds

> I’m surprised that rings and algebras would come up in a CS degree. What algorithms topics used those concepts?


Thanks for the reply, this is very illuminating. I never got to this depth in algorithms. I’m but a humble programmer with a math background, but no CS degree.


Rings:

* Determinant calculation:

- The Samuelson–Berkowitz algorithm is best understood in terms of general rings

- The Faddeev–LeVerrier algorithm and determinant calculation using Gaussian elimination work on rings with specific properties (for the Faddeev–LeVerrier algorithm the restriction is on the characteristic of the ring, for Gaussian elimination the ring must be an integral domain (ideally a field)).

* Ring-learning with errors (for post-quantum cryptography and homomorphic cryptography). Here, a specific ring is the central object.

* Number-Theoretic Transform (NTT): Basically a generalization of the Fourier Transform to the ring Z_n. Important for arbitrary-precision integer arithmetic

* Chinese Remainder Theorem. Often only formulated for the ring Z, but it can be generalized to larger classes of rings. Used for example in Shamir’s scheme for secret sharing (cryptography)

* The theory of BCH and Reed-Solomon codes uses a specific ring

* The AKS Primality Test (a really deep result in computational number theory) uses the ring Z_n[X]/(x^r-1).

---

Algebras:

Very often, a ring is constructed from another ring. Examples:

* the polynomial ring R[X_1, ..., X_n]

* The ring of (square) matrices over a ring R

So, using algebras in algorithms often means: "we want to make use use of this additional structure that our (more sophisticated) ring has)". (Associative) R-algebras formalize this concept of "ring with additional structure".

To just give one algorithm for polynomials:

* Buchberger algorithm for computing a Gröbner basis

Other examples:

* Clifford algebras for a lot of geometric problems (special case: quaternions (a 4-dimensional \mathbb{R}-algebra) for rotations in \mathbb{R}^3).

* If you are willing to also consider semi-rings (in this case: tropical semi-rings): the Floyd-Warshall algorithm for finding shortest paths and the Viterbi algorithm for finding the most likely sequence of states in a Hidden-Markov Model (HMM) can very elegantly formulated using the matrix semiring over the tropical semiring.


> The tropical semiring has various applications (see tropical analysis), and forms the basis of tropical geometry. The name tropical is a reference to the Hungarian-born computer scientist Imre Simon, so named because he lived and worked in Brazil.[1]

I'm convinced half the reason people find CS terminology more accessible and Math terminology less so, is that CS terminology tends to be named after stuff, and Math terminology tends to be named after people, and ... sometimes whether the place they lived is a tropical place.


> I'm convinced half the reason people find CS terminology more accessible and Math terminology less so, is that CS terminology tends to be named after stuff, and Math terminology tends to be named after people, and ... sometimes whether the place they lived is a tropical place.

In my opinion: a lot of math terminology is much older than computer science terminology, so the origin of the names of many concepts in math is much more obscure for today's people than CS terminology currently is (and least if you are not into history of science/math).

On the other hand, in my observation a lot more terms in computer science are based on obscure (often pop-cultural) puns. I guess in 50-100 years these CS terminology might seem even more obscure for then-contemporary people than math terminology is today.


(At least some) error-correcting codes are based on polynomials over finite fields. I couldn't say much more, but it's at least intuitively plausible since e.g. an nth degree polynomial is defined by any n+1 points, so if you know say n+1+p ("p" for "parity") points, you can lose up to p and still recover the polynomial.


I dunno, why own a car when you could ride your bike instead? They’re just different things and people may choose to use one over the other for a variety of reasons.


>if an AI is confidently telling you something wrong it's hard to work with.

But they all do that. It just comes with the territory. Grok will absolutely do the same thing another time you try it.


It is really, really genuinely concerning how many people think there are profound measurable differences between these things.

Like yeah tonally I guess there are. But with regard to references and information? You’re literally just using three different slot machines and claiming one is hot.

I suppose though I shouldn’t be that surprised then since Vegas and every other casino on Earth has been built on duping people in that exact way.


> You’re literally just using three different slot machines and claiming one is hot.

It's a fair point. I haven't tested many queries across them all and checked their answers, but if I want to ask one of them a question - right now its Grok just because I trust its answers more.


It's not a methodology problem, it's a test-ability problem. LLMs are not deterministic. You can ask the same question to the same LLM five times and you'll likely get at least 3 answers.

Again. Slot machine.


You can meaningfully test if one slot machine hits the jackpot more often than another, just that the methodology should involve a large number of repeats rather than a few anecdotes. There are some LLM leaderboard sites that do it with blind comparisons.


It sounds like you are claiming that all cars are the same, because cars


> Grok will absolutely do the same thing another time you try it.

True; it's just not happened yet. It will at some point though. With the Sunnypilot example it right out told me that it is not possible on that fork which I appreciated. The others all seem to hallucinate some setting.


humans make poor scientists. most people have already made a decision before they run any tests.

the smartest among them just make the tests complicated and biased; the less intelligent just cherry pick.

of course, would you really expect anyone to do real rsearch in this economy?


And everyone you ever want to share files with locally also has access to your home VPN?


There are dozens and dozens of cheap-looking restaurants in San Antonio with absolutely no online presence that will serve you the most delicious tex mex you’ve had in your whole life


Oh I meant Italian.


Thanks very much for sharing these notes. I studied algebraic topology in grad school but somehow avoided knot theory entirely. Reading these has sparked that feeling I had when I first got into topology.


This is a naive take. Are there specific instances involving individuals of many nationalities/ethnicities? Yes. Is ICE then ignoring race during its operations? Absolutely not. ICE agents are arresting people based solely on their physical appearance and accents. It is band faced racism.


If it was racism there would be extremely high false positive ratios. Is it observed?


Are you fucking kidding me? Pay attention.

ICE came into Maine with almost 2000 "targets". They arrested about 200 people. They ended up bragging about 17 "bad guys", and even that list is possibly filled with lies.

Some of the 200 arrested that weren't actually immigrants include a brown man who passed a background check and flew to Texas recently to fulfill immigration requirements to work for our local Law Enforcement. It includes tons of people who are legal residents and had papers on their person to that effect. Those papers are often left behind when the person gets kidnapped, which includes an unmarked van filled with ICE nuts screeching in front of someone's SUV in city traffic, jumping out, breaking the window to the SUV, dragging the man out, and speeding off, leaving a still running SUV sitting in the middle of the street, with papers. A literal kidnapping scene from a movie, but sure, totally normal and upstanding law enforcement activity. Our own cops, not exactly liberals, are finding it hard not to publicly call them stupid assholes. These cops are mostly Trump voters.

Don't stick your head in the sand and cry when people point out how uninformed you are. Their entire operation is almost entirely false positives. They've sent people who live here legally to other countries without authority.


It would be rather nonsensical to completely ignore ethnicity in your operations when the wide majority of illegal immigrants are going to be of that ethnicity. Obviously that would not justify widespread harassment of that group, but nothing like that seems to be happening. Mostly people seem to be trying to stop them from deporting people genuinely in the country illegally, which is divisive - independent of partisanship.

If the DNC has chosen this hill to die on, I don't think they're going to do anywhere as near good as they should do in November given Trump is engaging in some extremely unpopular and foolish behavior that people, again going beyond partisan lines, could easily rally together against.


> Obviously that would not justify widespread harassment of that group, but nothing like that seems to be happening.

Exactly that is happening in places ICE focuses on. Kawanaugh stops with, like, beating or multi day/week/months imprisonment are a thing.

With legal immigrants, strategy seems to be to hold them in as bad conditions as possible until they sign off own deportation.


I completely agree they're a thing, but at what scale? The current administration has deported something like 600,000 illegal immigrants. What do you think their accuracy rate is carrying out those deportations? An accuracy rate of 50% would mean there'd be 600,000 errors. An accuracy rate of 70% would mean we'd expect to see around 250,000 errors. An accuracy rate of 90% would mean we'd expect to see around 67,000 errors.

A quick search [1] on this topic showed 50 people have been wrongfully detained. Even if we increase that figure substantially, it implies an extremely high success rate, which isn't really possible if you're just engaging in widespread fishing expeditions.

[1] - https://www.propublica.org/article/immigration-dhs-american-...


Stopped ≠ detained. The government doesn't release stats on who was stopped. Kavanaugh stops are literally about using race as a criterion for the stop. No other probable cause is required.


Biden deported more people then any previous president and did not needed any of that. Fun fact, he even focused on criminals, proving that in fact, it is possible to not be dumb about it.

Meanwhile, what do we have here is complete breakdown of legal process, judicial orders being ignored and agency that repeatedly provably lies about everything. Including about multiple murders. All the accuracies rates you listed are absolutely terrible for anything that wants to pretend rule if law matters.

----------

The article YOU listed shows: nearly 20 children, including two with cancer. 50 Americans detained for being latino and no other reasons. From 130 Americans detained for protesting, 50 had charges dropped or rejected by court. That is so far. These were simply abusive detentions.

These are horrible statistics. In a democratic rule of law country, a few journalists wont be able such frequent and routine abuse of power.


Agreed. But generally it very much depends on the school and the effort of those in and around it. Terrence was very fortunate to have parents who supported him and likely lobbied for his unconventional high school/primary school split education, and equally fortunate that his schools were able and willing to accommodate him.


I use a subset of omz by cloning it and manually sourcing the plugins I want myself rather than initializing the entire omz system. No themes, no checking for updates, etc. For me, it’s the best of both worlds.

I describe my setup and how to use it on a fresh MacBook here: https://github.com/agrounds/dotfiles


Superficially, these look the same, but at least to me they feel fundamental different. Maybe it’s because if I have the ability to read the script and take the time to do so, I can be sure that it won’t cause a catastrophic outcome before running it. If I choose to run an agent in YOLO mode, this can just happen if I’m very unlucky. No way to proactively protect against it other than not use AI in this way.


I've seen many smart people make bone headed mistakes. The more I work with AI, the more I think the issue is that it acts too much like a person. We're used to computers acting like computers, not people with all their faults heh.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: