離散數學›Ch10 偏序集、格、布林代數與命題邏輯第 2 題/共 18 題
2. 命題邏輯、量詞、謂詞邏輯
#LS-10-002中命題邏輯量詞謂詞邏輯
- (11 points) Consider the classic Connect Four game, where players choose a color and then take turns dropping colored tokens into a six-row, seven-column vertically suspended grid. The objective of the game is to be the first to form a horizontal, vertical, or diagonal line of four of one's own tokens. Suppose that two players, one with yellow and the other with red tokens, are playing the game. Propositional functions , , and assert that the square in the -th row and the -th column (refer to the figure) contains a yellow, a red, and no token, respectively. Please use these predicates together with the connectives permitted to translate the statements in (a) to (c) into logic expressions. Permitted connectives are , and the pair of parentheses "()". For any propositional function , you should use the notation for and the notation for .
(a) (4 points) Four squares in the 2nd row contains four red tokens in a row.
(b) (4 points) Each column contains at least a yellow token.
(c) (3 points) If the square in the -th row and the -th column contains a token, the square contains either a red or a yellow token but not both.
參考答案與解析
(a) 第2列(row 2)中,從某個起始欄 開始的連續4個位置皆為紅色(4顆紅子連成一線),其中 可以是 到 (因為棋盤共7欄,起始欄最大只能是 ):
(b) 每一欄(共7欄)都至少有一格(6列中的某一列)是黃色:
(c) 對棋盤上每個位置 (,),若該格有棋子(即非空,),則該格恰好是紅色或黃色兩者之一(不能同時是紅色又是黃色):
📄 交大114
▤完整推導請見《WH 資工筆記 · 離散數學》Ch10 偏序集、格、布林代數與命題邏輯