# Merging incomparable linearizations

**URL:** <https://delvingbitcoin.org/t/merging-incomparable-linearizations/209>\
**Category:** Implementation\
**Tags:** wg-cluster-mempool, mempool\
**Created:** [November 19, 2023, 4:12am UTC](https://delvingbitcoin.org/t/merging-incomparable-linearizations/209 "2023-11-19T04:12:15Z")\
**Posts on this page:** 1\
**Showing post:** 30

<div class="post-metadata">

**Author:** ![ajtowns](https://delvingbitcoin.org/user_avatar/delvingbitcoin.org/ajtowns/32/417_2.png) [@ajtowns](https://delvingbitcoin.org/u/ajtowns)\
**Post date:** [November 30, 2023, 6:45pm UTC](https://delvingbitcoin.org/t/merging-incomparable-linearizations/209/30 "2023-11-30T18:45:15Z")

</div>

> [@sipa](#):
>
> In what follows, we will show that every point on N lies on or above a line making up D. If that holds, it follows that N in its entirety lies on or above D:

I think the intuition for this is that you’re constructing a (possibly non-optimal) feerate diagram for L\_G+L\_B by taking the subsets L\_G + \sum\_{i=1}^j d\_i and showing this is a better diagram than that of L. Because you can’t say anything about d\_i (the bad parts of each chunk), you’re instead taking the first j chunks as a whole, which have a feerate of f or lower, and then the suffix of L\_G that was missed, which has a feerate of f or high, which kinks the diagram up. Kinking the diagram up means this subset has a better diagram than the chunks up to and including c\_j.

FWIW, I think this was the argument I was trying to make in [my earlier comment](https://delvingbitcoin.org/t/merging-incomparable-linearizations/209/9) but couldn’t quite get a hold of.

I think the general point is just: L^\* \ge L if (and only if?) for each \gamma\_i (prefixes matching the optimal chunking of L) there exists a set of txs \zeta\_i where \gamma\_i \cup \zeta\_i is a prefix of L^\* and R(\zeta\_i) \ge R(\gamma\_i).

Ah! Actually, isn’t a better “diagram” to consider the ray from the origin to these P(\gamma\_i) points in general, ie, for x=0...c\_1 plot the y value as R(\gamma\_1), for x=c\_1..c\_2 plot R(\gamma\_2) etc. Then (I think) you still compare two diagrams by seeing if all the points on one are below all the points on the other; but have the result that for an optimal chunking, the line is monotonic decreasing, rather than concave.

Also, with that approach, to figure out the diagram for the optimal chunking, you just do the diagram for every tx chunked individually, it’s just f\_{opt}(x) = \max(f(x^\prime), x^\prime \ge x).

---

_[View the full topic](https://delvingbitcoin.org/t/merging-incomparable-linearizations/209)._
