Post Reply 
Tripartite Palindromic Partition of Integer (HP 50g) Challenge
03-09-2023, 11:15 PM
Post: #51
RE: Tripartite Palindromic Partition of Integer (HP 50g) Challenge
Type B7 is indeed wholly contained in type B2. Type B4 also overlaps with type B6, with the overlap making up half the numbers in type B4 (those with \(\delta_{l-3}=3\), to be precise).

The declaration of \(x_1, y_1, z_1\) between types B7 and B2 is also compatible, so you can just treat B7 as a special case of B2. Types B6 and B1 are similarly compatible (even though they are merely adjacent, not overlapping). But merging them makes stating the conditions for the combined type quite messy, so that may not be worth doing (it is worth it in my implementation, but not by a lot).

The overlap between types B4 and B6 is not as pretty. You will get different results depending on which one you give preference, because their \(x_1, y_1, z_1\) declarations are different. This is one of two places I saw so far where the proof's algorithm lets you pick between multiple outcomes, the other being the cases in 6-digit numbers where it explicitly tells you to choose \(x_1, y_1\) or \(x_2, y_2\) or \(x_3, y_3\) within some constraints (which are a set of allowed digits (all, or all except zero), and the sum of the pair).

---

My SysRPL implementation is progressing much slower than I anticipated. It's still missing a few cases in 6-digit numbers and a whole lot of testing (and the bugfixes resulting from that). In its incomplete state it's a standalone library weighing just about 3.6 KiB though, so I'm at least winning the code size race against the UserRPL one. Wink On the other hand, there's no way to beat the backtracking-based one in that.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Tripartite Palindromic Partition of Integer (HP 50g) Challenge - 3298 - 03-09-2023 11:15 PM



User(s) browsing this thread: 1 Guest(s)