人工智能教程 - 数学基础课程1.5 - 离散数学-3-5 不变式,第二数学归纳法

本文介绍了在人工智能领域中,离散数学的基础概念——不变式和第二数学归纳法。通过引理和证明阐述了不变量如何在移动字母拼图问题中保持奇偶性,以及如何利用第二数学归纳法解决无法达到特定状态的问题,强调了这些数学原理在算法设计和分析中的重要性。
摘要由CSDN通过智能技术生成

不变式和第二数学归纳法

Good proofs are:
  • correct
  • complete
  • clear
  • brief
  • elegant
  • well-organized
  • inorder
introduction:

Legal Move:slide a letter into adjacent square?

A B C
D E F
H G

to

A B C
D E F
G H

Thm:
there is no sequence of legal moves to invert G &H and return all other letters to original position

不变式(invariant)

引理一:(Lemma1)
横向移动不改变字母的相对顺序。

A row move does not change the order

Proof: In a row move, we move an item from cell i into an adjacent cell i-1 or i+1 .Nothing else moves.Hence the order of items is preserved. □ \square

引理二:(Lemma2)
A column move changes the relative order of precisely 2 pairs of items

Proof: In a column move, we move an item from cell i into an blank spot i-3 or i+3 .
When an item moves three positions,It changes relative order with two other items.(i-1,i-2 or i+1,i+2) □ \square

Def:一对字母,记作L1和L2,他们表示两个颠倒的字母,叫做一对逆序。也就是如果字母表中L1在L2前面,那么在拼图中L2会出现在L1后面。

(A pair of letters of items,call L1 and L2.they form an inversion,also known as an inverted pair,if L1 precedes L2 in the alphabet,but L1 appears after L2 in the puzzle)

A B C
D E F
H G

1 inversion

to

A B C
D E F
G H

0 inversion

conclusion: 1 inversion can never get 0 inversion

引理三:(Lemma3)
在一次移动中,逆序对的数量一次只能增加或者减少两个或者保持不变。

during a move,the number of inversion can only increase by two ,decrease by two or stay same.

Pf:
Row move : no changes (by lemma1)
column move: 2 pairs change order(by lemma2)

A. both pairs were inorder ⇒ \Rightarrow inversions ↑2
B. both pairs were inverted ⇒ \Rightarrow inversions ↓2
C. one pair was inverted ⇒ \Rightarrow

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值