🌗 克拉科夫乘數:矩陣的扭曲雙胞胎
➤ 一種替代線性代數的觀點
https://marcinciura.wordpress.com/2025/06/20/cracovians-the-twisted-twins-of-matrices/
這篇文章介紹了波蘭天文學家塔德烏斯·巴納切維奇(Tadeusz Banachiewicz)在1920年代發展的一種名為“克拉科夫乘數”(cracovians)的數字計算方法。克拉科夫乘數與矩陣相似,但在乘法運算上有所不同,使得其乘法不具交換律或結合律。儘管在手動計算時代有其優勢,但現代計算機顯示其效率與矩陣乘法相近。作者透過實際程式碼展示了NumPy在矩陣運算上的效能,並指出克拉科夫乘數的運算原理與矩陣轉置的效率有相似之處。巴納切維奇的研究也延伸至其他領域,例如天文學和大地測量學。
+ 這篇文章真有趣!我從未聽說過克拉科夫乘數,但它提供了一種思考線性代數的新方式。
+ 雖然克拉科夫乘數在現代計算機上沒有明顯優勢,但瞭解其歷史和數學原理仍然很有價值。
#數學 #線性代數 #計算機科學
Cracovians: The Twisted Twins of Matrices

Linear algebra is typically explained using matrices. But matrix theory is just one possible perspective. Below, I describe an alternative approach to linear algebra. Tadeusz Banachiewicz (1882–195…

🌗 Posit:瘦三角形和其他技巧(揭祕!)
➤ 揭示Posit格式的精準度優勢與設計考量
http://marc-b-reynolds.github.io/math/2019/02/06/Posit1.html
本文探討了Posit數值格式與傳統的IEEE 754二進制浮點數的精準度比較,透過計算一個瘦三角形的面積,展示了Posit在某些情況下顯著優於IEEE 754的精準度。作者以類比魔術表演的方式,揭示了兩種數值格式在處理計算時的差異,並解釋了歷史原因以及Posit格式的優勢。文章也指出了在特定條件下Posit的不足,並強調了其在通用計算方面的潛力。
+ 很有趣的文章,讓我對Posit格式有了更深入的瞭解。原來浮點數的設計也涉及歷史因素,現在的Posit格式似乎能更好地適應現代計算需求。
+ 雖然Posit格式看起來很有潛力,但文章也提到了一些限制。需要更多研究才能確定它是否能真正取代現有的浮點數標準。
#數值分析 #計算機科學 #Posit 格式
posit: thin triangle other tricks (REVEALED!)

First post in breaking down why the posits presentations are egregiously disingenuous.

Marc B. Reynolds
🌕 五十年整數線性規劃:聚焦近期實用進展
➤ 整數線性規劃的實用進展與未來展望
https://inria.hal.science/hal-04776866v1
本文回顧了過去五十年整數線性規劃 (MILP) 的發展,重點關注近年來在實用效能方面的進展。MILP 已成為運營研究的基石,得益於現代求解器的效率提升,如今能在短時間內為十年前難以解決的問題找到全局最佳解。這些求解器的多功能性使其在運輸、物流、供應鏈管理、收益管理、金融、電信和製造等領域得到成功應用。儘管已取得了顯著的成功,但仍存在許多挑戰,MILP 仍然是一個活躍的研究領域。本文概述了推動 MILP 解決方法進展的最重要成果,著重於計算方面和最近的實用效能改進,並強調報告計算實驗的研究。本文將研究分為三個主要部分,分別探討分支定割法、丹錫格-沃爾夫分解和 Bender 分解。文章最後強調了 MILP 研究中持續的挑戰和未來機會。
+ 這篇文章很好地總結了整數線性規劃領域的發展,對於研究者和從業者來說都很有價值。
+ 瞭解 MILP 近年來的進展對於應用這些技術解決實際問題非常有幫
#運營研究 #數學規劃 #計算機科學
Last fifty years of integer linear programming: a focus on recent practical advances

<div><p>Mixed-integer linear programming (MILP) has become a cornerstone of operations research. This is driven by the enhanced efficiency of modern solvers, which can today find globally optimal solutions within seconds for problems that were out of reach a decade ago. The versatility of these solvers allowed successful applications in many areas, such as transportation, logistics, supply chain management, revenue management, finance, telecommunications, and manufacturing. Despite the impressive success already obtained, many challenges remain, and MILP is still a very active field.</p><p>This article provides an overview of the most significant results achieved in advancing the MILP solution methods. Given the immense literature on this topic, we made deliberate choices to focus on computational aspects and recent practical performance improvements, emphasizing research that reports computational experiments. We organize our survey into three main parts, dedicated to branch-and-cut methods, Dantzig-Wolfe decomposition, and Benders decomposition. The paper concludes by highlighting ongoing challenges and future opportunities in MILP research.</p></div>

🌖 尼古拉斯·哈徹 | 帽子、幽靈與SAT求解器
➤ 從「帽子」到「幽靈」:探索非週期性鑲嵌與SAT求解器的奇妙之旅
https://www.nhatcher.com/post/on-hats-and-sats/
本文探討了數學領域近期的一項新發現——單一圖形鑲嵌平面的一種非週期性方法(即「帽子」),並介紹了SAT求解器這種在計算機科學中相對冷門但功能強大的演算法。作者介紹了SAT求解器的原理,如何在瀏覽器中使用它,並將其應用於解決數獨等問題,以及如何利用它來完成更複雜的平面鑲嵌任務,最終構建出更複雜的「幽靈」圖形。文中提供了相關的程式碼連結和線上應用程式,方便讀者進一步探索。
+ 這篇文章將抽象的數學概念和實用的計算機演算法結合起來,寫得非常有趣易懂,讓人對這些領域產生了興趣。
+ 能夠提供實際的程式碼和線上應用程式,讓讀者可以親身體驗,這點非常棒!這篇文章不僅理論性強,而且具有很強的可操作性。
#數學 #計算機科學 #SAT求解器
The Hat, the Spectre and SAT solvers

Introduction In this blog post you are going to read about two things:

I'm Nicolás Hatcher
🌖 使用 SMT 求解 LinkedIn 皇后問題
➤ SMT 求解器:更易用的問題解決方案
https://buttondown.com/hillelwayne/archive/solving-linkedin-queens-with-smt/
本文探討了使用 SMT (Satisfiability Modulo Theories) 求解器解決 LinkedIn 皇后問題的方法,並與傳統的 SAT (Boolean SATisfiability) 求解器進行比較。作者指出,儘管 SAT 求解器功能強大,但業界使用率不高,原因可能在於其編碼方式較為繁瑣。透過實際範例,作者展示了使用 Z3 SMT 求解器更簡便地解決該問題,並分享了相關程式碼和驗證方法。儘管 SMT 求解速度可能不如精簡的 SAT 求解器,但其易用性使其成為更受偏好的選擇。
+ 聽起來 SMT 求解器在處理這種邏輯問題上真的很有優勢,讓人想試試看!
+ 這篇文章清楚地解釋了 SAT 和 SMT 的差異,以及為什麼 SMT 更適合某些應用場景,很有收穫。
#計算機科學 #人工智慧 #SAT 求解器 #SMT 求解器
Solving LinkedIn Queens with SMT

For sure easier than solving it in SAT!

Computer Things
🌘 雜湊表封裝問題
➤ 魔法位元板優化的理論瓶頸
https://backscattering.de/chess/hashtable-packing/
本文探討了雜湊表封裝問題的計算複雜度,證明其為強 NP-完全問題。此問題源於國際象棋編程中優化魔法位元板(Magic Bitboards)的過程。證明表明,不存在多項式時間算法,甚至偽多項式時間算法或多項式時間近似方案來尋找最佳解,因此實務上應採用啟發式演算法。儘管如此,作者也指出,針對特定情境(如國際象棋魔法位元板的應用),可能存在尚未發現的有效解決方案。
+ 這篇文章深入探討了一個非常具體的計算問題,但卻揭示了更廣泛的理論侷限性,讓人印象深刻。
+ 對於不熟悉國際象棋或魔法位元板的人來說,理解文章需要一些背景知識,但其核心的計算複雜度論證仍然很有價值。
#計算機科學 #算法 #複雜度理論 #國際象棋
The Hashtable Packing Problem

🌘 現代最小完美散列:綜述
➤ 性能、應用與最新進展
https://arxiv.org/abs/2506.06536
本文是一篇關於現代最小完美散列函數的綜述性論文。最小完美散列函數能將一組鍵映射到一組連續的整數,且不產生碰撞。近年來,該領域的研究已取得顯著進展,現代最小完美散列函數在查詢速度、空間效率和可擴展性方面都表現出色,能處理數十億個鍵。本文探討了不同方法的權衡取捨,並提供了實驗評估,以幫助讀者選擇適合特定應用的完美散列函數。
+ 這篇綜述對最小完美散列函數的理解非常有幫助,特別是對於需要高效查詢和空間優化的應用。
+ 很高興看到這個領域的研究持續進步,這篇論文提供了很好的起點,讓我可以更深入地瞭解相關技術。
#計算機科學 #數據結構與演算法
Modern Minimal Perfect Hashing: A Survey

Given a set $S$ of $n$ keys, a perfect hash function for $S$ maps the keys in $S$ to the first $m \geq n$ integers without collisions. It may return an arbitrary result for any key not in $S$ and is called minimal if $m = n$. The most important parameters are its space consumption, construction time, and query time. Years of research now enable modern perfect hash functions to be extremely fast to query, very space-efficient, and scale to billions of keys. Different approaches give different trade-offs between these aspects. For example, the smallest constructions get within 0.1% of the space lower bound of $\log_2(e)$ bits per key. Others are particularly fast to query, requiring only one memory access. Perfect hashing has many applications, for example to avoid collision resolution in static hash tables, and is used in databases, bioinformatics, and stringology. Since the last comprehensive survey in 1997, significant progress has been made. This survey covers the latest developments and provides a starting point for getting familiar with the topic. Additionally, our extensive experimental evaluation can serve as a guide to select a perfect hash function for use in applications.

arXiv.org
🌕 計算複雜性:新哥德爾獎得主風味十足且更清爽
➤ 偽隨機數與拉姆齊理論的交匯
https://blog.computationalcomplexity.org/2025/06/the-new-godel-prize-winner-tastes-great.html
埃山·查託帕迪亞(Eshan Chattopadhyay)和戴維·祖克曼(David Zuckerman)因其關於顯式雙源提取器和彈性函數的論文榮獲2025年哥德爾獎。該研究成果在偽隨機性和拉姆齊理論中均有應用,尤其在構建性拉姆齊理論方面提供了顯著的改進,將建構性界限提升至指數級別。儘管作者對於其在拉姆齊理論中的應用存在爭論,但其核心價值在於從兩個獨立的低最小熵來源中提取接近完美的隨機位。
+ 聽起來這篇論文在理論計算機科學領域有著重要的影響,特別是在隨機性相關的研究中。
+ 哥德爾獎得主的研究成果,肯定非常深奧,但能應用到實際問題中,實在令人敬佩。
#計算機科學 #數學 #哥德爾獎 #演算法
The New Godel Prize Winner Tastes Great and is Less Filling

David Zuckerman The 2025 Gödel Prize has been awarded to Eshan Chattopadhyay and David Zuckerman for their paper Explicit two-source extrac...

🌘 TPDE:一種快速適應性編譯器後端框架
➤ 加速即時編譯的新框架
https://arxiv.org/abs/2505.22610
本文介紹了 TPDE,一個新的編譯器後端框架,旨在加速機器碼生成,尤其是在即時 (JIT) 編譯環境中。TPDE 透過適應現有的靜態單賦值 (SSA) 形式的程式碼表示,並結合指令選擇、暫存器分配和指令編碼於單一編譯過程中,大幅減少了編譯延遲。研究結果表明,TPDE 在不犧牲執行時效能的前提下,可將 LLVM-IR 的編譯速度提高 8 到 24 倍。此外,它在 WebAssembly 和資料庫查詢編譯等特定領域的即時編譯中也展現了顯著優勢。
+ 這個框架聽起來很有潛力,尤其是在對啟動速度要求嚴苛的應用程式中,例如 WebAssembly。
+ 簡化編譯流程的設計理念很吸引人,能有效降低開發和維護的複雜度。
#計算機科學 #編譯器 #即時編譯
TPDE: A Fast Adaptable Compiler Back-End Framework

Fast machine code generation is especially important for fast start-up just-in-time compilation, where the compilation time is part of the end-to-end latency. However, widely used compiler frameworks like LLVM do not prioritize fast compilation and require an extra IR translation step increasing latency even further; and rolling a custom code generator is a substantial engineering effort, especially when targeting multiple architectures. Therefore, in this paper, we present TPDE, a compiler back-end framework that adapts to existing code representations in SSA form. Using an IR-specific adapter providing canonical access to IR data structures and a specification of the IR semantics, the framework performs one analysis pass and then performs the compilation in just a single pass, combining instruction selection, register allocation, and instruction encoding. The generated target instructions are primarily derived code written in high-level language through LLVM's Machine IR, easing portability to different architectures while enabling optimizations during code generation. To show the generality of our framework, we build a new back-end for LLVM from scratch targeting x86-64 and AArch64. Performance results on SPECint 2017 show that we can compile LLVM-IR 8--24x faster than LLVM -O0 while being on-par in terms of run-time performance. We also demonstrate the benefits of adapting to domain-specific IRs in JIT contexts, particularly WebAssembly and database query compilation, where avoiding the extra IR translation further reduces compilation latency.

arXiv.org
🌕 2的51次方數值的妙招
➤ 提升大整數運算效能的技巧
https://www.chosenplaintext.ca/articles/radix-2-51-trick.html
本文探討了在現代CPU上進行大整數加減法時,一個利用2的51次方數值來加速運算的技巧。傳統的加法演算法,尤其是在處理大數字時,會因為進位的存在而降低效率,無法充分利用CPU的平行處理能力。文章解釋了為什麼即使使用進位指令(adc)也可能比簡單的加法更慢,並闡述瞭如何通過改變數字系統,延遲進位傳播,從而提高計算速度。核心思想是將大數字分解成更小的部分,並盡可能地避免在中間步驟產生進位,最後一次性處理所有進位。
+ 這篇文章解釋得真清楚,我以前從沒想過進位竟然會是效能瓶頸!
+ 感覺這是一個很進階的優化技巧,但如果能應用得當,應該能帶來很大的改善。
#計算機科學 #性能優化 #編程技巧
The radix 2^51 trick