HNHacker News
TopNewBestAskShowJobs

chaoxu

332 karma · joined November 12, 2012

<https://chaoxu.prof>

Professor at UESTC, works on theoretical computer science and operations research.

Research interests: algorithms, combinatorial optimization, computational geometry and problem-solving in general.

submissionscomments
chaoxu··on Show HN: ustaxes.org – open-source tax filing webapp
Yes, having a simple and well defined DSL it might help with tax planning. The difference is it allows one to optimize taxes under certain objective, instead of just enter numbers and see what comes up.
chaoxu··on I tried to report scientific misconduct. How did it go?
How about the following process? Each person gets randomly assigned to one of the two groups, when one group is full, move the rest to the other group. Does this make sure every equal partition have the same probability of showing up?
chaoxu··on Ask HN: Is there a system formalizing US tax code as set of inequalities
btw, took me a lot of time to figure this out. http://mathb.in/49229

This is useful for people with multiple unrelated employers with 401k plans.

chaoxu··on Azlo Is Closing Down
Thank you! I've sent you an email.
chaoxu··on Runtime improvement for Minimum Cut algorithm first time in 25 years (2019)
There are a few misconceptions that some other commenters are already making.

This min-cut is different from the max-flow min-cut theorem's min-cut. This is what referred to as global min-cut, which does not fix the terminals. In max-flow min-cut theorem, it is about disconnecting two fixed vertices s and t. In the global min-cut, it is about disconnecting two arbitrary vertices.

Source: thesis was on hypergraph min-cut

chaoxu··on Azlo Is Closing Down
What, I just got Azlo account a week ago.

Good thing I've applied for an account with Mercury. Waiting through the long verification process...

But this definitely get me to think twice about using fintech banks. It could get closed down due to an acquisition of their parent bank.

chaoxu··on Show HN: NoteCalc
This is pretty good soulver replacement.

I found all these similar tools has the problem that there is exactly one expression per line.

Is there any exploration of this feature: have the computed number shown next to the expression.

I had this problem while using soulver, too. I had a lot of artificial line breaks. For calculations it is pretty good, but it is pretty horrible when I present it to someone else.

chaoxu··on Web Scraping with JavaScript
I'm using python and selectorlib( https://selectorlib.com/ ) for my work flow. Since most of the webpages I crawl can be broken down to:

- get to the webpage (selenium)

- do some clicks to expand certain information (selenium)

- save the html (selenium)

- and parse (selectorlib)

For me, almost everything can be done by css selectors or xpath. Selectorlib allows you to write just a tree of css selectors. The css selectors in the children only apply to currently selected objects.

The nice thing is the magical browser tool of the same name, which makes the first iteration much easier. However, the browser tool output and the python code does not always match, that causes some headaches. Overall, it cut down like 90% of the code and move it into a configuration.

chaoxu··on How to Design an Algorithm (2018)
0-1 knapsack is not known to be solvable in polynomial time.
chaoxu··on Ask HN: What RSS Reader do you use?
Me too. It is also interesting to know it is written in Haskell. One of the few real life Haskell projects.
chaoxu··on Ask HN: How to Automate Processing of Emails?
Thank you this is exactly what I need!
chaoxu··on SageMath – Open-Source Mathematical Software System
I've contributed some code to matroid optimization. The people working on it are very knowledgable, often professors at universities donating their time. I definitely learned a lot through implementing some algorithms from the 70s.
chaoxu··on Ask HN: What is your blog and why should I read it?
https://chaoxuprime.com/blog.html

I write about algorithms.

You might like it if you like algorithmic puzzles. Some of the puzzles are actually in leetcode, but the solutions in the blog are through the viewpoint of a theoretical cs researcher.

chaoxu··on Thoughts On a Year of Exercise
Totally agree.

I tried a few ways and eventually giving up. I just have to live with not having accurate counts.

1. I try to make my own food using common ingredients. It failed in a couple of weeks because I do prefer to not spend that much time on making food.

2. Eating at restaurants is especially difficult. Even if you bring a scale with you. Like if you are given some Chinese dish where all the things are mixed together. I give up and go with "Chinese buffet" option in myfitnesspal.

3. Ironically, fast food places do have calories listed, and that justifies some of my visits...

chaoxu··on Solving a linear optimization problem on incentive allocation
yeah, this problem is precisely the multiple-choice knapsack problem.
chaoxu··on Hiring Is Broken: What Do Developers Say About Technical Interviews?
I was a TA in a few undergraduate algorithms classes in at UIUC. This level of problems can show up in the exams. Although I hold UIUC students in high regard, certainly we don't expect undergrads to be "faculty-level algorithm specialist."

The discovery of many things is done by people with a genius-level intellect. Like calculus, probability, etc. but I can certainly ask mechanical engineers calculus problems, or data scientist probability problems.

It is certainly difficult for someone who never seen anything related to it. But for people who had the background, it is not unreasonable. I think this kind of problem is biased toward people who

1. had a good (theoretical) CS education, or 2. solved lots of leetcode problems so they can just do "pattern matching".

chaoxu··on Lambda School fined $75k by CA for operating without state approval [pdf]
So Lambda School is considered as an educational institution. Does this mean any foreigner enrolled in it probably need a student visa? Can non-US residents take online courses while in the US without a student visa?
chaoxu··on Computing Ranges in Constant Time
The one that works for sum works for all associative functions. One can do a bit better using the same amount of space, but with query time O(α(n)), where α is the inverse Ackermann function. http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.79.1...
chaoxu··on Women: Learn to Program This Summer
How are the 9000 dollars given? Because someone might be in the US under certain visa issues. (For example, OPT, F1, etc).
chaoxu··on From Google Analytics to Fathom
I use github pages, so I can't gather such statistics.
chaoxu··on From Google Analytics to Fathom
I now use both Fathom and Google analytics.

Most of the time, the only thing I care about is where people come from, and which page gets accessed most often. I feel this should already be enough information for one to understand what is a popular topic.

I'm actually still super surprised that Fathom's javascript code is 1.6kb. Can't it be lighter?

chaoxu··on A Faster Pseudopolynomial Time Algorithm for Subset Sum (2015)
It does not. For faster pseudopolynomial time algorithms to knapsack, see this https://arxiv.org/abs/1802.06440
chaoxu··on A Faster Pseudopolynomial Time Algorithm for Subset Sum (2015)
One of the authors here. Later we showed a much simpler algorithm for the O(u√n) running time. https://chaoxuprime.com/files/papers/subset-sum-simple.pdf

We have also prepared a journal version that combines those papers, and with some extra results. whomever interested can contact me.

chaoxu··on Ask HN: How was your Advent of Code 2018 experience?
Indeed, but I want an algorithm with deterministic O(nm) time.
chaoxu··on Ask HN: How was your Advent of Code 2018 experience?
A friend gave me the problem for day 2 part 2, and I found it really cute.

Given a set of n strings, each of length m, find if there is a pair that differs in exactly one position.

It was not trivial to come up with an optimal and elementary O(nm) time algorithm. (by elementary, I mean something does not need a few hours to implement).

I've seen people getting running times of the form O(n^2m), O(n(n+m)) and O(nm^2) on multiple Reddit posts, and was surprised at all kind of different approaches.

chaoxu··on TRE: A Regex Engine with Approximate Matching
An interesting theoretical problem that arises: Given a regular language L, define LD(L,k) to be the set of strings with Levenshtein distance at most k from some string in L.

1. Is LD(L,k) regular? (yes)

2. How hard is it to construct a regular expression(or DFA, NFA) of LD(L,k) given a regular expression(or DFA, NFA) of L? (probably it is something k times the original size in terms of NFA)

I believe a constant k here does not make much sense. since we might match super long strings, then having more errors seems ok. Maybe we can ask for the following:

LDM(L,ε) is the set of strings, such that if x in LDM(L,ε), then there is a y in L, such that distance between x and y is at most ε|y|.

LDM(L,ε) does not seem to be a regular language.

chaoxu··on Ask HN: What's your favorite elegant/beautiful algorithm?
Thanks! Do you use that algorithm for anything in your research?
chaoxu··on Ask HN: What's your favorite elegant/beautiful algorithm?
Karger's randomized contraction algorithm for finding a min-cut. It's a common algorithm to introduce students into the world of randomized algorithms.

Also a shameless plug. My friend and I came up with this pseudo-polynomial time algorithm for subset sum that can be taught in a single session. It is faster than the standard dynamic programming algorithm. https://arxiv.org/abs/1807.08248

chaoxu··on Ask HN: Does anyone do academic writing in their own time?
I still publish. I joined an industry lab this June. My day to day function is highly non-academic, but we can do academic research on the side (we don't have to).

I intend to keep on researching since research is fun. But writing itself is not as much fun, so I wonder if I will try to publish as much.

1. Collaboration. If you look at my publication records, I only have a single paper where I am the sole author, and I made sure a few very knowledgeable friends read it. So find someone sharing similar interests and talk to them. Once a collaboration starts, it is much easier to get going.

2. Branch out. Recently, I improve algorithms in areas (more applied operations research) close to mine (theoretical x {computer science, combinatorial optimization}). This includes 3 of the papers I'm preparing. It only took a few hours to realize improvements are possible, although it takes much longer to polish and present. It also leads me to an interesting problem in my own field.

3. Giving talks. It is probably much easier to have an opportunity to give tech talks. Giving the talk itself forces you to organize your thought well. I often find better ways to organize my writing after I've given the presentation. (I really should give talks before writing the paper...

chaoxu··on E Ink Waveforms are a closely guarded secret
It does not look good, and black causes ghosting.
← PreviousPage 2 of 4Next →