TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Solving Problems with Decomposition

76 点作者 erwald将近 3 年前

8 条评论

karatinversion将近 3 年前
When solving problems with decomposition, it's often important to remember that the way you've decomposed the problem is part of your theory of what the solution will look like. If you feel like you're at a dead end on a subproblem, you might need to change the way you decompose the problem.
pcwelder将近 3 年前
This has been the single biggest learning for me as well, but in slightly different flavours:<p>1. In machine learning. For example, suppose you want to generate an article. If you try to build a model that sequentially generates all the words, you&#x27;ll have a bad time. You won&#x27;t be able to train a decent size LM on such a large sequence due to OOM. If you generate chunk by chunk each new chunk won&#x27;t have previous context.<p>The way you do is to decompose the problem: generate sections and subsections and may be a summary, then each paragraph gets conditioned on generated section and subsection, which can be generated parallely now.<p>This type of solution appears in many many places in ML.<p>2. In a relational DB design. Having all the information of an entity in a single table is bad for building concurrent application. If you acquire a lock on a row a lot more users have to wait. Decomposing the data in multiple relational tables allows you to isolate changes. If you&#x27;ve a tree like dependency, the sibling tables can be worked on in parallel without any worry.<p>3. Codebase. If you&#x27;ve a single codebase with large number of people developing on it, you&#x27;ll have slow development cycle. Decomposed codebase (and corresponding services) with relatively stable API as interface will allow you to have parallel development with less conflicts. You can get QA done in parallel, deployment can be parallel, refactor can be parallel, etc.<p>4. To get a numerical solution of PDE instead of parallelising all the matrix vector computations, you get much more natural and efficient method by decomposing physical domain (say a 3d space) and solving PDE on the subdomains with boundary conditions on the interfaces. This is known as domain decomposition method. These methods can be parallelized efficiently, but even sequentially they converge faster than then no decomposition!<p>5. In system and code design to reduce mental load. Isolation of a piece of logic or a service allows you to develop and maintain it effectively. If you&#x27;ve many services depending on many services, keeping a mental model of all the dependencies become challenging and creates a lot of points of failure.
zxcvbnm将近 3 年前
Caveat: intern doesn&#x27;t comprehend the problem, goes crazy with decomposition, there&#x27;s an overengineered mess in the end.<p>Now there&#x27;s a 2nd puzzle: how is this mess supposed to solve that task. Which of the thousand-possible call chains, or search constraints, ended up with a particular result.
workingon将近 3 年前
I was hoping for insight into a bunch of decomposition methods (SVD, POD, DMD, AA etc.). This was nice too. If anyone has any really good links discussing this type of decomposition please don’t hesitate to list some here for me :)
评论 #31559753 未加载
siddboots将近 3 年前
Some more vocabulary for thinking about this is “analysis” and “synthesis”. Analysis is about breaking up a problem into isolated parts. Synthesis is reassembling the solved parts.
评论 #31557687 未加载
jackblemming将近 3 年前
The 3rd bullet point has a name. It’s called structured programming (which is more than just goto = bad). I find it insulting the author lays out the introduction as if it’s his novel idea and off handedly includes one recent reference from 1999 as if it’s a modernish idea.
syntaxfree将近 3 年前
Grows more relevant each year: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;McNamara_fallacy?wprov=sfti1" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;McNamara_fallacy?wprov=sfti1</a>
hnthrowaway0315将近 3 年前
I think the second difficulty is to know how to decompose. The first is to describe the problem clearly.