离散数学问题回答

本文探讨了集合在机器学习中的使用,包括多元素集合、空集及其基数,以及多标签学习中输出向量作为函数的概念。同时,提到了元组作为完整数据表示的示例,并简单介绍了二叉树和带权无向图的定义。文章还讨论了重新定义二叉树和树的问题,以及在信息技术领域中,这些数据结构的优势和挑战。
摘要由CSDN通过智能技术生成

习题 1: { 0 , 1 , { 0 , 1 } , { 1 , 2 } } 有几个元素? 机器学习中, 这类形式的集合有什么优点和缺点?

该集合有4个元素,分别为‘0’、’1‘、{0,1}、{1,2}。

优点:可以存储多种数据。

缺点:这类形式的集合由于数据的类型不同,维度不同,在数据处理时比较复杂。

 

习题 2: ∅  的基数是多少? { ∅ }  呢?

∅ 表示空集合,即集合内无元素所以基数是0
{∅ }表示一个集合中存在一个空集合,所以基数是1

 

习题 5: 多标签学习中, 输出为一个向量,相应的学习器算不算函数呢? 

算函数。在多标签学习的学习器中,输入数据类型一定,输出数据为向量,映射关系是确定的,符合函数的定义:定义域上的每个点,在值域中有且仅有一个唯一的点相互对应。

 

习题 6: 元组只能表达对象的数据部分, 还是可以完整地表达? 用一个具体的程序来说明.

可以完整的表示。

#定义一个元组

Programing_languages=('Python','Java','C++')

print(type(Programing_languages))

for language in Programing_languages:
    print(language)

输出:

<class 'tuple'>
Python
Java
C++

 

习题7:定义二叉树

\mathrm{Let}\sum=\{1,r\}\ \mathrm{be\ the\ alphbet\ and\ \phi\ be\ a\ null\ node.\ A}\ binary\ tree\ \mathrm{is\ a\ triple\ T=}\(V,r,c\),\mathrm{where}\ V=\{v1,....,vn\}\ \mathrm{is\ the\ set\ of\ nodes,}r\in\ V\ \mathrm{is\ the\ root,\ and}\ c:V\ \cup\ \{\phi\}\ \mathrm{\times \sum \to V \ \cup \{\phi\}}\ \ \mathrm{satisfying}

a\)c(\phi,1)=c(\phi,r)=\phi \\;

b){\forall}v\ \in\ V ,{\exists}s \ \in \sum st.c(r,s)=v;

c){\forall}v\ \in \ V,!{\exists}s \ \in \sum st.c(v,s)=v.

 

习题八:定义带权无向图

\mathrm{A\ weighted\ undirected\ graph\ is\ a\ tuple} \ G_w=(V,w),\mathrm{where} \ V=\{v1,....,vn\} \mathrm{\ is\ the\ set\ of\ nodes, and}\ w:V\times V\rightarrow \mathbb{R_+}\cup \{0\} \mathrm{\ is\ the\ edge\ weight\ funtion,for\ each }<vi,vj>\in V\times V.\\w<vi,vk>=w<vk,vi>

 

习题九:考虑 ϕ , 重新写 Definition 7 以解决其存在的问题, 见其讨论 d). 

c) If \ V = \phi,then\ r=\phi,\ p(v)=\phi.

 

习题3.1 模仿自动机的样子来重新定义二叉树

\mathrm{A\ deterministic\ final\ automata(DAF)\ is\ a\ 5-tuple\ M}=(\Sigma,V,r,T,f),\mathrm{where} \\a)\ \Sigma=\{l,r\}\mathrm{\ is\ the\ alphabet} \\b)\ V=\{v_1,.....,v_n\}\ \mathrm{is\ the\ set\ of\ nodes} \\c)\ r\in\ V\ \mathrm{is\ the\ root\ of\ the\ tree,\ also\ is\ the\ start\ node} \\d)\ \phi\ \mathrm{is\ the\ set\ of\ terminal\ state} \\e)\ f:V\cup \{\phi\}\times\Sigma^* \to V\cup\{\phi\}\ \mathrm{is\ the\ transition\ funtion} \\Any\ s\in\Sigma^*\ \mathrm{is\ accepted\ by\ the\ automata\ iff\ \forall}v\in\ V,\exists1s\in\Sigma^*st.c(r,s)=v

 

习题3.2 模仿自动机的样子重新定义树 

\mathrm{A\ deterministic\ final\ automata(DAF)\ is\ a\ 5-tuple\ M}=(\Sigma,V,r,T,f),\mathrm{where} \\a)\ \Sigma=\{c\}\mathrm{\ is\ the\ alphabet,\ represent\ a\ child\ node} \\b)\ V=\{v_1,.....,v_n\}\ \mathrm{is\ the\ set\ of\ nodes} \\c)\ r\in\ V\ \mathrm{is\ the\ root\ of\ the\ tree,\ also\ is\ the\ start\ node} \\d)\ \phi\ \mathrm{is\ the\ set\ of\ terminal\ state} \\e)\ f:V\cup \{\phi\}\times\Sigma^* \to V\cup\{\phi\}\ \mathrm{is\ the\ transition\ funtion} \\Any\ s\in\Sigma^*\ \mathrm{is\ accepted\ by\ the\ automata\ iff\ \forall}v\in\ V,\exists1s\in\Sigma^*st.c(r,s)=v 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值