勇闖新世界︰ W!o《卡夫卡村》變形祭︰感知自然‧數據分析‧三

假使有人仔細看待『誤差 = 量測值 – 真值』表達式的意義,致力於『真值』之量測『不確定』的邏輯嚴密性。或許將用數學

X_{min} \leq X_{true} \leq X_{max}

不等式規範『真值』的『確定範圍』。如此『量測值』之四則運算 ,就成了『區間算術』 Interval arithmetic

Interval arithmetic, interval mathematics, interval analysis, or interval computation, is a method developed by mathematicians since the 1950s and 1960s as an approach to putting bounds on rounding errors and measurement errors in mathematical computation and thus developing numerical methods that yield reliable results. Very simply put, it represents each value as a range of possibilities. For example, instead of estimating the height of someone using standard arithmetic as 2.0 metres, using interval arithmetic we might be certain that that person is somewhere between 1.97 and 2.03 metres.

Whereas classical arithmetic defines operations on individual numbers, interval arithmetic defines a set of operations on intervals:

T * S = \left\{x | \text{there is some } y \text{ in } T, \text{ and some } z \text{ in } S, \text{ such that } x = y * z\right\}

The basic operations of interval arithmetic are, for two intervals [a, b] and " that are subsets of the real line (-\infty,\infty),

  • "[a,
  • "[a,
  • "[a,
  • "\frac{[a,

Division by an interval containing zero is not defined under the basic interval arithmetic. The addition and multiplication operations are commutative, associative and sub-distributive: the set X (Y + Z) is a subset of XY + XZ.

Instead of working with an uncertain real x we work with the two ends of the interval [a,b] which contains x: x lies between a and b, or could be one of them. Similarly a function f when applied to x is also uncertain. Instead, in interval arithmetic f produces an interval "which is all the possible values for f(x) for all x \in [a,b].

This concept is suitable for a variety of purposes. The most common use is to keep track of and handle rounding errors directly during the calculation and of uncertainties in the knowledge of the exact values of physical and technical parameters. The latter often arise from measurement errors and tolerances for components or due to limits on computational accuracy. Interval arithmetic also helps find reliable and guaranteed solutions to equations and optimization problems.

 

345px-Set_of_curves_Outer_approximation

Tolerance function (turquoise) and interval-valued approximation (red)

───

 

因是『誤差傳播』也變成複雜的『區間傳播』計算︰

Interval propagation

In numerical mathematics, interval propagation or interval constraint propagation is the problem of contracting interval domains associated to variables of R without removing any value that is consistent with a set of constraints (i.e., equations or inequalities). It is can be used to propagate uncertainties in the situation where errors are represented by intervals .[1] Interval propagation considers an estimation problem as a constraint satisfaction problem.

Atomic contractors

A contractor associated to an equation involving the variables x1,…,xn is an operator which contracts the intervals [x1],…, [xn] (that are supposed to enclose the xi‘s) without removing any value for the variables that is consistent with the equation.

A contractor is said to be atomic if it is not built as a composition of other contractors. The main theory that is used to build atomic contractors are based on interval analysis.

Example. Consider for instance the equation

 x_1+x_2 =x_3,

which involves the three variables x1,x2 and x3.

The associated contractor is given by the following statements

 [x_3]:=[x_3] \cap ([x_1]+[x_2])
 [x_1]:=[x_1] \cap ( [x_3]-[x_2])
 [x_2]:=[x_2] \cap ( [x_3]-[x_1])

For instance, if

 x_1 \in [-\infty ,5],
 x_2 \in [-\infty ,4],
 x_3 \in [ 6,\infty]

the contractor performs the following calculus

 x_3=x_1+x_2 \Rightarrow x_3 \in [6,\infty ] \cap ([-\infty,5]+[-\infty ,4]) =[6,\infty ] \cap [-\infty ,9]=[6,9].
 x_1=x_3-x_2 \Rightarrow x_1 \in [-\infty ,5]\cap ([6,\infty]-[-\infty ,4]) =[-\infty ,5] \cap [2,\infty ]=[2,5].
 x_2=x_3-x_1 \Rightarrow x_2 \in [-\infty ,4]\cap ([6,\infty]-[-\infty ,5]) = [-\infty ,4] \cap [1,\infty ]=[1,4].

For other constraints, a specific algorithm for implementing the atomic contractor should be written. An illustration is the atomic contractor associated to the equation

 x_2=\sin(x_1),

is provided by Figures 1 and 2.

220px-Before_contraction    Figure 1: boxes before contraction

 

220px-After_contraction    Figure 2: boxes after contraction

───

 

此法若是不用『電腦程式』來運算,恐怕很難動手作的吧!也許正因為如此,它也不太流行!!然而如下一篇論文的『摘要』是否能引發人們的興趣?

 

interval-method

───

 

,會不會喚醒不久前『邏輯編程』之記憶的呢??

曾聞小學堂的蟲食算考倒了大專生?想來其實也沒什麼奇怪!學而不思則罔,思其所學整理明辨,自有所得而且記憶長久,否則日遠時遷,早忘之矣!不會算豈不很正常!!舉例來說︰

孤獨的n

在一堆空格的數式中,剛好只有一個數字n。以下是一個「孤獨的六」:

<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> \begin{matrix}<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> & & & \Box & \Box & \Box \\<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> \hline<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> \Box & ) & \Box & \Box & \Box & \Box \\<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> & & & \Box & & \\<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> \hline<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> & & & \Box & \Box & \\<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> & & & & \Box & \\<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> \hline<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> & & & & 6 & \Box \\<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> & & & & \Box & \Box \\<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> \end{matrix}<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />

這個孤獨的六是1053/9的直式

求解需要個下手處。那個『被除數』的千位首數必是 1 。為什麼呢 ?觀其直式除法之『商』的首數與『除式寫法』未及於『被除數』的千位首數而得知。再者那個『除數』由『商』的尾數乘法知道,只能是『7 * 9 = 63』、『8 * 8 = 64』或『9 * 7 = 63』。添上直式除法首起『兩數相乘是一位數』,可以推知『商』的首數是 1 。否則就成兩位數的了。接著推『二位數 減 一位數 等於 一位數 1 』,此 1 來於其下的直式之寫法。如此可得『被除數』首起『二位數』為 10,而且『除數』是 9 。同理『商』的十位數也必是 1 ,以及 1 □ – 9 = 6 ,所以『被除數』的十位數是 5 。故得解。

『正算反推』雖都依賴『加減乘除』的『性質』,熟悉其一,不通另一,大半因為練習多寡所致。正如《邂逅 W!o ?!》文本中講的『逆問題』

Li Bai

A Quiet Night Thought

In front of my bed, there is bright moonlight.
It appears to be frost on the ground.
I lift my head and gaze at the August Moon,
I lower my head and think of my hometown.

 

Contemplation

Moon twilight approaches, coating the ground through the window,
Resembles a touch of frost,
Moon at the window,
Taking me back to where I am from.

李白

静夜思

床前明月光
疑是地上霜
舉頭望明月
低頭思故鄉

假使將李白的《靜夜思》翻譯成英文,藉由『中英對照』,是否更能『理解』原作之『意境』呢?還是會少了點『』的『味道』??或許這個『利弊得失』就落在︰

『文化』之『盲點』,常顯現在『意義』的『忽略』之中。

『人文』之『偏見』,普遍藏於『字詞』之『情感』之內。

故而同一『內容』的多種『語言文本』,也許可見那『通常之所不見』

Inverse problem

An inverse problem is a general framework that is used to convert observed measurements into information about a physical object or system. For example, if we have measurements of the Earth’s gravity field, then we might ask the question: “given the data that we have available, what can we say about the density distribution of the Earth in that area?” The solution to this problem (i.e., the density distribution that best matches the data) is useful because it generally tells us something about a physical parameter that we cannot directly observe. Thus, inverse problems are some of the most important and well-studied mathematical problems in science and mathematics. Inverse problems arise in many branches of science and mathematics, including computer vision, natural language processing, machine learning, statistics, statistical inference, geophysics, medical imaging (such as computed axial tomography and EEG/ERP), remote sensing, ocean acoustic tomography, nondestructive testing, astronomy, physics and many other fields.

逆問題

逆 問題是一個關於如何將觀測和測量的結果轉換為物體或系統的信息的廣義框架。比如,如果我們有一個關於地球重力場的測量結果,我們就會問:「利用現有的信 息,我們能否得到地球的密度分布?」。這類問題的解(即最符合測量數據的密度分布)通常就可以告訴我們一個無法直接測量的物理量。因此,逆問題是在數學和 物理學中最重要和被研究的最多的問題之一。逆問題廣泛的出現在諸如計算機視覺,自然語言處理,機器學習,統計學,推論統計學,地理,醫學成像(比如X射線 計算機斷層成像和腦電圖/事件相關電位),遙感,海洋聲學層析,無損檢測,航空,物理學中。

一般所以難解之故。所謂『去除盲點』,就是『能見己所未見』之功夫。

近日偶讀楊惠后女士早年於《數學傳播》 32 卷 4 期, pp. 51-55 發表的一篇文章︰「五餅二魚」 一一談數學教學分享。略引如下︰

對一般學生而言, 若能在枯燥乏味的數學課中穿插一些有趣的、 別緻的、 與課程內容相關的益智活動, 她們會顯得很有討論的熱忱。 下面有三種文字遊戲, 我會分別安插在不同的課程內容中進行:

(a) 日本有不少學者精通漢文, 他們把中國古代詩詞中的名言佳句與「蟲食算」 結合起來, 製作了一些風格優異的小品。 遊戲規則是每題中不同的國字代表不同的阿拉伯數字, 請找出滿足這些聯立方程組的解。
1.
年年 × 歲歲 = 花相似
歲歲 ÷ 年年 = 人 ÷ 不同

2.
床前 = 明月 + 光
疑是 = 地上 × 霜

3.
舉頭 × 望 = 明月
低頭 × 思 = 故鄉

讀後頗有感觸,姑且用

床前 = 明月 + 光
疑是 = 地上 × 霜

為題,表述以 pyDatalog 求解想法,權充『約束編程』之總結。

─ 引自《勇闖新世界︰ 《 pyDatalog 》【專題】之約束編程‧五