离散结构:基础结构:集合,函数,序列,总和,和矩阵(Basic Structure:Set,Function,Sequences,Sums and Matrixes )(1)

第二章:

章节汇总:

  • 集合:
    • 集合语言,集合操作,集合
  • 函数:
    • 函数种类,函数操作,可计算性
  • 序列:
    • 序列种类,求和公式
  • 总和:
    • 可数集
  • 矩阵:
  • 矩阵算术

Chapter Summary

  • Sets
    • The Language of Sets, Set Operations, Set Identities
  • Functions
    • Types of Functions, Operations on Functions,
    • Computability
  • Sequences and Summations
    • Types of Sequences, Summation Formulae
  • Set Cardinality
    • Countable Sets
  • Matrices
    • Matrix Arithmetic

集合:

小节汇总:

  • 集的定义
  • 描述集
    • 名册方法
    • Set-Builder表示法
  • 数学中的一些重要集合
  • 空集和通用集
  • 子集和设置平等
  • 集合的基数
  • 元组
  • 笛卡尔积

Section Summary

  • Definition of sets
  • Describing Sets
    • Roster Method
    • Set-Builder Notation
  • Some Important Sets in Mathematics
  • Empty Set and Universal Set
  • Subsets and Set Equality
  • Cardinality of Sets
  • Tuples
  • Cartesian Product

简介

  • 集合是离散数学中考虑的对象类型的基本构建块之一。
    • 计数很重要。
    • 编程语言已设置操作。
  • 集合论是数学的一个重要分支。
    • 许多不同的公理系统已被用于发展集合论。
    • 这里我们不关心集合论的正式公理集。 相反,我们将使用所谓的朴素集理论(第118页)。
  • Sets are one of the basic building blocks for the types of objects considered in discrete mathematics.
    • Important for counting.
    • Programming languages have set operations.
  • Set theory is an important branch of mathematics.
    • Many different systems of axioms have been used to develop set theory.
    • Here we are not concerned with a formal set of axioms for set theory. Instead, we will use what is called naïve set theory( page 118).

集合:

  • 集合是无序的对象集合。
    • 本课程的学生
    • 这个房间的椅子
  • 集合中的对象称为元素或集合的成员。 据说一组包含其元素。
  • 符号a∈A表示a是集合A的元素。
  • 如果a不是A的成员,请写一个∉A

set:

  • A set is an unordered collection of objects.
    • the students in this class
    • the chairs in this room
  • The objects in a set are called the elements, or members of the set. A set is said to contain its elements.
  • The notation a ∈ A denotes that a is an element of the set A.
  • If a is not a member of A, write a ∉ A

描述集合:名册方法

  • S= {a,b,c,d}
  • 顺序不重要
  • S = {a,b,c,d} = {b,c,a,d}
  • 每个不同的对象都是成员; 不止一次列出同一成员不会改变集合。
  • S = {a,b,c,d} = {a,b,c,b,c,d}
  • 当规律明了时,Elipses(...)可用于描述一个集合而不列出所有成员。
  • S = {a,b,c,d,......,z}

Describing a Set: Roster Method

  • S = {a,b,c,d}
  • Order not important
  • S = {a,b,c,d} = {b,c,a,d}
  • Each distinct object is either a member or not; listing more than once does not change the set.
  • S = {a,b,c,d} = {a,b,c,b,c,d}
  • Elipses (...) may be used to describe a set without listing all of the members when the pattern is clear.
  • S = {a,b,c,d, ......,z }

 

  • 英语字母表中所有元音的集合:V = {a,e,i,o,u}
  • 小于10的所有奇数正整数的集合:O = {1,3,5,7,9}
  • 小于100的所有正整数的集合:S = {1,2,3,........,99}
  • 小于0的所有整数的集合:S = {....,-3,-2,-1}
  • Set of all vowels in the English alphabet: V = {a,e,i,o,u}
  • Set of all odd positive integers less than 10: O = {1,3,5,7,9}
  • Set of all positive integers less than 100: S = {1,2,3,........,99}
  • Set of all integers less than 0: S = {...., -3,-2,-1}

一些重要的集合

  • N =自然数= {0,1,2,3 ....}
  • Z =整数= {..., - 3,-2,-1,0,1,2,3,...}
  • Z + = 正整数= {1,2,3,.....}
  • R =实数集
  • R + =正实数集合
  • C =复数集合。
  • Q =有理数集

Some Important Sets

  • N = natural numbers = {0,1,2,3....}
  • Z = integers = {...,-3,-2,-1,0,1,2,3,...}
  • Z+ = positive integers = {1,2,3,.....}
  • R = set of real numbers
  • R+ = set of positive real numbers
  • C = set of complex numbers.
  • Q = set of rational numbers

描述一个集合:集生成器表示法

  • 指定所有成员必须满足的属性:
  • S = {x | x是小于100的正整数}
  • O = {x | x是小于10的奇数正整数} O = {x∈Z+ | x是奇数,x <10}
  • 可以使用谓词:S = {x | P(x)}
  • 示例:S = {x | Prime(x)}
  • 正有理数:
  • Q + = {x∈R| x = p / q,对于某些正整数p,q}

Describing a Set: Set-Builder Notation

  • Specify the property or properties that all members must satisfy:
  • S = {x | x is a positive integer less than 100}
  • O = {x | x is an odd positive integer less than 10} O = {x ∈ Z+ | x is odd and x < 10}
  • A predicate may be used: S={x|P(x)}
  • Example: S = {x | Prime(x)}
  • Positive rational numbers:
  • Q+ = {x ∈ R | x = p/q, for some positive integers p,q}

间隔符号

  • [a,b] = {x | a ≤ x ≤ b}
  • [a,b)={x|a≤x<b}
  • (a,b]={x|a<x≤b}
  • (a,b)={x|a<x<b}
  • 闭区间[a,b]
  • 开区间(a,b)

Interval Notation

  • [a,b] = {x | a ≤ x ≤ b}
  • [a,b)={x|a≤x<b}
  • (a,b]={x|a<x≤b}
  • (a,b)={x|a<x<b}
  • closed interval [a,b]
  • open interval (a,b)

包含其他集的集

  • 示例:集合{N,Z,Q,R}是一个包含四个元素的集合,每个元素都是一个集合。 这个集合的四个元素是

N,自然数的集合;
Z,整数集;
Q,有理数的集合; 和R,一组实数。

Sets containing other sets

  • Example: The set {N,Z,Q,R} is a set containing four elements, each of which is a set. The four elements

of this set are
N, the set of natural numbers;
Z, the set of integers;
Q, the set of rational numbers; and R, the set of real numbers.

计算机科学中的数据类型

  • 计算机科学中数据类型或类型的概念建立在集合的概念之上。
  • 特别是,数据类型或类型是集合的名称,以及可以对该集合中的对象执行的一组操作。
  • 例如,boolean是集合{0,1}的名称以及该集合的一个或多个元素上的运算符,例如AND,OR和NOT。
  • 你还有另一个例子吗?

Datatype in Computer Science

  • The concept of a datatype, or type, in computer science is built upon the concept of a set.
  • In particular, a datatype or type is the name of a set, together with a set of operations that can be performed on objects from that set.
  • For example, boolean is the name of the set {0, 1} together with operators on one or more elements of this set, such as AND, OR, and NOT.
  • Do you have another example?

 

全集和空集

  • 全集U是包含当前正在考虑的所有内容的集合。
    • 有时暗示
    • 有时明确说明。
    • 内容取决于具体情况。
  • 空集(空集)是没有元素的集合。 符号化∅,但也使用{}。

Universal Set and Empty Set

  •  The universal set U is the set containing everything currently under consideration.
    • Sometimes implicit
    • Sometimes explicitly stated.
    • Contents depend on the context.
  • The empty set(null set)is the set with no elements. Symbolized ∅, but {} also used.

要记住一些事情

  • 集合可以是集合的元素。

{{1,2,3},a,{b,c}}

{N,Z,Q,R}

  • 空集与包含空集的集不同。

∅≠{∅}

Some things to remember

  • Sets can be elements of sets.

{{1,2,3},a, {b,c}}

{N,Z,Q,R}

  • The empty set is different from a set containing the empty set.

∅ ≠{ ∅ }

集合相等

  • 定义:当且仅当它们具有相同的元素时,两个集合是相等的。
    • 因此,如果A和B是集合,当且仅当A和B是相同的集合,则A和B相等,

我们认为A = B if A 和 B是等集 。

{1,3,5} = {3,5,1}
{1,5,5,5,3,3,1} = {1,3,5}

Set Equality

Definition: Two sets are equal if and only if they have the same elements.

  • Therefore if A and B are sets, then A and B are equal if and only if Any x(x∈A<->x∈B)
  • We write A = B if A and B are equal sets.

{1,3,5} = {3, 5, 1}

{1,5,5,5,3,3,1} = {1,3,5}

维恩图

John Venn(1834-1923)英国剑桥

  • 可以用英语数学家约翰·维恩(John Venn)命名的图表,以图表的形式使用文字图,他们在1881年介绍了它们的用法。

  • 在维恩图中,包含所有考虑对象的通用集U由矩形表示。

 

Venn Diagrams

John Venn (1834-1923) Cambridge, UK

  • Sets can be represented graphically using Venn diagrams, named after the English mathematician John Venn, who introduced their use in 1881.

  • In Venn diagrams the universal set U, which contains all the objects under consideration, is represented by a rectangle.

  • Inside this rectangle, circles or other geometrical figures are used to represent sets. Sometimes points are used to represent the particular elements of the set.

  • Venn diagrams are often used to indicate the relationships between sets.

 

子集

定义:集合A是B的子集,当且仅当A的每个元素也是B的元素时。

  • 符号A⊆B用于表示A是集合B的子集。

  • 当且仅当a为真时,A⊆B成立。

        1.因为对于每一组S,a∈∅总是假的,对于任何 S,∅S。

        2.因为αS→a∈S,S⊆S,forevery setS。

        ⊆:子集

Subsets

Definition: The set A is a subset of B, if and only if every element of A is also an element of B.

  • The notation A ⊆ B is used to indicate that A is a subset of the set B.

  • A ⊆ B holds if and only if   is true.

            1. Because a ∈ ∅ is always false, ∅ ⊆ S , for every set S.

            2. Becausea∈S →a∈S, S⊆S, for every set S.

            ⊆ : subset of

 

表明一个集合是否是另一个集合的子集

  • 表明A是一个B的子集:为表明A⊆B,表明如果x属于A,那么x也属于B.

  • 表明A不是B的子集:为了表明A不是B的子集,A⊈B,找一个属于元素 x∈A与x∉B。(这样的x是声称x∈Aimpliesx∈B的反例。)

例子:

1.你学校所有计算机科学专业的学生都是你学校所有学生的一部分。

2.平方小于100的整数集不是非负整数集的子集。

 

Showing a Set is or is not a Subset of Another Set

  • Showing that A is a Subset of B: To show that A⊆B, show that if x belongs to A, then x also belongs to B.

  • Showing that A is not a Subset of B: To show that A isnotasubsetofB,A⊈B, find an elementx∈Awith x ∉ B. (Such an x is a counterexample to the claim that x∈Aimpliesx∈B.)

Examples:

1. The set of all computer science majors at your school is a subset of all students at your school.

2. The set of integers with squares less than 100 is not a subset of the set of nonnegative integers.

 

再看看集合的平等性

  • 回想一下,两组A和B相等,用A = B表示,iff

  • Any x(x∈A<->x∈B)

  • 使用逻辑等价,我们得到A = B iff

  • 这等价于

                            A⊆B和B⊆A

Another look at Equality of Sets

  • Recall that two sets A and B are equal, denoted by A = B, iff

    • Any x(x∈A<->x∈B)

  • Using logical equivalences we have that A = B iff

  • This is equivalent to

                            A⊆B and B⊆A

 

真子集

定义:如果A⊆B,但A≠B,那么wesayAisa B的真子集,用A⊂B表示。如果A⊂B,那么

是真的。

Proper Subsets

Definition:IfA⊆B,butA ≠B,thenwesayAisa proper subset of B, denoted by A ⊂ B. If A ⊂ B, thenis true.

 

集合的基数

定义:如果S中恰好有n个不同的元素,其中n是非负整数,我们说S是有限的。 否则它是无限的。

定义:有限集A的基数,由| A |表示,是A的(不同)元素的数量。

例子:

1. |ø| = 0

2.设S是英文字母的字母。 然后| S | = 26

3. | {1,2,3} | = 3

4. | {ø} | = 1

5. 整数集是无限的。

 

Set Cardinality

Definition: If there are exactly n distinct elements in S where n is a nonnegative integer, we say that S is finite. Otherwise it is infinite.

Definition: The cardinality of a finite set A, denoted by |A|, is the number of (distinct) elements of A.

Examples:

1. |ø| = 0

2. Let S be the letters of the English alphabet. Then |S| = 26

3. |{1,2,3}| = 3

4. |{ø}| = 1

5. The set of integers is infinite.

 

幂集

定义:集合A的所有子集的集合,表示为P(A),称为A的幂集。

示例:如果A = {a,b}则

P(A)= {ø,{a},{b},{a,b}}总共4个子集 - 2^2

  • 如果一个集合有n个元素,那么幂集的基数是2^n。

  • 让我们以另一种方式看同一个例子。 示例:如果A = {a,b},则P(A)= {ø,{a},{b},{a,b}}

使用二进制数字1表示元素包含在子集中; 使用二进制数字0表示元素未包含在子集中。

00-子集中既不包含a也不包含b。ø

01 - b,而不是a,包含在子集中。{b}

10 - a,而不是b,包含在子集中。 {a}

11 - a或b都包含在子集中。{a,b}

  • 如果一个集合有n个元素,那么幂集的基数是2^n。

 

示例:购买锤子和螺丝刀的方式有多少种?

解:

A = {锤子,螺丝刀}然后

P(A)= {ø,

{一个锤子},

{一把螺丝起子},

{锤子,螺丝刀}}

 

示例:空集的幂集是多少? 集合{∅}的幂集是多少?

解:

空集恰好有一个子集,即它本身。 所以,

P(∅)= {∅}。

集合{∅}恰好有两个子集,即∅和

设置{∅}本身。 因此,P({∅})= {∅,{∅}}。

 

 

Power Sets

Definition: The set of all subsets of a set A, denoted P(A), is called the power set of A.

Example: If A = {a,b} then

P(A) = {ø, {a},{b},{a,b}} 4 subsets in total - 22

  • If a set has n elements, then the cardinality of the power set is 2n.

 

  • Let’ s look at the same example in another way. Example: If A = {a,b} then P(A) = {ø, {a},{b},{a,b}}

Use binary digit 1 to indicate an element is contained in a subset; use binary digit 0 to indicate an element is not contained in a subset.

00 – neither a nor b is contained in a subset. ø 01 – b, not a, is contained in a subset. {b}

10 – a, not b, is contained in a subset. {a}

11 – both a or b is contained in a subset. {a,b}

  • If a set has n elements, then the cardinality of the power set is 2n.

 

Example: How many different ways are there to purchase a hammer and a screw driver?

Solution:

A = {a hammer, a screw driver} then P(A) = {ø,

{a hammer},

{a screw driver},

{a hammer, a screw driver}}

 

Example: What is the power set of the empty set? What is the power set of the set {∅}?

Solution:

The empty set has exactly one subset, namely, itself. Consequently,

P(∅) = {∅}.

The set {∅} has exactly two subsets, namely, ∅ and the

set {∅} itself. Therefore, P({∅}) = {∅, {∅}}.

 

有序的n元组

  • 有序的n元组(a1,a2,.....,an)是有序集合,其中a1作为其第一个元素,a2作为其第二个元素,依此类推,直到作为其最后一个元素。

  • 当且仅当它们的相应元素相等时,两个n元组是相等的。

  • 2元组称为有序对。

  • 当且仅当a = c且b = d时,有序对(a,b)和(c,d)相等。

 

Ordered n-Tuples

  • The ordered n-tuple (a1,a2,.....,an) is the ordered collection that has a1 as its first element and a2 as its second element and so on until an as its last element.

  • Two n-tuples are equal if and only if their corresponding elements are equal.

  • 2-tuples are called ordered pairs.

  • The ordered pairs (a,b) and (c,d) are equal if and only if a = c and b = d.

 

笛卡尔积

定义:由A×B表示的两组A和B的笛卡尔乘积是有序对(a,b)的集合,其中a∈A和b∈B。

例:

A = {a,b} B = {1,2,3}

A×B = {(a,1),(a,2),(a,3),(b,1),(b,2),(b,3)}

  • 定义:笛卡尔乘积A×B的子集R称为从集合A到集合B的关系。关系将在第9章中详细介绍。

  • 定义:集合A1,A2,......,An的笛卡尔积,由A1×A2×......×An表示,是有序n元组(a1,a2,...)的集合。 .....,a)ai属于Ai

对于i = 1,... n。

示例:什么是A×B×C,其中A = {0,1},B = {1,2}且C = {0,1,2}

解:A×B×C = {(0,1,0),(0,1,1),(0,1,2),(0,2,0),(0,2,1),( 0,2,2),(1,1,0),(1,1,1),(1,1,2),(1,2,0),(1,2,1),(1,2,2)}

 

Cartesian Product

Definition: The Cartesian Product of two sets A and B, denoted by A × B is the set of ordered pairs (a, b) where a∈A and b∈B.

Example:

A = {a,b} B = {1,2,3}

A × B = {(a,1),(a,2),(a,3), (b,1),(b,2),(b,3)}

  • Definition: A subset R of the Cartesian product A × B is called a relation from the set A to the set B. (Relations will be covered in depth in Chapter 9. )

  • Definition: The cartesian products of the sets A1,A2,......,An, denoted by A1 × A2 × ...... × An , is the set of ordered n-tuples (a1,a2,......,an) where ai belongs to Ai

for i = 1, ... n.

 

Example: What is A × B × C where A = {0,1}, B = {1,2} and C = {0,1,2}

Solution: A × B × C = {(0,1,0), (0,1,1), (0,1,2),(0,2,0), (0,2,1), (0,2,2),(1,1,0), (1,1,1), (1,1,2), (1,2,0), (1,2,1), (1,2,2)}

 

量词的真实集合

  • 给定谓词P和域D,我们将P的真值集定义为D中P(x)为真的元素集。 P(x)的真值集用表示

  • 例子:P(x)的真值集,其中域是整数,P(x)是“| x | = 1“是集合{-1,1}

 

Truth Sets of Quantifiers

  • Given a predicate P and a domain D, we define the truth set of P to be the set of elements in D for which P(x) is true. The truth set of P(x) is denoted by

  • Example: The truth set of P(x) where the domain is the integers and P(x) is “|x| = 1” is the set {-1,1}

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值