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

Why do we have that E[max_k alg(k)/opt(k)] is equal to max_k E[alg(k)]/opt(k) ?


Let G be a group of order 3*2^n. Prove there exists a non-complete non-cyclic Cayley graph of G such that there is a unique shortest path between every pair of vertices, or otherwise prove no such graph exists.


Gemini 2.5 at least replies that it seems unlikely to be false without hallucinating a proof. From its thoughts it gets very close to figuring out that A_4 exists as a subgroup.


Since any group of order 3⋅2n3⋅2n has ∣G∣≥3∣G∣≥3, it cannot admit a Cayley graph which is a tree. Hence:

    No Cayley graph of a group of order 3⋅2n3⋅2n can have a unique path between every pair of vertices.


My mistake, I said unique path when I should have said unique shortest path.

Also, there are trivial solutions with odd cycles and complete graphs which must be excluded. (So the answer to the prompt as originally stated is wrong too)


This seems pretty convincing to me.

At the very least, the story that NVDA dropped because the Deepseek announcement reduced expected demand for cpus seems inconsistent with typical market behaviour. I wonder if we’ll see a correction of the narrative in mainstream outlets.


Elixir doesn’t even need a special syntax — it gets Haskell’s LambdaCase as a natural consequence of case being just another function, and the pipe operator always chaining by the first argument.

Haskell’s >>= is doing something slightly different. ‘getThing >>= \case…’ means roughly ‘perform the action getThing, then match the result and perform the matched branch’

Whereas ‘getThing |> \case…’ means ‘pattern match on the action getThing, and return the matched action (without performing it).

The >>= operator can also be used for anything satisfying the Monad laws, e.g. your actions can be non-deterministic.


Pedantry: >>= can be used for any instance of the Monad typeclass. GHC isn't sufficiently advanced to verify that a given Monad instance satisfies the monad laws; it can verify that the instance satisfies the type definition, but for e.g. the identity law "m >>= return === m" the instance can still return something violating the law (not something substitutable with m).


> ...case being just another function, and the pipe operator always chaining by the first argument.

Interesting! I thought Elixir was mostly macros all the way down, like this article shows:

https://evuez.net/posts/cursed-elixir.html

Being able to pipe into def, defp, defmodule, if, etc. is fantastic! But apparently you say at least in the case of case, it's not a macro, and it's just a function which returns a monad—I guess it's the same effect afterall? Is that why people say Haskell can get away with lack of Lisp-style macros because of its type system and laziness?


I was wrong about this. Case is a macro (a special-cased macro even, defined at https://github.com/elixir-lang/elixir/blob/4def31f8abea5fba4...), not a function. It works with pipes because in the AST it's a call, unlike in Haskell where case is its own thing.


This is according to ‘climate damages compared to market value’.


Haskell gets compiled to core (https://hackage.haskell.org/package/ghc-9.2.1/docs/GHC-Core....) which is pretty similar to lambda calculus, but it has some additions like literals, let expressions, and case expressions.


Huh. If I move my mouse fast enough I can escape the lock.


Back now in NZ


Still down for me in Sacramento CA


It's working for me on the East Coast.


Heat pumps are more than 100% efficient


Auckland Transport does the same thing


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

Search: