2024-2025学年下学期期中
2024-2025学年下学期期中试卷(A)(含答案)
一、Logic (5 questions, 35 points)
-
(6 points) Determine the truth value of each of these statements if the universe of discourse for all variables consists of all integers.
解:
- T
- F
- T
-
(5 points) 证明下面的公式(不用真值表方法)
解:
-
(9 points) 将下列命题符号化(要求使用全总个体域)
- 火车比轮船快
- 在北京工作的人未必都是北京人
- 部分序集 没有最大元
解:
(1)令 : 是火车,: 是轮船,: 比 快。
(2)令 : 是北京人,: 在北京工作。
(3)令 :,:。
-
(7 points) 试证明下面的推理为有效推理
前提:
结论:
解:
- ,前提引入。
- ,由(1)UI 规则。
- ,前提引入。
- ,由(3)UI 规则。
- ,由(2)(4)拒取。
- ,前提引入。
- ,由(6)UI 规则。
- ,由(5)(7)析取三段论。
- ,UG 规则。
-
(8 points) 判断如下的结论是否正确
解:
- True.
- False.
- False.
- True.
二、Sets and Functions (3 questions, 20 points)
-
(6 points) Let and be sets. Prove that
if and only if .
解:
:若 ,则
:若 ,则
-
(8 points) Determine whether these statements are true or false.
- .
- If and are both uncountable sets, then is also uncountable.
- The mapping from to defined by is a function which is neither onto nor one-to-one.
- The mapping from to defined by is a function which is both onto and one-to-one.
解:
- False.
- False. If and , then .
- False. is not a function since it is undefined at .
- True.
-
(6 points) Suppose is an infinite set. Prove that has a proper subset (i.e., ) such that .
解:
Since is infinite, it has a infinite countable subset . Suppose
Let
We can construct a bijection from to as:
Thus we have and complete the proof.
三、Relations (4 questions, 45 points)
-
(10 points) 设 ,分别定义以下操作:
- :对 取自反闭包
- :对 取对称闭包
- :对 取传递闭包
(1)请考虑两个组合操作:
请证明或举反例说明:是否恒有 ?若成立请证明;若不成立,请给出一个集合 和关系 的具体例子,并分别写出 与 。
(2)是否存在一个唯一的最小关系 ,同时满足以下三个性质:自反性、对称性、传递性。如果存在,请说明该关系 的构造方法;如果不存在,请说明原因。
解:
(1)不成立。举例 ,。
不包含 和 ,两者不相等。
(2)存在唯一的最小关系 ,即 的等价闭包。构造方法为:先取 的自反闭包 ,再取对称闭包 ,最后取传递闭包 。
-
(10 points) Considering relations on the set consisting of the first 100 positive integers, please answer the following questions:
(a) How many nonzero entries does the matrix representing the relation have if ;
(b) How many relations are there on set that are asymmetric(非对称);
(c) How many relations are there on set that are both symmetric and antisymmetric(对称且反对称).
解:
(a)
(b)
(c)
仅包含自环,每个元素可选是否包含自环。
-
(12 points) Given a function , define the relation
(a) Prove that the relation is an equivalence relation.
(b) Give the corresponding set of all equivalence classes.
(c) Define the function by . Prove that is a bijective function.
解:
(a) To prove that is an equivalence relation, we need to show that it satisfies reflexivity, symmetry, and transitivity.
- Reflexivity: For any , we have . Therefore, . This shows that is reflexive.
- Symmetry: If , then . This implies , so . This shows that is symmetric.
- Transitivity: If and , then and . This implies , so . This shows that is transitive.
Since satisfies all three properties, it is an equivalence relation.
(b) The set of equivalence classes is given by the partition of induced by the relation . Each equivalence class consists of all elements in that are related to each other under . Formally, the set of equivalence classes is:
where
(c) Define by
We need to show that is both injective (one-to-one) and surjective (onto).
Injectivity: Suppose . Then . By the definition of equivalence classes, and are in the same equivalence class, i.e., . Therefore, is injective.
Surjectivity: For any , there exists some such that . Then . This shows that every element in is the image of some equivalence class in . Therefore, is surjective.
Since is both injective and surjective, it is a bijective function.
-
(13 分) 设 表示集合 的所有划分构成的集合。给定集合 上的两个划分 和 ,若对于每个 均有某个 ,使 ,则称 是 的加细,记为 。
(a) 证明:集合 是一个偏序集。
(b) 对于 ,画出偏序集 的哈斯图。
(c) 对于 ,求 的最大下界和最小上界,其中 ,。
解:
(a) To show that is a poset, we need to verify three properties:
-
Reflexivity: For any partition , clearly every block of is a subset of itself, so .
-
Antisymmetry: Suppose and . Let . Since , there exists such that . Since , there exists such that . But and . Since the sets in a partition are non-overlapping, . Similarly, for any set in , it is equal to a set in . Thus, , and the relation is antisymmetric.
-
Transitivity: If and , then any block of is contained in some block of , which in turn is contained in some block of . Thus .
Therefore, is a poset.
(b) For , the set has 5 partitions:
The Hasse diagram is:
P4
/ | \
P1 P2 P3
\ | /
P0(c) Given:
Greatest Lower Bound: The meet is the finest partition that is coarser than both and . We find it by taking pairwise intersections:
- The element is merged with in , but forms a separate block in . Therefore, must form a separate block on its own.
- The element is merged with in and with in . Therefore, must form a separate block on its own.
- Through similar analysis, it can be concluded that all elements form separate blocks.
Least Upper Bound (LUB): The join is the coarsest partition that refines both and . We find it by taking connected components of the union:
- The block of and the block of intersect due to the element , and they are merged into .
- The block of is split into and in . However, since the LUB needs to be coarser than , the block is retained.
-