Live data from Hacker News

Show HN: I made a spreadsheet where formulas also update backwards

victorpoughon.github.io

61–70 of 122 posts

Re: Show HN: I made a spreadsheet where formulas also update backwards

#61

interesting. like Excel Solver? or OpenSolver, Gurobi, other optimizers? or different objective?

Never used any of those, so I don't know! I'd be curious to read a comparison from anyone who knows about them.

I think what's pretty unique about the bidicalc solver that I made is that it does not depend on the previous input values to update backwards. It's truly solving the root finding problem. The advantage is that there are never any "stuck in a local optimum" problems with the solver. So you can solve difficult problems like polynomials, etc.

Re: Show HN: I made a spreadsheet where formulas also update backwards

#62

Can you enter an RSA key and have it produce two prime numbers?

A random tool like this would be the most entertaining possible way for something like that to be unleashed on the world

Jokes aside, let's say someone does figure out how to break RSA over a weekend project. The evil options are easy to come up with, but what is the actually responsible, ethical, thing to do? Never tell anyone?

Re: Show HN: I made a spreadsheet where formulas also update backwards

#63
post #58

The first example on the main page has a formula with two variables being updated from changing one value. The immediate question I have is if I change the output, where does the extra degree of freedom come from on the inputs? Does one stay locked in place? Unclear. I am a huge fan of the concept though. It's been bugging me for years that my spreadsheet doesn't allow editing text fields after filtering and sorting…

100% this. When I reached the end of that page I felt pranked because the obvious question was never answered. How are these cases resolved? Is it possible to fix some inputs and only update others? What if I sometimes want to change input A, and other times I want to update input B? All this should be explained as early as possible.

You can do it and it is explained, actually. Use # as a prefix to indicate a constant, e.g.: #50 will be a constant and not a variable.

In the future I'd like to support more user input constraints, in particular domain constraints for variables. So you could tell the solver that this cell must remain in some interval, and it would respect that interval instead of assigning any real value.

Re: Show HN: I made a spreadsheet where formulas also update backwards

#64

Earlier quoted context omitted.

A random tool like this would be the most entertaining possible way for something like that to be unleashed on the world

My brother once suggested that there are probably bits of code/algorithms that would be world changing if they were released in academic journals, but instead were written by some unknowing programmer in an afternoon for their job coding embedded systems for refrigerators. This particular example may be unlikely, but it's a very fun idea.

Iirc, Heisenberg reinvented Matrix calculations to solve a problem in quantum physics. Not being a mathematician, he wasn't aware of the concept. Born recognized what Heisenberg had done and introduced him to his own reinvention.

Re: Show HN: I made a spreadsheet where formulas also update backwards

#65

Cool! Constraint propagation from SICP is a great reference here: https://sicp.sourceacademy.org/chapters/3.3.5.html

I wasn't aware of this chapter, but I did use constraint propagation for the solver (among other things), thanks!

Re: Show HN: I made a spreadsheet where formulas also update backwards

#66

Earlier quoted context omitted.

I made this mostly as a fun challenge :) You are right that there is some arbitrariness involved when picking a solution, however it's a bit more subtle than that. Let's say our problem has N free variables. Step 1 is finding the subset of R^N that is the solution to the root finding problem. If this subset is a point, we are done (return that point). Note that if there is no solution at all bidicalc should correctly…

does the algorithm tries to make minimal changes to the free variables ? If we have 1 + 1 = 2 and change 2 -> 4 then -100000 + 100004 = 4 is also a valid solution. When I tried it it changed it to 2 + 2 so perhaps there is optimization but also a valid optimization can be minimal free variable changes in which case it would be 1+3 = 4 and we update 1 free variable instead of 2. I have no idea which is better just cur…

The actual heuristic used to pick a solution from an infinite solution subspace is a bit too complex to explain in a comment. I really need a blackboard :D The main goal was actually to find a solution, any solution at all, and fast. I wanted the backwards update to be very fast to feel as magic as possible. So the heuristic is pretty simple and could definitely be improved!

Re: Show HN: I made a spreadsheet where formulas also update backwards

#67

Earlier quoted context omitted.

A random tool like this would be the most entertaining possible way for something like that to be unleashed on the world

Jokes aside, let's say someone does figure out how to break RSA over a weekend project. The evil options are easy to come up with, but what is the actually responsible, ethical, thing to do? Never tell anyone?

Contact a known and trusted security researcher who can verify to the world that you did what you said you did, so everyone else can have as much time as possible to figure out exactly how fucked they are. Doing nothing isn’t an option; once someone figures something like that out, it signifies that conditions were ripe for the discovery to be made, and it’s only a matter of time before it’s discovered again independently.

Re: Show HN: I made a spreadsheet where formulas also update backwards

#68
Sympy can (often) solve under constrained systems in terms of the free variables. The problem I run into is discrete constraints that make solving less closed form and more combinatorial search. When textbook amplifier formulas significantly diverge from physical reality I model the errors as linear correction factors and use gradient descent to correct it in a few experiments, but I’m curious if there is software that has solved this problem.

Re: Show HN: I made a spreadsheet where formulas also update backwards

#69

Earlier quoted context omitted.

Lots of people working in different fields end up reinventing things that have been known to math for centuries, often in clunky roundabout ways. I imagine some of them figure out things not known to math, but it's far more likely to go the other way.

Folks shouldn’t be afraid to “rediscover” stuff. Primarily because the learnings you make are the same as the original “discoverer”. Without those learnings, you might not be able to arrive at your true destination.

>Folks shouldn’t be afraid to “rediscover” stuff.

Luckily no one is suggesting that.

Post reply on HN