离散数学读书记录 (2)

离散数学读书记录 (2)

上个文档在省电模式编辑时会很卡,所以又开了一个(

T50, 51

Put these statements in prenex normal form.

a) (exist x P(x) or exist x Q(x)or A), where (A) is a proposition not involving any l-quantifiers

b) ( eg(forall x P(x) or forall x Q(x)))

c) (exist x P(x) o Q(x))

Show how to translate an arbitrary statement to a statement in prenex normal form that is equivalent to the given statement.

Sol

prenex normal form 中译 前束范式,即一种量词全部在命题的开头,量词作用域一直延伸到命题末尾的范式。比如 (forall a exist bforall c P(a,b,c)) 就是一种符合前束范式的命题。

正如译名中 范式 一词所暗示的,我们可以证明任何命题都有前束范式的等价表达。

a)

[egin{align*} &exist x P(x) or exist x Q (x) or A \ Leftrightarrow & exist x P (x) or exist x (Q(x) or A) \ Leftrightarrow & exist x, (P(x) or Q(x) or A) end{align*} ]

b)

[egin{align*} & eg(forall x P(x) or forall x Q(x)) \ Leftrightarrow & (exist x, eg P(x)) and (exist x, eg Q(x)) \ Leftrightarrow & exist x_1 exist x_2,(P(x_1) and Q(x_2)) end{align*} ]

c)

[egin{align*} &exist P(x) o Q(x) \ Leftrightarrow & eg exist x P(x) or Q(x)\ Leftrightarrow & forall x eg P(x) or Q(x) \ Leftrightarrow & forall x, ( eg P(x) or Q(x)) end{align*} ]

容易总结出将任意命题转化为前束范式的方法:

首先利用 Conditional-disjunction equivalence 把箭头转化,之后不停地使用 De morgan's Law 把 ( eg) 内置,最后把量词前移即可。

T52

Express the quantification (exist!xP(x)), using universal quantifications, existential quantifications, and logical operators.

Sol

直接说话即可:

(exist x_0 (P(x_0) and forall x (x ot = x_0) eg P(x)))

1.6 Rules of Inference

  • 三段论

  • 由一些重言式引申出的三段论:

    Rule of inference Tautology Name
    (p)
    (p o q)
    (overline{~~~~~~~~~~~~})
    ( herefore q)
    ((pand(p o q)) o q) Modus ponens
    ( eg q)
    (p o q)
    (overline{~~~~~~~~~~~~})
    ( herefore eg p)
    (( eg q and (p o q)) o eg p) Modus tollens
    (p o q)
    (q o r)
    (overline{~~~~~~~~~~~~})
    (p o r)
    ((p o q) and (q o r) o (p o r)) Hypothetical syllogism
    (p or q)
    ( eg p)
    (overline{~~~~~~~~~~~~})
    (q)
    (((por q) and eg p) o q) Disjunctive syllogism
    (p)
    (overline{~~~~~~~~~~~~})
    (p or q)
    (p o (por q)) Addition
    (p and q)
    (overline{~~~~~~~~~~~~})
    (p)
    ((pand q) o p) Simplification
    (p)
    (q)
    (overline{~~~~~~~~~~~~})
    (p and q)
    (((p) and (q)) o (pand q)) Conjunction
    (p or q)
    ( eg p or r)
    (overline{~~~~~~~~~~~~})
    (q or r)
    ((por q) and ( eg p or r) o (q or r)) Resolution

    此处的 Resolution 在一些逻辑式程序设计语言、定理的机械证明领域都有相当大的作用。

  • 一些常见的谬误(Fallacies)

  • 含有量词的三段论

Exercises

T34

The Logic Problem, taken from WFF'N PROOF, The Game of Logic, has these assumptions:

  1. "Logic is difficult or not many students like logic"
  2. "If mathematics is easy, then logic is difficult"

By translating these assumptions into statements involving propositional variables and logical connectives, determine whether each of the following are valid conclusions of these assumptions:

a) That mathematics is not easy, if many students like logic

b) That not many students like logic, if mathematics is not easy

c) That mathematics is not easy or logic is difficult

d) That logic is not difficult or mathematics is not easy

e) That if not many students like logic, the either mathematics is not easy or logic is not difficult

Sol

先规定一下符号,

(p) : "Logic is difficult"

(q) : "Many students like logic"

(r) : "Mathematics is easy"

题设有 (p or eg q) , (r o p)

a) (q o eg r)

b) ( eg r o eg q)

c) ( eg r or p)

d) ( eg p or eg r)

e) ( eg q o ( eg r or p))

1.8 Proof Methods and Strategy

Exercises

T27

Write the number (1,2,dots,2n) on a blackboard, where (n) is an odd integer. Pick ant two of the numbers, (j) and (k) ,write (|j-k|) on the board and erase (j) and (k). Continue this process until only one integer is written on the board. Prove that this integer must be odd.

P.f.

讨论选中数的情况,观察其结果:

(1^circ) 选中两个奇数,奇数个数减二,偶数个数加一

(2^circ) 选中两个偶数,偶数个数减一

(3^circ) 选中一奇一偶两数,偶数个数减一

可以发现,奇数只可能成对减少。而考虑到奇数总共只有奇数个,故最终必然会剩余一个奇数。

T28

Suppose that five ones and four zeros are arranged around a circle. Between any two equal bits you insert a 0 and between any two unequal bits you insert a 1 to produce nine new bits. The you erase the nine original bits. Show that when you iterate this procedure, you can never get nine zeros.

P.f.

假设我们第一次得到了一个全 0 的圆环,根据题设,这是由一个全 1 的圆环得到的。

而若想获得一个全 1 的圆环,就需要环上任意两个相邻的 bit 都不相同。圆环共有 9 个 bit,只可能为 101010101 或 010101010 的情况,环上总有两相邻 bit 值相同。

矛盾,故假设不成立,不能得到全 0 的圆环

T39

Let (S=x_1 y_1+x_2 y_2+ dots + x_n y_n) , where (x_1,x_2,dots,x_n) and (y_1,y_2,dots,y_n) are orderings of two different sequences of positive real numbers, each containing (n) elements.

a) Show that (S) takes its maximum value over all orderings of the two sequences when both sequences are sorted (so that the elements in each sequence are in nondecreasing order)

b) Show that (S) takes its minimum value over all orderings of the two sequences when one sequence is sorted into nondecreasing order and the other is sorted into nonincreasing order.

P.f.

由等价性,我们不妨假定 ({x_n}) 始终不减,仅改变 ({y_n}) 的排列方式。

显然,对于某个特定的 (i)(x_i) 越大时,(y_i)(S) 的贡献越高。我们排列 ({y_n}) 时,若要 (S) 取最大值,则使较大的 (y_i) 贡献更大,反之亦然。于是 a) b) 两结论显然成立。

T48

Prove that when a white square and a black square are removed from an (8 imes 8) checkerboard (colored as in the text) you can tile the remaining squares of the checkerboard using dominoes.

HINT: Show that when one black and one white square are removed, each part of the partition of the remaining cells formed by inserting the barriers shown in the figure can be covered by dominoes.

image-20210314152449529

P.f.

(1^circ) 若删去的黑白两块是相邻的:无论这两块在什么位置,我们总可以平行地在其相邻位置摆放一个 dominoe ,从而占据一个方形的位置。之后,我们总可以用一些方向相同的 dominoe 把这个方形所在的两行占满。此时棋盘上只剩余一些空行,我们逐行用横向的 dominoe 覆盖即可。

(2^circ) 若删去的黑白两块不相邻,但在同一行上:两块之间一定有偶数个空格,我们水平地摆放 dominoe 填满即可。接下来分别考虑两块到左右边界间的空格个数。若为偶数则水平摆放 dominoe 填满,若为奇数则竖直摆放填满。这样操作之后在两块相邻的一行中必然会剩余偶数个连续的空格,同样水平摆满。接下来棋盘上就只剩余一些空行了,逐行处理即可。

(3^circ) 若删去的两块不相邻而在同一列上,由对称性与情况 (2) 等价。

(4^circ) 若删去的两块不在同一行或同一列上:

观察容易发现,颜色相异的两块之间的曼哈顿距离总为奇数。

因而,我们考虑由所选两块作为对角构成的矩形,则矩形的长宽总为一奇一偶。由对称性,我们不妨假定矩形水平方向有偶数格,竖直方向有奇数格。在竖直方向,考虑所选两块所在的边界列,我们总可以用一些竖直的 dominoe 将空格填满。此时剩余一个奇行偶列的矩形,我们用水平的 dominoe 逐行填满即可。

之后在考虑矩形外部的空格。由于所选矩形在水平方向有偶数格,我们总可以用水平的 dominoe 逐行把矩形所在列的所有空格填满。此时棋盘上只剩下一些空列,逐列处理即可。

T50

Find all squares, if they exist, on an (8 imes 8) checkerboard such that the board obtained by removing one of these squares can be tiled using straight triominoes.

Sol

按照书 PAGE 111 FIGURE 7 上的方案,给棋盘三色染色。共有 21 个黑块,21 个蓝块,22 个白块。由于每个 straight triominoes 都会覆盖三个不同颜色的块,所以需要删去的一定是一个白色块。又由于棋盘的对称性,我们只考虑棋盘四分后左上角的那些白块:

photo_2021-03-13_12-06-45

容易构造出这样的解:

photo_2021-03-14_15-10-16

于是对称位置的其他三个白块也是类似的。其他的块似乎都不能使用 triominoes 覆盖。不可行性不会证明。题设也没让 prove ,姑且蒙混过关吧。

T51

a) Draw each of the five different tetrominoes, where a tetromino is a polyomino consisting of four squares.

b) For each of the five different tetrominoes, prove or disprove that you can tile a standard checkerboard using these tetrominoes.

Sol

随手画了一下,总之是有这几种:

photo_2021-03-14_16-11-34

①②可行性显然。

两个③可以组合成一个 (2 imes4) 的矩形,于是也可行。

对于④,可以构造出这样的解:

photo_2021-03-14_16-18-11

⑤不能完美地覆盖棋盘。假定用一个⑤型 tetrominoe 覆盖了棋盘上的左上角,则由于其形状限制,只能平行地摆放下一块 tetrominoe ,如此反复必将超过棋盘边界。

T52

Prove or disprove that you can tile a (10 imes10) checker-board using straight tetrominoes.

P.f.

工作簿1

先做染色,数数发现:

矢车菊蓝:26块

巧克力黄:25块

浅绿:24块

浅灰:25块

每块直的 tetrominoes 总会覆盖四种颜色各一次,因而显然无解。

原文地址:https://www.cnblogs.com/Shimarin/p/14352799.html