From a88870d347f5f684d5e67e858947ffb093b3594e Mon Sep 17 00:00:00 2001
From: Firisy Feng
Date: Wed, 3 Jul 2024 19:05:15 +0800
Subject: [PATCH] try pdf new
---
.github/workflows/ci.yml | 1 +
.../WLab1/WLab1.md" | 2 +-
.../preview.md" | 21 +-
.../Preview.md" | 2 +
docs/JY_FENG/JY-Feng.md | 26 +-
docs/stylesheets/singlePageTemplate.css | 1 +
mkdocs.yml | 2 +
.../index.html" | 44 +-
.../index.html" | 84 +-
.../index.html" | 124 +-
.../index.html" | 152 +-
.../index.html" | 36 +-
.../index.html" | 112 +-
.../WLab1/WLab1/index.html" | 2 +-
.../lab7/index.html" | 26 +-
.../preview/index.html" | 40 +-
.../Lab5/Lab5/index.html" | 4 +-
.../Lab6/Lab6/index.html" | 4 +-
.../Lab7/Lab7/index.html" | 4 +-
.../Lab9/Lab9/index.html" | 4 +-
.../Preview/index.html" | 2584 +++++++++++++++++
site/JY_FENG/JY-Feng/index.html | 25 +-
.../index.html" | 18 +-
.../index.html" | 12 +-
.../exams/15-16-middle/index.html" | 163 +-
.../exams/16-17-middle/index.html" | 139 +-
.../exams/17-18-middle/index.html" | 141 +-
.../exams/18-19-middle/index.html" | 173 +-
.../exams/19-20-middle/index.html" | 161 +-
.../mynotes/FDS-notes/index.html" | 60 +-
.../mynotes/midterm/index.html" | 56 +-
.../webnotes/DS WEEK01/index.html" | 14 +-
.../webnotes/DS WEEK02/index.html" | 24 +-
.../webnotes/DS WEEK03/index.html" | 36 +-
.../webnotes/DS WEEK04/index.html" | 12 +-
.../webnotes/DS WEEK05/index.html" | 14 +-
.../webnotes/DS WEEK06/index.html" | 34 +-
.../webnotes/DS WEEK07/index.html" | 24 +-
.../webnotes/DS WEEK08/index.html" | 28 +-
.../webnotes/DS WEEK09/index.html" | 16 +-
.../webnotes/DS WEEK10/index.html" | 12 +-
.../webnotes/DS WEEK11/index.html" | 24 +-
.../webnotes/DS WEEK12/index.html" | 12 +-
.../webnotes/DS WEEK13/index.html" | 28 +-
.../webnotes/DS WEEK14/index.html" | 24 +-
.../webnotes/DS WEEK15/index.html" | 14 +-
.../Foundation-of-Data-Structure/index.html" | 276 +-
.../webnotes/index.html" | 12 +-
.../3 ZJU-AI-ML/Approach almost/index.html | 4 +-
site/JY_HU/3 ZJU-AI-ML/ML-zju/index.html | 16 +-
.../index.html | 4 +-
.../DIP/index.html" | 4 +-
site/Others/CS61A-python/index.html | 52 +-
site/Others/content block example/index.html | 24 +-
.../index.html" | 14 +-
.../index.html" | 22 +-
site/Others/memories/index.html | 12 +-
site/mkdocs-guide/index.html | 8 +-
site/stylesheets/singlePageTemplate.css | 1 +
59 files changed, 3832 insertions(+), 1156 deletions(-)
create mode 100644 "docs/JY_FENG/3 \347\224\265\347\275\221\347\273\234\345\210\206\346\236\220/Preview.md"
create mode 100644 "site/JY_FENG/3 \347\224\265\347\275\221\347\273\234\345\210\206\346\236\220/Preview/index.html"
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 04524343..ed2a45bc 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -23,4 +23,5 @@ jobs:
- run: python -m pip install --upgrade pip
- run: pip install mkdocs-material
- run: pip install mkdocs-git-revision-date-localized-plugin
+ - run: pip install pip install mkdocs-pdf
- run: mkdocs gh-deploy --force
\ No newline at end of file
diff --git "a/docs/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/WLab1/WLab1.md" "b/docs/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/WLab1/WLab1.md"
index f7900261..8cb7764d 100644
--- "a/docs/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/WLab1/WLab1.md"
+++ "b/docs/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/WLab1/WLab1.md"
@@ -1 +1 @@
-
\ No newline at end of file
+![WLab1.pdf](./WLab1.pdf){ type=application/pdf style="height:600px;width:100%" }
\ No newline at end of file
diff --git "a/docs/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/preview.md" "b/docs/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/preview.md"
index e8941296..8130f3b1 100644
--- "a/docs/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/preview.md"
+++ "b/docs/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/preview.md"
@@ -1,3 +1,22 @@
## 写在前面 for 电路与电子技术实验I
-电院实验课本身内容并不复杂,具体操作老师基本上会给出,但是完成实验并得到效果还是一个比较繁琐的内容,再加上对实验报告有一定的要求,
\ No newline at end of file
+电院实验课本身内容并不复杂,具体操作老师基本上会给出,但是完成实验并得到效果还是一个比较繁琐的内容,再加上对实验报告有一定的要求,所以会觉得这2学分的课实在是性价比过高。
+
+综合实验报告成绩和两次考核成绩,本人最终成绩为94,所以可以以此为基准参考需要的努力程度。
+
+综合一年的实验感受,实验报告总的完成以下两点要求差不多就可以拿到一个不错的成绩:
+
+* 实验内容不缺不漏
+* 实验结果准确无误,和理论基本一致
+
+#### 学习内容
+
+**秋学期**:综合实验,各类内容均有涉及,主要目的是了解实验器材,然后对”电“有一定的概念。祁才军老师负责,但应该教完我们这一届就退休了。期末考试内容涉及PPT内容较多,认真阅读PPT,对期末考试有较大帮助。
+
+**冬学期**:电路原理部分实验。实际上涉及较多模电实验的内容。姚缨英老师主要负责。姚老师虽然看上去事情很多,实际上事情也是真的多。PPT上的实验内容也比较杂乱,但可以根据往届的实验报告推测老师的实验要求。同时有任何不理解的内容和要求,也建议主动问姚老师。姚老师会非常耐心地解答。
+
+#### 考试
+
+**秋学期**:期末考试以笔试形式考察秋学期的所有实验内容,认真阅读PPT
+
+**冬学期**:姚老师基本上会以各种方式提示期末考试的内容
\ No newline at end of file
diff --git "a/docs/JY_FENG/3 \347\224\265\347\275\221\347\273\234\345\210\206\346\236\220/Preview.md" "b/docs/JY_FENG/3 \347\224\265\347\275\221\347\273\234\345\210\206\346\236\220/Preview.md"
new file mode 100644
index 00000000..d3afd3f4
--- /dev/null
+++ "b/docs/JY_FENG/3 \347\224\265\347\275\221\347\273\234\345\210\206\346\236\220/Preview.md"
@@ -0,0 +1,2 @@
+# 写在前面 for 电网络分析
+
diff --git a/docs/JY_FENG/JY-Feng.md b/docs/JY_FENG/JY-Feng.md
index 31c25443..3cf05200 100644
--- a/docs/JY_FENG/JY-Feng.md
+++ b/docs/JY_FENG/JY-Feng.md
@@ -1,4 +1,22 @@
-```py
-import sys
-print(sys.exeutation)
-```
\ No newline at end of file
+编写者为ZJU 22级电子信息工程专业学生,由于加入爱迪生班,所以内容主要面向爱迪生班专业内容(爱迪生班内容会在后面标注$\alpha$)。
+
+这里作为我对本专业的回顾,以及一些经验~
+
+专业课大致内容如下:(打勾内容为已更新)
+
+* 电路与电子技术I与II**实验**($\alpha$) 实验报告 ✓
+* 电网络分析($\alpha$) 课程内容与拓展
+* 电路与电子技术I与II($\alpha$)一些笔记和经验之谈
+* 工程电磁场与波
+* 微机原理及应用($\alpha$)
+* 微机原理及应用综合实验($\alpha$)
+* 信号分析与处理实验($\alpha$),【为什么没有理论课?因为我恨傅里叶】
+* ......
+
+各类通识课:
+
+* 微观经济学原理
+* 概率论及数理统计
+* 微积分
+* 大学物理
+* ......
\ No newline at end of file
diff --git a/docs/stylesheets/singlePageTemplate.css b/docs/stylesheets/singlePageTemplate.css
index fe35c109..1a40b316 100644
--- a/docs/stylesheets/singlePageTemplate.css
+++ b/docs/stylesheets/singlePageTemplate.css
@@ -65,6 +65,7 @@
.hero_header {
font-size: 1.3rem;
/* Adjust width for smaller screens */
+ letter-spacing: 2px;
}
.tagline {
diff --git a/mkdocs.yml b/mkdocs.yml
index 91d8997d..488833c5 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -142,6 +142,7 @@ extra_css:
markdown_extensions:
- admonition
+ - attr_list
- pymdownx.arithmatex:
generic: true
- pymdownx.details
@@ -175,3 +176,4 @@ plugins:
enable_creation_date: true
type: timeago
enabled: true
+ - mkdocs-pdf
diff --git "a/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/Lab1/Lab1 \345\270\270\347\224\250\344\273\252\345\231\250\344\275\277\347\224\250\347\273\203\344\271\240\345\256\236\351\252\214/index.html" "b/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/Lab1/Lab1 \345\270\270\347\224\250\344\273\252\345\231\250\344\275\277\347\224\250\347\273\203\344\271\240\345\256\236\351\252\214/index.html"
index 4dbecb50..d2127398 100644
--- "a/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/Lab1/Lab1 \345\270\270\347\224\250\344\273\252\345\231\250\344\275\277\347\224\250\347\273\203\344\271\240\345\256\236\351\252\214/index.html"
+++ "b/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/Lab1/Lab1 \345\270\270\347\224\250\344\273\252\345\231\250\344\275\277\347\224\250\347\273\203\344\271\240\345\256\236\351\252\214/index.html"
@@ -3024,7 +3024,7 @@
-常用仪器使用练习实验
+常用仪器使用练习实验
实验日期:2023/9/18
地点:东3-406
实验目的
@@ -3059,7 +3059,7 @@
测试过程
选取不同的电阻,重复2~4步。
测试结果
-
+
这些电阻为五道色环对应读数
@@ -3090,7 +3090,7 @@ 测试结果
结果分析
使用万用表欧姆档所测量的电阻阻值与标称阻值略有偏差,但均在允许误差范围内。
-
+
(二)电位器(M) 中心头的功能
测试过程与测试结果
@@ -3104,12 +3104,12 @@ 测试过程与测试结果
将黑色表笔插入电位器位于中心的孔,红表笔插入两旁的孔。
-
+
旋转电位器旋钮,发现万能表示数发生变化。
我们观察到阻值从8.71KΩ,变至10.15KΩ。
-
+
调换红表笔至另一端的插孔,发现读书变为0,反方向旋转电位器,示数增大。
@@ -3120,7 +3120,7 @@ 测试过程与测试结果
结果分析
旋转电位器,能够改变电位器的阻值。中心头应该起到调节短路部分电阻的作用,从而使得电位器阻值发生变化。
-
+
(三)测量电容漏电阻
理想电容在充满电的情况下,应该完全绝缘,但实际情况并非如此,仍有一定量的电流通过,说明此时电容存在一个电阻,这个电阻被称为漏电阻。从以上分析也可以知道,电容的漏电阻应该非常大,所以选取的万用表欧姆最大档进行测量。在测验过程中,也选择过较小档位,但是,很快就会出现OL显示,说明电容的漏电阻非常大。
测试过程
@@ -3151,7 +3151,7 @@
测试结果与分析
-
+
(四)调节稳压电源输出 +/-12V
测试过程与测试结果
@@ -3159,10 +3159,10 @@ 测试过程与测试结果
将万用表切换至60V电压档,将红表笔与电源正极连接,黑表笔与负极连接,按输出按钮,测得读数12.09V,此时电源的电流示数自动跳为0A
再按一次输出按钮,停止电源输出,交换红黑表笔,再按输出按钮,此时,万用表显示-12.09V
-
+
结果分析
想要输出-12V,实际上只需要交换正常的输出方式即可
-
+
实验2:示波器和信号源的联合使用I
实验器材
@@ -3182,7 +3182,7 @@ (一)探头补偿信号自检
按AutoScale
按钮,将波形稳定地显示在屏幕上。
点按Meas
按钮进行数据测量。
-
+
@@ -3216,7 +3216,7 @@ 操作过程
更换信号源信号,重新测量。
数据记录与分析
-
+
@@ -3259,7 +3259,7 @@ 数据记录与分析
可见,信号源输出有一定误差,当然示波器检测也有一定的误差,导致测量值与所设想不同。
-
+
实验3:示波器和信号源的联合使用II
实验器材
@@ -3270,7 +3270,7 @@ 实验器材
10kΩ的电阻U~R~
实验方案
-
+
实验电路图如上。调节信号源为正弦函数,并且将信号频率分别调至10, 10^2^, 10^3^, 10^4^, 10^5^, 10^6^kHz,并将示波器探测头两端并联在阻值R处,利用自带的测试工具,测量出U~R~的有效值,并绘图,得出结论。
实验过程
@@ -3279,7 +3279,7 @@ 实验过程
观察示波器波形,使用上一个实验中的调节方法,至波形稳定,并测量出实际的有效值大小。
调至不同频率,重复上述实验。
-
+
实验过程中发现,当频率为10Hz时,示波器中显示的波形噪声非常大(如上图显示),因此,使用了trigger按键中,降低噪声的按钮,从而能够较好地测量出有效值,而非显示屏数字一直上下跳动。
实验结果
@@ -3317,10 +3317,10 @@ 实验结果
根据以上数据,绘制出数据图
-
+
结论
电阻两端的有效值随着信号源频率的升高先是缓慢上升,然后在10^2^~10^4^区间快速上升,最后趋于平缓,直至近似于电压源的有效值。体现出电容“隔直流,通交流”或者“通高频,阻低频”的特性。
-
+
探究性实验:万用表电流档
实验目的
探究万用表电流档(以6mA和60mA为例)内部阻值对测量结果的影响。
@@ -3343,7 +3343,7 @@ (一)探究不同电流档对真值的影响
调节电源电压为6.00V。
分别使用万用表的6mA和60mA档测量电路中的电流大小。
-
+
结果如下:
@@ -3385,7 +3385,7 @@ 实验过程
断开电路,由于R~B~不能显示电阻,所以使用了万用表欧姆档测量其电阻,得到结果即可近似为电流表内阻。
将电流表档位调为6mA,重复2~4步,其中第2步中电流表显示改为6mA(实验过程中,发现6mA可以调到所以没有考虑减小),第3步改为3mA。
-
+
实验结果
@@ -3446,8 +3446,8 @@ 实验误差分析
而6mA的误差只会更小,所以可以考虑选用半偏法进行测量。
最后我们发现,60mA档的6mA档内部的阻值相差十倍。因此在平时选用合理档位测量电路中的电流时应该妥善选择量程。
结合电流表的组装,即将一个微小电流表和分流电阻并连的结构可知,量程越大相对应的阻值越小。
-
-
+
+
示波器显示李萨如图像
实验目的
学会利用示波器上的Acquire
键,调节出两个信号源合并之后的李萨如图像。
@@ -3463,13 +3463,13 @@ 测试过程和结果
然后调制信号源输出波形均为1kHz的正弦波,然后点按输出键。
按示波器中的AutoScale
按钮,然后发现两列波稳定地显示在屏幕上。
-
+
点按Acquire
按钮,然后将时间模式调为XY显示,随后,发现示波器界面并没有变成预想的直线,后意识到,输出的波形并没有同相位,因此只要在信号源中点按同相位
即可。
调制不同相位差及频率之比的波形,重复2~3步。
实验结果
-
+
diff --git "a/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/Lab2/Lab2 \345\215\212\345\257\274\344\275\223\344\272\214\346\236\201\347\256\241\347\211\271\346\200\247\346\265\213\350\257\225/index.html" "b/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/Lab2/Lab2 \345\215\212\345\257\274\344\275\223\344\272\214\346\236\201\347\256\241\347\211\271\346\200\247\346\265\213\350\257\225/index.html"
index ecf57213..c93de5ad 100644
--- "a/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/Lab2/Lab2 \345\215\212\345\257\274\344\275\223\344\272\214\346\236\201\347\256\241\347\211\271\346\200\247\346\265\213\350\257\225/index.html"
+++ "b/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/Lab2/Lab2 \345\215\212\345\257\274\344\275\223\344\272\214\346\236\201\347\256\241\347\211\271\346\200\247\346\265\213\350\257\225/index.html"
@@ -2826,7 +2826,7 @@
-半导体⼆极管特性测试
+半导体⼆极管特性测试
实验日期:2023/9/26
地点:东3-406
实验目的
@@ -2861,13 +2861,13 @@
实验方案
应⽤MULTISIM软件仿真⼆极管的VA特性。
-
+
实验一:应⽤万⽤表初步测试⼆极管的好坏
测试过程与结果
认识万用表测量二极管档
-
+
将黑表笔插入COM
口,红表笔插入二极管测试对应二极管测试插口,并将档位调至二极管测量档位。由于蜂鸣器档位和二极管是同一档位,点按左上角Select
按钮,切换至二极管档位。
@@ -2876,28 +2876,28 @@ 测试过程与结果
将万用表红表笔接入1N4007正级,黑色接负极,此时万用表显示二极管导通电压。如下图所示,测得1N4007的正向导通电压约为0.568V。
-
+
将红黑表笔交换,测量方向电压,如下图所示,显示OL,超出量程。
-
+
利用相同方法测量稳压二极管,得到相似结果
-
+
结果分析
首先通过万用表可以很好地对二极管进行检测,如检验其是否被击穿。同时可以看到,在同样的测量条件下,稳压二极管比整流二极管正向导通电压要高。可以与课上所给的VA特性曲线相联系,万用表所提供的电压为三伏,稳压二极管导通后,电压将保持0.7V左右,而整流二极管的曲线类似于大电阻,因而万用表显示的电压值在0.568V。
-
+
实验二:逐点法测量二极管VA特性曲线
实验方案
采用以下电路,利用欧姆定律对二极管在每一点电压下的阻值进行测量。最后利用excel对数据进行处理,绘制曲线。
-
+
由于万用表的安培表阻值在该测试条件下(mA级别),视为短路;而相反,电压表的阻值足够大,可以视为开路,所以实验中只使用电压表来进行测量,将电压表并联在R~1~两端。并且利用电压源的示数,通过计算得出二极管两端电压与电流。
测试过程与结果
连接电路,并将电压源输出值调为0。
-
+
将万用表并联在电阻两端,测得电压示数。将此示数和电压源示数,一起记录到excel表格中。
@@ -3084,8 +3084,8 @@ 数据处理与分析
-
-
+
+
实验三:扫描法测量二极管VA特性曲线
实验方案
@@ -3097,7 +3097,7 @@ 实验方案
后通过matlab等数据处理,生成正确的曲线。
-
+
测试过程与结果
@@ -3130,7 +3130,7 @@ 测试过程与结果
17
18
19 % 读取数据
-data = readmatrix ( './Lab2/数据/111.csv' );
+data = readmatrix ( './Lab2/数据/111.csv' );
% 获取vd和id列
v1 = data (:, 2 );
@@ -3140,21 +3140,21 @@ 测试过程与结果
plot ( vd , id );
%生成平滑曲线
-smoothed_vd = smooth ( vd , 0.1 , 'loess' );
-smoothed_id = smooth ( id , 0.1 , 'loess' );
+smoothed_vd = smooth ( vd , 0.1 , 'loess' );
+smoothed_id = smooth ( id , 0.1 , 'loess' );
hold on ;
-plot ( smoothed_vd , smoothed_id , 'b-' , 'LineWidth' , 0.2 );
-legend ( '原始数据' , '光滑曲线' );
-xlabel ( '电压(V)' );
-ylabel ( '电流(mA)' );
-legend ( '实验数据' , 'VA特性曲线' );
+plot ( smoothed_vd , smoothed_id , 'b-' , 'LineWidth' , 0.2 );
+legend ( '原始数据' , '光滑曲线' );
+xlabel ( '电压(V)' );
+ylabel ( '电流(mA)' );
+legend ( '实验数据' , 'VA特性曲线' );
将二极管更换为稳压二极管,重复上述步骤。
结果分析
整流二极管
-
+
观察到以下几个特殊的地方:
@@ -3166,14 +3166,14 @@ 整流二极管
二极管方向恢复电流(Reverse Recovery Current) 在二极管由导通状态转变为截止状态时,电流反向流动的现象。当二极管从正向导通状态切换到反向截止状态时,载流子需要一定时间来清除。在这个短暂的时间内,二极管中的电流会反向流动,这就是方向恢复电流。方向恢复电流的大小和持续时间取决于二极管的特性和工作条件。
稳压二极管
-
+
可以观察到,稳压二极管的截止电压约为5.2V左右,与标称的5V/1W相匹配,同时可以观察到,稳压二极管相比于整流二极管,在两端电压增大的情况下,能保持一个较为稳定的电压值,约为0.76V左右。
-
+
实验三:仿真⼆极管的VA特性
实验方案
利用Multisim平台搭建电路,利用扫描法绘制二极管曲线。
Multisim平台一定需要一个接地端,同时示波器的接地端并不影响电路中的电位,因而实验电路如下:
-
+
示波器A接口为二极管两端电压,B接口为R1两端电压。利用示波器的B/A按钮,定性地显示VA特性曲线,再利用Matlab处理输出的数据。
测试过程与结果
@@ -3201,14 +3201,14 @@ 1V,没有为负数的点,因而采用了指数的拟合方式15
16
17
-18 data = readmatrix ( './Lab2/数据/1V.csv' );
+18
data = readmatrix ( './Lab2/数据/1V.csv' );
vd = data (:, 1 );
vr = data (:, 2 );
id = vr * 0.1 ;
% 使用fit函数进行数据拟合
-fitType = fittype ( 'a * exp(b * x)' ); % 选择适当的拟合函数
-fitOptions = fitoptions ( 'Method' , 'NonlinearLeastSquares' ); % 选择拟合方法
+fitType = fittype ( 'a * exp(b * x)' ); % 选择适当的拟合函数
+fitOptions = fitoptions ( 'Method' , 'NonlinearLeastSquares' ); % 选择拟合方法
fitOptions . StartPoint = [ 1 , - 0.1 ]; % 初始拟合参数猜测
% 进行数据拟合
@@ -3216,9 +3216,9 @@ 1V,没有为负数的点,因而采用了指数的拟合方式
% 绘制拟合曲线
plot ( fitResult , vd , id );
-xlabel ( '电压(V)' );
-ylabel ( '电流(mA)' );
-legend ( 'VA特性曲线' );
+xlabel ( '电压(V)' );
+ylabel ( '电流(mA)' );
+legend ( 'VA特性曲线' );
700V,由于数据点非常多,直接输出即位较光滑的曲线
Matlab 1
@@ -3233,7 +3233,7 @@ 700V,由于数据点非常多,直接输出即位较光滑的
10
11
12 % 读取数据
-data = readmatrix ( './Lab2/数据/700V_2.csv' );
+data = readmatrix ( './Lab2/数据/700V_2.csv' );
% 获取vd和id列
v1 = data (:, 1 );
@@ -3241,36 +3241,36 @@ 700V,由于数据点非常多,直接输出即位较光滑的
vd = v1 ;
id = v2 * 0.1 ;
plot ( vd , id );
-xlabel ( '电压(V)' );
-ylabel ( '电流(mA)' );
-legend ( '实验数据' , 'VA特性曲线' );
+xlabel ( '电压(V)' );
+ylabel ( '电流(mA)' );
+legend ( '实验数据' , 'VA特性曲线' );
结果分析
1V,主要分析二极管由导通到截止这一段的特点
-
+
700V,主要分析1N4007截止电压的特性
-
+
可以看出,由导通到截止这一部分,二极管的性质并不是非常稳定,所以曲线几乎填满了该段区域。
探究性实验:信号源内部电阻
引入
-
+
观察上面的黄色曲线,会发现,当二极管导通后,峰值电压骤降。而分析可知,Channel1所测的是信号源两端电压,而电压骤降说明了信号源内部有电阻,进行分压,导致其峰值减小。现测量信号源两端的电阻大小。
实验方案
采用以下电路,利用欧姆定律对其进行测量。通过测量峰值电压的变化,得出信号源内部电阻大小
-
+
测试过程与结果
将示波器接口两端与信号源两端连接。测出原本输出的电压幅值,\(V_{p1}=10.5V\) 。
-
+
连接方案中的电路图。
-
+
测出此时的电压峰值为,\(V_{p2}=5.23V\)
-
+
再次测量信号源两端电压,发现保持在10.5V,因此可以将信号源两端电压视为10.5V。
@@ -3280,7 +3280,7 @@ 结果分析
R_S=\dfrac{V_{p1}-V_{p2}}{I_R}=5.27V÷0.102A=51.7Ω
\]
计算得到,信号源内阻为51.7Ω,查阅说明书,得知Channel1输出的内阻在50Ω左右,因此可知测量基本准确。
-信号源内部有50Ω左右的阻值,所以,以后在定量测量的时候,需要将内阻考虑在内,以免影响最后结果的准确性。
+信号源内部有50Ω左右的阻值,所以,以后在定量测量的时候,需要将内阻考虑在内,以免影响最后结果的准确性。
diff --git "a/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/Lab3/Lab3 \346\225\260\345\255\227\347\224\265\350\267\257\351\200\273\350\276\221\350\256\276\350\256\241/index.html" "b/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/Lab3/Lab3 \346\225\260\345\255\227\347\224\265\350\267\257\351\200\273\350\276\221\350\256\276\350\256\241/index.html"
index 9c35e6da..f237d59e 100644
--- "a/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/Lab3/Lab3 \346\225\260\345\255\227\347\224\265\350\267\257\351\200\273\350\276\221\350\256\276\350\256\241/index.html"
+++ "b/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/Lab3/Lab3 \346\225\260\345\255\227\347\224\265\350\267\257\351\200\273\350\276\221\350\256\276\350\256\241/index.html"
@@ -2781,7 +2781,7 @@
-数字电路逻辑设计
+数字电路逻辑设计
实验日期:2023/10/9
地点:东3-406
实验目的
@@ -2954,15 +2954,15 @@
逻辑设计输入 task1.vhd
tmp := A & B & C ; -- 将ABC的输入值连接
--case语句 根据不同情况输出不同的Z值
case tmp is
- when "000" => Z <= '1' ;
- when "001" => Z <= '0' ;
- when "010" => Z <= '1' ;
- when "011" => Z <= '1' ;
- when "100" => Z <= '1' ;
- when "101" => Z <= '0' ;
- when "110" => Z <= '1' ;
- when "111" => Z <= '0' ;
- when others => Z <= '0' ;
+ when "000" => Z <= '1' ;
+ when "001" => Z <= '0' ;
+ when "010" => Z <= '1' ;
+ when "011" => Z <= '1' ;
+ when "100" => Z <= '1' ;
+ when "101" => Z <= '0' ;
+ when "110" => Z <= '1' ;
+ when "111" => Z <= '0' ;
+ when others => Z <= '0' ;
end case ;
end process ;
---------------------------------
@@ -3034,29 +3034,29 @@ 逻辑设计仿真 test_tb.vhd
U1 : Task1 port map ( A => A , B => B , C => C , Z => Z ); --端口映射,将ABC的值输入到元件Task1中
P1 : process
begin -- 仿真
- A <= '0' ; B <= '0' ; C <= '0' ; wait for 10 ns ;
- A <= '0' ; B <= '0' ; C <= '1' ; wait for 10 ns ;
- A <= '0' ; B <= '1' ; C <= '0' ; wait for 10 ns ;
- A <= '0' ; B <= '1' ; C <= '1' ; wait for 10 ns ;
- A <= '1' ; B <= '0' ; C <= '0' ; wait for 10 ns ;
- A <= '1' ; B <= '0' ; C <= '1' ; wait for 10 ns ;
- A <= '1' ; B <= '1' ; C <= '0' ; wait for 10 ns ;
- A <= '1' ; B <= '1' ; C <= '1' ; wait for 10 ns ;
+ A <= '0' ; B <= '0' ; C <= '0' ; wait for 10 ns ;
+ A <= '0' ; B <= '0' ; C <= '1' ; wait for 10 ns ;
+ A <= '0' ; B <= '1' ; C <= '0' ; wait for 10 ns ;
+ A <= '0' ; B <= '1' ; C <= '1' ; wait for 10 ns ;
+ A <= '1' ; B <= '0' ; C <= '0' ; wait for 10 ns ;
+ A <= '1' ; B <= '0' ; C <= '1' ; wait for 10 ns ;
+ A <= '1' ; B <= '1' ; C <= '0' ; wait for 10 ns ;
+ A <= '1' ; B <= '1' ; C <= '1' ; wait for 10 ns ;
end process ;
end BEHAV ;
仿真结果
-
+
根据波形图结果,可知,该元件的代码编写正确,可以进行下一操作。
3. 生成编程文件
新建project
-
+
导入关于元件的文件task1.vhd
-
+
编译生成文件,并导入DE10芯片
@@ -3066,7 +3066,7 @@ 3. 生成编程文件
Fitter
Assemble
-
+
pin planner,进行线脚安排
ABC以开关的形式输入输出
@@ -3074,12 +3074,12 @@ 3. 生成编程文件
-
+
实验成果
-
+
实验二:二进制全加器
1. 分析真值表
-
+
2. 仿真模拟
逻辑设计输入 task2.vhd
Vhdl 1
@@ -3131,15 +3131,15 @@ 逻辑设计输入 task2.vhd
begin
tmp := A & B & C0 ;
case tmp is -- case语句根据ABC0不同的值输出不同的C与Z
- when "000" => C <= '0' ; Z <= '0' ;
- when "001" => C <= '0' ; Z <= '1' ;
- when "010" => C <= '0' ; Z <= '1' ;
- when "011" => C <= '1' ; Z <= '0' ;
- when "100" => C <= '0' ; Z <= '1' ;
- when "101" => C <= '1' ; Z <= '0' ;
- when "110" => C <= '1' ; Z <= '0' ;
- when "111" => C <= '1' ; Z <= '1' ;
- when others => C <= '0' ; Z <= '0' ;
+ when "000" => C <= '0' ; Z <= '0' ;
+ when "001" => C <= '0' ; Z <= '1' ;
+ when "010" => C <= '0' ; Z <= '1' ;
+ when "011" => C <= '1' ; Z <= '0' ;
+ when "100" => C <= '0' ; Z <= '1' ;
+ when "101" => C <= '1' ; Z <= '0' ;
+ when "110" => C <= '1' ; Z <= '0' ;
+ when "111" => C <= '1' ; Z <= '1' ;
+ when others => C <= '0' ; Z <= '0' ;
end case ;
end process ;
end BEHAV ;
@@ -3202,42 +3202,42 @@ 逻辑设计仿真 test_tb.vhd
P1 : process
-----------主要的仿真部分-------------------------------------------------
begin
- A <= '0' ; B <= '0' ; C0 <= '0' ; wait for 10 ns ;
- A <= '0' ; B <= '0' ; C0 <= '1' ; wait for 10 ns ;
- A <= '0' ; B <= '1' ; C0 <= '0' ; wait for 10 ns ;
- A <= '0' ; B <= '1' ; C0 <= '1' ; wait for 10 ns ;
- A <= '1' ; B <= '0' ; C0 <= '0' ; wait for 10 ns ;
- A <= '1' ; B <= '0' ; C0 <= '1' ; wait for 10 ns ;
- A <= '1' ; B <= '1' ; C0 <= '0' ; wait for 10 ns ;
- A <= '1' ; B <= '1' ; C0 <= '1' ; wait for 10 ns ;
+ A <= '0' ; B <= '0' ; C0 <= '0' ; wait for 10 ns ;
+ A <= '0' ; B <= '0' ; C0 <= '1' ; wait for 10 ns ;
+ A <= '0' ; B <= '1' ; C0 <= '0' ; wait for 10 ns ;
+ A <= '0' ; B <= '1' ; C0 <= '1' ; wait for 10 ns ;
+ A <= '1' ; B <= '0' ; C0 <= '0' ; wait for 10 ns ;
+ A <= '1' ; B <= '0' ; C0 <= '1' ; wait for 10 ns ;
+ A <= '1' ; B <= '1' ; C0 <= '0' ; wait for 10 ns ;
+ A <= '1' ; B <= '1' ; C0 <= '1' ; wait for 10 ns ;
end process ;
end BEHAV ;
仿真结果
-
+
与预期一致,所以可以进行下一步操作
3. 生成编程文件
-编译输出,得到以下逻辑图
+编译输出,得到以下逻辑图
pin planner
-
+
A, B, C0对应三个开关
C与Z对应两盏LED灯
实验成果
-
+
上图对应A=0, B=0, C0=0的情况,输出C=0,Z=0的情况。
-
+
上图对应A=0, B=1, C0=0的情况,输出C=0,Z=1的情况。
-
+
上图对应A=1, B=1, C0=0的情况,输出C=1,Z=0的情况。
-
+
上图对应A=1, B=1, C0=1的情况,输出C=1,Z=1的情况。
实验三:开灯关灯的探究性实验 !注意:这个部分我写的些许有点错误,直接单数开关开则打开的思路即可
1. 分析电路逻辑
@@ -3301,12 +3301,12 @@ 设计元件 task3.vhd
---------关键部分:process-----------------------------------
P1 : process
---------定义变量 记录开关A,B,C,D,Z先前的状态----------------
-variable mA : std_logic := '0' ;
-variable mB : std_logic := '0' ;
-variable mC : std_logic := '0' ;
-variable mD : std_logic := '0' ;
-variable mZ : std_logic := '0' ;
-variable tmp : std_logic := '0' ;
+variable mA : std_logic := '0' ;
+variable mB : std_logic := '0' ;
+variable mC : std_logic := '0' ;
+variable mD : std_logic := '0' ;
+variable mZ : std_logic := '0' ;
+variable tmp : std_logic := '0' ;
begin
if ( mA /= A ) then --如果A开关状态发生改变,下方各个结构同理
@@ -3378,21 +3378,21 @@ 仿真task3_tb.vhd
------------仿真过程-------------------------------------------
P1 : process
begin
- A <= '0' ; B <= '0' ; C <= '0' ; D <= '0' ; wait for 10 ns ;
- A <= '0' ; B <= '0' ; C <= '0' ; D <= '1' ; wait for 10 ns ;
- A <= '1' ; B <= '0' ; C <= '0' ; D <= '1' ; wait for 10 ns ;
- A <= '0' ; B <= '0' ; C <= '0' ; D <= '1' ; wait for 10 ns ;
+ A <= '0' ; B <= '0' ; C <= '0' ; D <= '0' ; wait for 10 ns ;
+ A <= '0' ; B <= '0' ; C <= '0' ; D <= '1' ; wait for 10 ns ;
+ A <= '1' ; B <= '0' ; C <= '0' ; D <= '1' ; wait for 10 ns ;
+ A <= '0' ; B <= '0' ; C <= '0' ; D <= '1' ; wait for 10 ns ;
end process ;
end BEHAV ;
仿真结果
-
+
任意改变ABCD四个开关中任意状态,Z就会输出与原来相反的结果,仿真结果正确。
3. 生成编程文件
编译输出
-
+
Pin Planner
@@ -3406,7 +3406,7 @@ 实验成果
实验结果视频
-结果分析,由于这个代码的问题,也就是在芯片最开始执行结构体部分的代码时,由于mA与A并不一定相匹配,所以刚刚开始,Z的灯可能混乱闪烁。但是一段时间后,也就是当所有mA,mB,mC,mD都已经与现实情况相匹配以后,就能够正常显示。
+结果分析,由于这个代码的问题,也就是在芯片最开始执行结构体部分的代码时,由于mA与A并不一定相匹配,所以刚刚开始,Z的灯可能混乱闪烁。但是一段时间后,也就是当所有mA,mB,mC,mD都已经与现实情况相匹配以后,就能够正常显示。
diff --git "a/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/Lab4/lab4 \344\270\211\346\236\201\347\256\241\345\222\214\351\227\250\347\224\265\350\267\257\347\211\271\346\200\247\346\265\213\350\257\225/index.html" "b/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/Lab4/lab4 \344\270\211\346\236\201\347\256\241\345\222\214\351\227\250\347\224\265\350\267\257\347\211\271\346\200\247\346\265\213\350\257\225/index.html"
index 1f0a6fb6..091d676f 100644
--- "a/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/Lab4/lab4 \344\270\211\346\236\201\347\256\241\345\222\214\351\227\250\347\224\265\350\267\257\347\211\271\346\200\247\346\265\213\350\257\225/index.html"
+++ "b/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/Lab4/lab4 \344\270\211\346\236\201\347\256\241\345\222\214\351\227\250\347\224\265\350\267\257\347\211\271\346\200\247\346\265\213\350\257\225/index.html"
@@ -2872,7 +2872,7 @@
Lab 4
-三极管和门电路特性测试
+三极管和门电路特性测试
实验日期:2023/10/9
地点:东3-406
实验目的
@@ -2899,13 +2899,13 @@
一、判别三极管类型
将三极管从右到左三只脚命名为a,b,c,利用万用表二极管测试级,测量三极管三只脚的极性。
-
-
+
+
根据以上表格可以判断,该三极管中间的端口为b基极,且为NPN型三极管。
-
+
将万用表切换到HFE档,通过对三极管的放大倍数的测量,判断三极管的e和c极。已知正常的ß应该在100~300之间。
将三极管中间的极脚插入b口,两端分别插入e和c。可见当示数显示为249时,e,b,c脚插入正确,放大倍数ß=249。从而可判断三极管的三只脚的极性:当平面对向自己时,从左到右三只脚分别为e,b,c。
二、采用逐点法测量三极管输入VA特性
@@ -2913,8 +2913,8 @@
(1)固定V~CE~下,I~B~与V~BE~的关系
将电路连接为下图
-
-
fig1 固定VCE下的实验电路图
+
+
fig1 固定VCE下的实验电路图
调整V2的大小,即调整V~CE~的大小分别为0V和15V。调整直流输出源V1的大小,用万用表测量R1两端电压,从而得出V~BE~和I~B~的大小。
@@ -2955,8 +2955,8 @@ (1)固定V~CE~下,I~B~与V~BE~的关系
30
31
32 % 使用xlsread函数从Excel文件中读取数据
-data1 = readtable ( './1016all.xlsx' , 'Sheet' , '0V' , 'Range' , 'C2:D17' );
-data2 = readtable ( './1016all.xlsx' , 'Sheet' , '15V' , 'Range' , 'C2:D19' );
+data1 = readtable ( './1016all.xlsx' , 'Sheet' , '0V' , 'Range' , 'C2:D17' );
+data2 = readtable ( './1016all.xlsx' , 'Sheet' , '15V' , 'Range' , 'C2:D19' );
% 提取电压和电流数据
vbe1 = data1 {:, 1 };
@@ -2965,79 +2965,79 @@ (1)固定V~CE~下,I~B~与V~BE~的关系
ib2 = data2 {:, 2 };
% 绘制伏安特性曲线
-plot ( vbe1 , ib1 , 'o' ); % 绘制数据点和连接线
-title ( '固定VCE下三极管输出VA曲线' ); % 添加标题
-xlabel ( 'V_{BE}(V)' ); % 添加x轴标签
-ylabel ( 'I_B(uA)' ); % 添加y轴标签
+plot ( vbe1 , ib1 , 'o' ); % 绘制数据点和连接线
+title ( '固定VCE下三极管输出VA曲线' ); % 添加标题
+xlabel ( 'V_{BE}(V)' ); % 添加x轴标签
+ylabel ( 'I_B(uA)' ); % 添加y轴标签
grid on ; % 添加网格线
% 对曲线进行平滑处理
-smoothed_ib1 = smooth ( ib1 , 5 , 'loess' );
+smoothed_ib1 = smooth ( ib1 , 5 , 'loess' );
hold on ; % 在同一图中叠加平滑曲线
-plot ( vbe1 , smoothed_ib1 , 'b-' , 'LineWidth' , 1 ); % 绘制平滑曲线
+plot ( vbe1 , smoothed_ib1 , 'b-' , 'LineWidth' , 1 ); % 绘制平滑曲线
%绘制曲线2
hold on ;
-plot ( vbe2 , ib2 , 'o' ); % 绘制数据点和连接线
+plot ( vbe2 , ib2 , 'o' ); % 绘制数据点和连接线
grid on ; % 添加网格线
% 对曲线进行平滑处理
-smoothed_ib2 = smooth ( ib2 , 5 , 'loess' ); % 使用rloess平滑算法
+smoothed_ib2 = smooth ( ib2 , 5 , 'loess' ); % 使用rloess平滑算法
hold on ; % 在同一图中叠加平滑曲线
-plot ( vbe2 , smoothed_ib2 , 'r-' , 'LineWidth' , 1 ); % 绘制平滑曲线
-legend ( '原始数据(0V)' , '曲线(0V下)' , '原始数据(15V)' , '曲线(15V下)' );
+plot ( vbe2 , smoothed_ib2 , 'r-' , 'LineWidth' , 1 ); % 绘制平滑曲线
+legend ( '原始数据(0V)' , '曲线(0V下)' , '原始数据(15V)' , '曲线(15V下)' );
实验结果与分析
实验数据如下:
-
VCE=0V
-
-
VCE=15V下
-
-
-
fig2 三极管VA特性曲线
+
VCE=0V
+
+
VCE=15V下
+
+
+
fig2 三极管VA特性曲线
(2)固定I~B~ 下,I~C~与V~CE~的关系
将电路图连接为下图
-
-
fig3 固定Ib下的实验电路图
+
+
fig3 固定Ib下的实验电路图
设定V1的大小,通过测量R1两端的电压,得出I~b~的电流大小,并在接下来的实验中不再改变V1,由于V2对I~b~的改变非常小,在此实验中忽略不计。
调节V2,测量R2两端电压,通过计算得出V~CE~和Ic的大小。
绘制伏安特性曲线。
实验结果与分析
-
Ib=2.5uA
-
-
Ib=5uA
-
-
Ib=7.5uA
-
-
Ib=10uA
-
-
-
fig4 绘制VA特性曲线
+
Ib=2.5uA
+
+
Ib=5uA
+
+
Ib=7.5uA
+
+
Ib=10uA
+
+
+
fig4 绘制VA特性曲线
一些特殊点的分析
-
-
fig5 I_b=2.5uA下的VA曲线
+
+
fig5 I_b=2.5uA下的VA曲线
我们发现,当I~b~=2.5uA时ce的压降使得Ic到达饱和区时,放大电流随着压降增大而减小。
-
-
fig6 I=10uA下的VA曲线
+
+
fig6 I=10uA下的VA曲线
而当I~b~=10uA时,放大电流随着V~CE~增加增大。这种现象,可能也恰好反映了基极电流会随着CE两端电压的大小变化而发生变化,但是所造成的变化并不明显,所以上述实验可以通过保持V1不变控制I~b~不变。
实验二:采用MULTISIM逐点仿真三极管输入VA特性
仿真过程
利用MULTISIM软件搭建以下电路:
-
-
fig7 控制VCE不变下的实验电路
-
-
fig8 控制Ib不变下的实验电路
+
+
fig7 控制VCE不变下的实验电路
+
+
fig8 控制Ib不变下的实验电路
利用软件自带的仿真功能仿真
->直流扫描
功能,改变所要调节的参数,获得所要的特性曲线。
-
-
fig9 固定Vce=15V,改变V1的值,获得的扫描曲线
+
+
fig9 固定Vce=15V,改变V1的值,获得的扫描曲线
利用matlab进行数据处理,获得最终值。
@@ -3063,32 +3063,32 @@ 仿真过程
19
20
21
-22 data1 = readmatrix ( './1016/1_0V.csv' , 'NumHeaderLines' , 1 );
+22
data1 = readmatrix ( './1016/1_0V.csv' , 'NumHeaderLines' , 1 );
% 提取电压和电流数据
vbe1 = data1 (:, 5 );
ib1 = data1 (:, 2 );
% 对曲线进行平滑处理
-smoothed_ib1 = smooth ( ib1 , 5 , 'loess' );
-plot ( vbe1 , smoothed_ib1 , 'b-' , 'LineWidth' , 1 ); % 绘制平滑曲线
-title ( '固定VCE下三极管输出VA曲线' ); % 添加标题
-xlabel ( 'V_{BE}(V)' ); % 添加x轴标签
-ylabel ( 'I_B(uA)' ); % 添加y轴标签
+smoothed_ib1 = smooth ( ib1 , 5 , 'loess' );
+plot ( vbe1 , smoothed_ib1 , 'b-' , 'LineWidth' , 1 ); % 绘制平滑曲线
+title ( '固定VCE下三极管输出VA曲线' ); % 添加标题
+xlabel ( 'V_{BE}(V)' ); % 添加x轴标签
+ylabel ( 'I_B(uA)' ); % 添加y轴标签
grid on ; % 添加网格线
-data2 = readmatrix ( './1016/2_15V.csv' , 'NumHeaderLines' , 1 );
+data2 = readmatrix ( './1016/2_15V.csv' , 'NumHeaderLines' , 1 );
% 提取电压和电流数据
vbe2 = data2 (:, 5 );
ib2 = data2 (:, 2 );
% 对曲线进行平滑处理
-smoothed_ib2 = smooth ( ib2 , 5 , 'loess' ); % 使用rloess平滑算法
+smoothed_ib2 = smooth ( ib2 , 5 , 'loess' ); % 使用rloess平滑算法
hold on ; % 在同一图中叠加平滑曲线
-plot ( vbe2 , smoothed_ib2 , 'r-' , 'LineWidth' , 1 ); % 绘制平滑曲线
-legend ( 'V_{CE}=0V' , 'V_{CE}=15V' );
+plot ( vbe2 , smoothed_ib2 , 'r-' , 'LineWidth' , 1 ); % 绘制平滑曲线
+legend ( 'V_{CE}=0V' , 'V_{CE}=15V' );
实验结果
-
-
+
+
实验三:测试与非门逻辑功能
实验器材
@@ -3100,14 +3100,14 @@ 测试过程与结果
连接电路为下图,注意7脚接地和14脚接高电平
-
-
fig10 连接电路
+
+
fig10 连接电路
点按按钮,改变输入两端电压。
利用万用表测量引脚电压。
实验结果
-
+
实验四:与非门传输特性测量
实验器材
@@ -3122,8 +3122,8 @@ (1)逐点输入直流电压,测量其传输特性。
连接电路
-
-
fig11 测试电路
+
+
fig11 测试电路
调节2脚的电位,使用万用表测量2脚以及输出端电压。
@@ -3132,14 +3132,14 @@ (1)逐点输入直流电压,测量其传输特性。
记录数据,并根据数据绘制图线。
-
-
+
+
(2)输入0至5V变化的电压,利用扫描法测量传输特性
连接电路。
-
-
fig12 测试电路
+
+
fig12 测试电路
调节信号源为0V~5V锯齿波,对称性为50%,频率为10Hz。
@@ -3148,11 +3148,11 @@ (2)输入0至5V变化的电压,利用扫描法测量传输
调节示波器至显示清晰稳定图像。
-
+
切换观察选项为XY显示。
-
+
结果分析
@@ -3173,11 +3173,11 @@ 测试过程与结果
连接电路
-
+
利用万用表测量电压,并记录数据
-
+
结果分析
当2脚接低点位时,与非门内部的电压高于外界电压,导致有电流通过。
@@ -3194,8 +3194,8 @@ 测试过程与结果
连接电路
-
-
输出高电平 输出低电平
+
+
输出高电平 输出低电平
200Ω作为保护电阻,保护电路
@@ -3209,10 +3209,10 @@ 测试过程与结果
实验结果与分析
-
-
+
+
可以看到与非门输出在外端串联电阻时,尤其是小电阻,输出并不是标准的高电平或者低电平。与非门内部呈现一定的定值电阻特性(由两段曲线呈现直线可以看出)。经过一定的计算,可以得出与非门内部的电阻可以近似估计为0.02Ω。
-
+
diff --git "a/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/Lab5/Lab5 \345\260\217\350\275\246\346\243\200\346\265\213\347\224\265\350\267\257\345\222\214\347\224\265\346\234\272\351\251\261\345\212\250\347\224\265\350\267\257\346\265\213\350\257\225/index.html" "b/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/Lab5/Lab5 \345\260\217\350\275\246\346\243\200\346\265\213\347\224\265\350\267\257\345\222\214\347\224\265\346\234\272\351\251\261\345\212\250\347\224\265\350\267\257\346\265\213\350\257\225/index.html"
index 6eb58189..ffa7161c 100644
--- "a/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/Lab5/Lab5 \345\260\217\350\275\246\346\243\200\346\265\213\347\224\265\350\267\257\345\222\214\347\224\265\346\234\272\351\251\261\345\212\250\347\224\265\350\267\257\346\265\213\350\257\225/index.html"
+++ "b/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/Lab5/Lab5 \345\260\217\350\275\246\346\243\200\346\265\213\347\224\265\350\267\257\345\222\214\347\224\265\346\234\272\351\251\261\345\212\250\347\224\265\350\267\257\346\265\213\350\257\225/index.html"
@@ -2700,7 +2700,7 @@
-小车检测电路和电机驱动电路测试
+小车检测电路和电机驱动电路测试
实验日期:2023/10/23
地点:东3-406
实验目的
@@ -2732,8 +2732,8 @@
测试过程与结果
分析电路
-
-
fig1 OPTO5内部电路
+
+
fig1 OPTO5内部电路
我们主要讨论R17的阻值,R19的阻值和W5为什么为大电阻(10k)。
@@ -2799,8 +2799,8 @@ 测试过程与结果
U_{LED}=V_{I}-U_{R_{19}}=3.329-1.253=2.076V
\end{array}
$$
-
-
fig2 发光二极管I-V特性曲线
+
+
fig2 发光二极管I-V特性曲线
根据上述图表 ,同时根据我们的二极管为绿色二极管可知,当选用3.3V的发光二极管时,已经能够较好地体现发光特性,电流以毫安级别通过。
R20 作为并联电阻,搜索资料得知,在LED两端并联大电阻,当有反向电流流过时,能稳定LED两端电压,避免所有分压在一个LED灯上,导致LED灯反向击穿;同时,能够很好的释放LED内部存储的能量,使得LED灯快速熄灭。
@@ -2877,22 +2877,22 @@ 测试过程与结果
测量LED06阻值两端的电压与LED05所得结果基本相似。
【1.2 不同表面,光电管反射电压测量】
【1.3 区分黑白地面的比较电压值】
-
+
根据实验结果,可以得到以下结论:反射表面对红外线吸收能力越强,光电管反射电压越高。
随着反射表面对红外线能力的吸收增强,光电管两端电压增加,当超过另外一只引脚的输入电压后,比较器输出相反的性质。
将红外探测仪置于白色表面不同高度处(通过小车下面垫置书本实现),测量光电管反射电压。
【1.4不同高度(2至6CM),光电管反射电压测量比较】
-
-
+
+
当光电管离地越来越高,所能吸收的红外光线越来越少,两端电压越来越大。
当光电管高度大约为3.5~3.7cm左右时,光电管两端电压逐渐靠近1.992V(另一只脚的电压),此时从比较器从输出低电压转变为高电压,在这个电压值以下,指示LED灯发光,以上则熄灭。
在实际使用中,为了避免高度对测量结果的影响,当一只脚的引脚为2V左右,应该将光电管置于<2.5cm的位置。当然,也要根据具体的另一只脚的电位,具体调整光电管离地高度。
【1.5 观察环境光亮对光电检测电路的影响】
-
+
可见,环境对实验有一定的影响,当其影响在1%左右,所以可以忽略不计。
在昏暗环境下,去除了日光中的红外线对光电管的影响,从而使得其引脚11两端电压略微升高
@@ -2907,8 +2907,8 @@ 测试过程与结果
调节直流稳压源的电压,记录万用表读数
交换输入电压源正负极,测量电机反转时的VA特性。
-
-
+
+
diff --git "a/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/Lab6/Lab6 \346\231\272\350\203\275\345\260\217\350\275\246\346\216\247\345\210\266/index.html" "b/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/Lab6/Lab6 \346\231\272\350\203\275\345\260\217\350\275\246\346\216\247\345\210\266/index.html"
index 273af9e9..e26e2b30 100644
--- "a/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/Lab6/Lab6 \346\231\272\350\203\275\345\260\217\350\275\246\346\216\247\345\210\266/index.html"
+++ "b/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/Lab6/Lab6 \346\231\272\350\203\275\345\260\217\350\275\246\346\216\247\345\210\266/index.html"
@@ -2571,7 +2571,7 @@
-智能小车控制
+智能小车控制
实验日期:2023/10/30
地点:东3-406
实验目的
@@ -2602,8 +2602,8 @@
测试过程与结果
轨道经测量,约为两指宽。所以,选择中间两盏小灯作为沿轨道行进判定,和间隔一个旁边的小灯作为转弯判定。
-
-
fig1 光电管示意图(蓝色为选择的光电管)
+
+
fig1 光电管示意图(蓝色为选择的光电管)
分析输出端口电位
@@ -2614,8 +2614,8 @@ 测试过程与结果
根据第一步的分析,我们需要一个以下有5个接口,7个输出口的逻辑芯片。
-
-
fig2 设计逻辑示意图
+
+
fig2 设计逻辑示意图
if ( swt = '1' ) then
- swto <= '1' ;
- ena <= '1' ;
- enb <= '1' ;
+9
if ( swt = '1' ) then
+ swto <= '1' ;
+ ena <= '1' ;
+ enb <= '1' ;
else
- swto <= '0' ;
- ena <= '0' ;
- enb <= '0' ;
+ swto <= '0' ;
+ ena <= '0' ;
+ enb <= '0' ;
end if ;
@@ -2656,16 +2656,16 @@ 测试过程与结果
当左轮转动时,in1输出1,in2输出0
当左轮转动时,in3输出1,in4输出0
-
+
Vhdl -------------直行循轨-------------------------------
-when "0110" => in1 <= '1' ; in2 <= '0' ; in3 <= '1' ; in4 <= '0' ;
-when "0010" => in1 <= '1' ; in2 <= '0' ; in3 <= '0' ; in4 <= '0' ;
-when "0100" => in1 <= '0' ; in2 <= '0' ; in3 <= '1' ; in4 <= '0' ;
+when "0110" => in1 <= '1' ; in2 <= '0' ; in3 <= '1' ; in4 <= '0' ;
+when "0010" => in1 <= '1' ; in2 <= '0' ; in3 <= '0' ; in4 <= '0' ;
+when "0100" => in1 <= '0' ; in2 <= '0' ; in3 <= '1' ; in4 <= '0' ;
@@ -2673,11 +2673,11 @@ 测试过程与结果
主要岔路判断过程,小车在行进过程中,最旁边的灯判断了在左/右遇到岔路的情况
-
+
如果在遇到岔路过程中,中间的两盏灯出现了一亮一灭的情况,具体如下图(左边遇到岔路的情况,右边遇到岔路同理)所示,则应该一定地修正轨迹。
-
+
Vhdl 1
@@ -2688,18 +2688,18 @@ 测试过程与结果
6
7
8 -------------岔路判断-------------------------------
-when "0111" => in1 <= '1' ; in2 <= '0' ; in3 <= '1' ; in4 <= '0' ;
-when "0011" => in1 <= '1' ; in2 <= '0' ; in3 <= '0' ; in4 <= '0' ;
-when "0101" => in1 <= '0' ; in2 <= '0' ; in3 <= '1' ; in4 <= '0' ;
+when "0111" => in1 <= '1' ; in2 <= '0' ; in3 <= '1' ; in4 <= '0' ;
+when "0011" => in1 <= '1' ; in2 <= '0' ; in3 <= '0' ; in4 <= '0' ;
+when "0101" => in1 <= '0' ; in2 <= '0' ; in3 <= '1' ; in4 <= '0' ;
-when "1110" => in1 <= '1' ; in2 <= '0' ; in3 <= '1' ; in4 <= '0' ;
-when "1010" => in1 <= '1' ; in2 <= '0' ; in3 <= '0' ; in4 <= '0' ;
-when "1100" => in1 <= '0' ; in2 <= '0' ; in3 <= '1' ; in4 <= '0' ;
+when "1110" => in1 <= '1' ; in2 <= '0' ; in3 <= '1' ; in4 <= '0' ;
+when "1010" => in1 <= '1' ; in2 <= '0' ; in3 <= '0' ; in4 <= '0' ;
+when "1100" => in1 <= '0' ; in2 <= '0' ; in3 <= '1' ; in4 <= '0' ;
Vhdl when "0000" => in1 <= '0' ; in2 <= '0' ; in3 <= '0' ; in4 <= '0' ;
-when "1111" => in1 <= '0' ; in2 <= '1' ; in3 <= '0' ; in4 <= '1' ;
+2
when "0000" => in1 <= '0' ; in2 <= '0' ; in3 <= '0' ; in4 <= '0' ;
+when "1111" => in1 <= '0' ; in2 <= '1' ; in3 <= '0' ; in4 <= '1' ;
全代码
Vhdl 1
@@ -2793,41 +2793,41 @@ 全代码
begin
tmp := ledp1 & ledc1 & ledc2 & ledp2 ;
case tmp is
-when "0000" => in1 <= '0' ; in2 <= '0' ; in3 <= '0' ; in4 <= '0' ;
-when "1111" => in1 <= '0' ; in2 <= '1' ; in3 <= '0' ; in4 <= '1' ;
+when "0000" => in1 <= '0' ; in2 <= '0' ; in3 <= '0' ; in4 <= '0' ;
+when "1111" => in1 <= '0' ; in2 <= '1' ; in3 <= '0' ; in4 <= '1' ;
-when "0110" => in1 <= '1' ; in2 <= '0' ; in3 <= '1' ; in4 <= '0' ;
-when "0010" => in1 <= '1' ; in2 <= '0' ; in3 <= '0' ; in4 <= '0' ;
-when "0100" => in1 <= '0' ; in2 <= '0' ; in3 <= '1' ; in4 <= '0' ;
+when "0110" => in1 <= '1' ; in2 <= '0' ; in3 <= '1' ; in4 <= '0' ;
+when "0010" => in1 <= '1' ; in2 <= '0' ; in3 <= '0' ; in4 <= '0' ;
+when "0100" => in1 <= '0' ; in2 <= '0' ; in3 <= '1' ; in4 <= '0' ;
-when "0111" => in1 <= '1' ; in2 <= '0' ; in3 <= '1' ; in4 <= '0' ;
-when "0011" => in1 <= '1' ; in2 <= '0' ; in3 <= '0' ; in4 <= '0' ;
-when "0101" => in1 <= '0' ; in2 <= '0' ; in3 <= '1' ; in4 <= '0' ;
+when "0111" => in1 <= '1' ; in2 <= '0' ; in3 <= '1' ; in4 <= '0' ;
+when "0011" => in1 <= '1' ; in2 <= '0' ; in3 <= '0' ; in4 <= '0' ;
+when "0101" => in1 <= '0' ; in2 <= '0' ; in3 <= '1' ; in4 <= '0' ;
-when "1110" => in1 <= '1' ; in2 <= '0' ; in3 <= '1' ; in4 <= '0' ;
-when "1010" => in1 <= '1' ; in2 <= '0' ; in3 <= '0' ; in4 <= '0' ;
-when "1100" => in1 <= '0' ; in2 <= '0' ; in3 <= '1' ; in4 <= '0' ;
+when "1110" => in1 <= '1' ; in2 <= '0' ; in3 <= '1' ; in4 <= '0' ;
+when "1010" => in1 <= '1' ; in2 <= '0' ; in3 <= '0' ; in4 <= '0' ;
+when "1100" => in1 <= '0' ; in2 <= '0' ; in3 <= '1' ; in4 <= '0' ;
-when "1000" => in1 <= '0' ; in2 <= '0' ; in3 <= '1' ; in4 <= '0' ;
-when "1001" => in1 <= '0' ; in2 <= '0' ; in3 <= '0' ; in4 <= '0' ;
-when "0001" => in1 <= '1' ; in2 <= '0' ; in3 <= '0' ; in4 <= '0' ;
-when "1101" => in1 <= '0' ; in2 <= '0' ; in3 <= '0' ; in4 <= '0' ;
-when "1011" => in1 <= '0' ; in2 <= '0' ; in3 <= '0' ; in4 <= '0' ;
-when others => in1 <= 'X' ; in2 <= 'X' ; in3 <= 'X' ; in4 <= 'X' ;
+when "1000" => in1 <= '0' ; in2 <= '0' ; in3 <= '1' ; in4 <= '0' ;
+when "1001" => in1 <= '0' ; in2 <= '0' ; in3 <= '0' ; in4 <= '0' ;
+when "0001" => in1 <= '1' ; in2 <= '0' ; in3 <= '0' ; in4 <= '0' ;
+when "1101" => in1 <= '0' ; in2 <= '0' ; in3 <= '0' ; in4 <= '0' ;
+when "1011" => in1 <= '0' ; in2 <= '0' ; in3 <= '0' ; in4 <= '0' ;
+when others => in1 <= 'X' ; in2 <= 'X' ; in3 <= 'X' ; in4 <= 'X' ;
end case ;
end process ;
P2 : process ( swt )
begin
-if ( swt = '1' ) then
-swto <= '1' ;
-ena <= '1' ;
-enb <= '1' ;
+if ( swt = '1' ) then
+swto <= '1' ;
+ena <= '1' ;
+enb <= '1' ;
else
-swto <= '0' ;
-ena <= '0' ;
-enb <= '0' ;
+swto <= '0' ;
+ena <= '0' ;
+enb <= '0' ;
end if ;
end process ;
end runner ;
@@ -2835,10 +2835,10 @@ 全代码
连接各功能芯片模块。
-
+
根据以上示意图,先物理上连接各引脚的输入输出。
后在Quartus软件上,对FPGA进行pin planner
-
+
在Quartars中编译文件,成功运行并导入FPGA板中。
连入电源,测试小车。
@@ -2848,15 +2848,15 @@ 测试结果
直角转弯时非常困难的一部分,我们发现,小车有概率地在直角转弯处停下,后观察光电管情况,发现,一些时候,tmp可能出现“0001”或者“1000”的情况,即最旁边的引脚在轨道内,而其他光电管偏离轨道。于是,对程序进行修改,
Vhdl when "1000" => in1 <= '0' ; in2 <= '0' ; in3 <= '1' ; in4 <= '0' ;
-when "0001" => in1 <= '1' ; in2 <= '0' ; in3 <= '0' ; in4 <= '0' ;
+2
when "1000" => in1 <= '0' ; in2 <= '0' ; in3 <= '1' ; in4 <= '0' ;
+when "0001" => in1 <= '1' ; in2 <= '0' ; in3 <= '0' ; in4 <= '0' ;
修改后,小车能够顺利转弯。
小车能依照轨道进行运动。
结果分析
-即要从逻辑上分析小车运动的情况,也要根据实验中具体出现的问题进行调整。这也说明,在未来的实验中,不光光要从理论上严谨分析,也要从具体实际中实践,修改,然后完善。
+即要从逻辑上分析小车运动的情况,也要根据实验中具体出现的问题进行调整。这也说明,在未来的实验中,不光光要从理论上严谨分析,也要从具体实际中实践,修改,然后完善。
diff --git "a/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/WLab1/WLab1/index.html" "b/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/WLab1/WLab1/index.html"
index 3d474b60..3bfc4d57 100644
--- "a/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/WLab1/WLab1/index.html"
+++ "b/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/WLab1/WLab1/index.html"
@@ -2467,7 +2467,7 @@
WLab 1
-
+
diff --git "a/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/lab7/index.html" "b/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/lab7/index.html"
index 990483ab..968c5fb5 100644
--- "a/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/lab7/index.html"
+++ "b/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/lab7/index.html"
@@ -2472,7 +2472,7 @@
-参考代码
+参考代码
以下代码有些许语法错误
Vhdl 1
2
@@ -2526,17 +2526,17 @@ 参考代码
p1 : process ( Freq_in , Clr_n )
variable cnt_val : natural range 0 to 49999999 ;
begin
- if ( Clr_n = '0' ) then
+ if ( Clr_n = '0' ) then
cnt_val := 0 ;
- elsif ( Freq_in 'event and Freq_in = '1' ) then
+ elsif ( Freq_in 'event and Freq_in = '1' ) then
if ( cnt_val = Div_num ) then
cnt_val := 0 ;
elsif ( cnt_val < Div_num / 2 ) then
cnt_val := cnt_val + 1 ;
- Freq_out <= '0' ;
+ Freq_out <= '0' ;
else
cnt_val := cnt_val + 1 ;
- Freq_out <= '1' ;
+ Freq_out <= '1' ;
end if ;
end if ;
end process ;
@@ -2585,9 +2585,9 @@ 参考代码
begin
P1 : process ( Clk , Clr_n )
begin
- if ( Clr_n = '0' ) then
- Q_tmp <= "0000" ;
- elsif ( Clk 'event and Clk = '1' ) then
+ if ( Clr_n = '0' ) then
+ Q_tmp <= "0000" ;
+ elsif ( Clk 'event and Clk = '1' ) then
Q_tmp <= Q_tmp + 1 ;
end if ;
end process ;
@@ -2633,9 +2633,9 @@ 参考代码
process ( A , B )
begin
if ( A > B ) then
- AGB <= '1' ;
+ AGB <= '1' ;
else
- AGB <= '0' ;
+ AGB <= '0' ;
end if ;
end proscess ;
end BEHAV ;
@@ -2711,11 +2711,11 @@ 参考代码
signal Freq_out : std_logic ;
signal cnt_out : std_logic_vector ( 3 downto 0 );
begin
- ul : DIVX port map ( Freq_in => Freq_in , Clr_n => '1' , Div_num => 26315 , Freq_out => Freq_out );
- u2 : CNT16 port map ( Clk => Freq_out , Clr_n => '1' , Q => cnt_out );
+ ul : DIVX port map ( Freq_in => Freq_in , Clr_n => '1' , Div_num => 26315 , Freq_out => Freq_out );
+ u2 : CNT16 port map ( Clk => Freq_out , Clr_n => '1' , Q => cnt_out );
u3 : CMP4BIT port map ( A => cnt_out , B => swtch , AGB => PWM )
end Behavioral ;
-
+
diff --git "a/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/preview/index.html" "b/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/preview/index.html"
index 0a555af8..5482045c 100644
--- "a/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/preview/index.html"
+++ "b/site/JY_FENG/1 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257I\345\256\236\351\252\214/preview/index.html"
@@ -1679,6 +1679,30 @@
+
+
+
+
@@ -2509,8 +2533,20 @@
Preview
-写在前面 for 电路与电子技术实验I
-电院实验课本身内容并不复杂,具体操作老师基本上会给出,但是完成实验并得到效果还是一个比较繁琐的内容,再加上对实验报告有一定的要求,
+写在前面 for 电路与电子技术实验I
+
电院实验课本身内容并不复杂,具体操作老师基本上会给出,但是完成实验并得到效果还是一个比较繁琐的内容,再加上对实验报告有一定的要求,所以会觉得这2学分的课实在是性价比过高。
+
综合实验报告成绩和两次考核成绩,本人最终成绩为94,所以可以以此为基准参考需要的努力程度。
+
综合一年的实验感受,实验报告总的完成以下两点要求差不多就可以拿到一个不错的成绩:
+
+实验内容不缺不漏
+实验结果准确无误,和理论基本一致
+
+
学习内容
+
秋学期 :综合实验,各类内容均有涉及,主要目的是了解实验器材,然后对”电“有一定的概念。祁才军老师负责,但应该教完我们这一届就退休了。期末考试内容涉及PPT内容较多,认真阅读PPT,对期末考试有较大帮助。
+
冬学期 :电路原理部分实验。实际上涉及较多模电实验的内容。姚缨英老师主要负责。姚老师虽然看上去事情很多,实际上事情也是真的多。PPT上的实验内容也比较杂乱,但可以根据往届的实验报告推测老师的实验要求。同时有任何不理解的内容和要求,也建议主动问姚老师。姚老师会非常耐心地解答。
+
考试
+
秋学期 :期末考试以笔试形式考察秋学期的所有实验内容,认真阅读PPT
+
冬学期 :姚老师基本上会以各种方式提示期末考试的内容
diff --git "a/site/JY_FENG/2 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257II\345\256\236\351\252\214/Lab5/Lab5/index.html" "b/site/JY_FENG/2 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257II\345\256\236\351\252\214/Lab5/Lab5/index.html"
index 8713ab53..994de116 100644
--- "a/site/JY_FENG/2 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257II\345\256\236\351\252\214/Lab5/Lab5/index.html"
+++ "b/site/JY_FENG/2 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257II\345\256\236\351\252\214/Lab5/Lab5/index.html"
@@ -2467,8 +2467,8 @@
Lab 5 仪用放大电路及其应用实验
-仿真所用文件在这里: Lab5 PSpice仿真.zip
-
+
diff --git "a/site/JY_FENG/2 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257II\345\256\236\351\252\214/Lab6/Lab6/index.html" "b/site/JY_FENG/2 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257II\345\256\236\351\252\214/Lab6/Lab6/index.html"
index 435c6f2d..ff5521c7 100644
--- "a/site/JY_FENG/2 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257II\345\256\236\351\252\214/Lab6/Lab6/index.html"
+++ "b/site/JY_FENG/2 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257II\345\256\236\351\252\214/Lab6/Lab6/index.html"
@@ -2467,8 +2467,8 @@
Lab 6 滤波器的设计与实现
-Lab6所使用仿真软件 Lab6 PSpice仿真.zip
-
+
diff --git "a/site/JY_FENG/2 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257II\345\256\236\351\252\214/Lab7/Lab7/index.html" "b/site/JY_FENG/2 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257II\345\256\236\351\252\214/Lab7/Lab7/index.html"
index 2f65f02e..e2bf05e8 100644
--- "a/site/JY_FENG/2 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257II\345\256\236\351\252\214/Lab7/Lab7/index.html"
+++ "b/site/JY_FENG/2 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257II\345\256\236\351\252\214/Lab7/Lab7/index.html"
@@ -2467,8 +2467,8 @@
Lab 7 扩音机电路的设计制作与测试
-Lab7中所使用的仿真文件: Lab7PSpice仿真.zip
-
+
diff --git "a/site/JY_FENG/2 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257II\345\256\236\351\252\214/Lab9/Lab9/index.html" "b/site/JY_FENG/2 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257II\345\256\236\351\252\214/Lab9/Lab9/index.html"
index 3232af49..f82e980e 100644
--- "a/site/JY_FENG/2 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257II\345\256\236\351\252\214/Lab9/Lab9/index.html"
+++ "b/site/JY_FENG/2 \347\224\265\350\267\257\347\224\265\345\255\220\346\212\200\346\234\257II\345\256\236\351\252\214/Lab9/Lab9/index.html"
@@ -2467,8 +2467,8 @@
Lab 9 全加器与奇偶位检验电路
-Lab9中所使用的Multisim仿真文件: Lab9 Multisim.zip
-
+
diff --git "a/site/JY_FENG/3 \347\224\265\347\275\221\347\273\234\345\210\206\346\236\220/Preview/index.html" "b/site/JY_FENG/3 \347\224\265\347\275\221\347\273\234\345\210\206\346\236\220/Preview/index.html"
new file mode 100644
index 00000000..e14bd40b
--- /dev/null
+++ "b/site/JY_FENG/3 \347\224\265\347\275\221\347\273\234\345\210\206\346\236\220/Preview/index.html"
@@ -0,0 +1,2584 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 写在前面 for 电网络分析 - JY-HF learning site
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+写在前面 for 电网络分析
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 2024-07-03
+
+
+
+
+
+
+
+
+
+ 2024-07-03
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 回到页面顶部
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/site/JY_FENG/JY-Feng/index.html b/site/JY_FENG/JY-Feng/index.html
index 355d3913..3803db6e 100644
--- a/site/JY_FENG/JY-Feng/index.html
+++ b/site/JY_FENG/JY-Feng/index.html
@@ -2467,10 +2467,27 @@
Preview
-Python import sys
-print ( sys . exeutation )
-
+编写者为ZJU 22级电子信息工程专业学生,由于加入爱迪生班,所以内容主要面向爱迪生班专业内容(爱迪生班内容会在后面标注\(\alpha\) )。
+
这里作为我对本专业的回顾,以及一些经验~
+
专业课大致内容如下:(打勾内容为已更新)
+
+电路与电子技术I与II实验 (\(\alpha\) ) 实验报告 ✓
+电网络分析(\(\alpha\) ) 课程内容与拓展
+电路与电子技术I与II(\(\alpha\) )一些笔记和经验之谈
+工程电磁场与波
+微机原理及应用(\(\alpha\) )
+微机原理及应用综合实验(\(\alpha\) )
+信号分析与处理实验(\(\alpha\) ),【为什么没有理论课?因为我恨傅里叶】
+......
+
+
各类通识课:
+
+微观经济学原理
+概率论及数理统计
+微积分
+大学物理
+......
+
diff --git "a/site/JY_HU/1 \346\225\260\345\255\227\351\200\273\350\276\221\350\256\276\350\256\241/\346\225\260\345\255\227\351\200\273\350\276\221\350\256\276\350\256\241 notes/index.html" "b/site/JY_HU/1 \346\225\260\345\255\227\351\200\273\350\276\221\350\256\276\350\256\241/\346\225\260\345\255\227\351\200\273\350\276\221\350\256\276\350\256\241 notes/index.html"
index 415f0690..fb0075a4 100644
--- "a/site/JY_HU/1 \346\225\260\345\255\227\351\200\273\350\276\221\350\256\276\350\256\241/\346\225\260\345\255\227\351\200\273\350\276\221\350\256\276\350\256\241 notes/index.html"
+++ "b/site/JY_HU/1 \346\225\260\345\255\227\351\200\273\350\276\221\350\256\276\350\256\241/\346\225\260\345\255\227\351\200\273\350\276\221\350\256\276\350\256\241 notes/index.html"
@@ -2553,7 +2553,7 @@
-数字逻辑设计 notes
+数字逻辑设计 notes
SOP:sum of minterms
对函数求complement
Implicant: squares in the map
@@ -2563,15 +2563,15 @@
简单来说就是如果没有这个圈有的格子就包裹不进去,就是 essential prime implicant
1.3 implicant
蕴含项其实就是我们文章最开始提到的“圈”,每一种可能的圈就是一个蕴含项
-
+
上图中就有7个一次蕴含项,6个二次蕴含项和1个四次蕴含项,共计14个蕴含项
1.4 prime implicant
质蕴含项就是不能与其它蕴含项合并的蕴含项,在1.3中,我们发现四次蕴含项中有4个二次蕴含项,那么它们就不是质蕴含项
-
+
可以看到上图中的每一个圈都不能和其它圈合并,所以上图有共计4个质蕴含项
1.5 essential prime implicant
实质本源蕴含项中必须含有至少一个没被包含在其它蕴含项中的项,而且不能被更大的圈包裹
-
+
上图中有三个实质本源蕴含项,而我们找到最简SOP的方式就是找到所有的实质本源蕴含项
cost criteria
Literal cost L
@@ -2581,12 +2581,12 @@
propagation delay \(t_{PHL}\) 是
propagation : 传输
分为transport delay 和 inertia delay(有rejection time属性)
-
-
+
+
三个串联?四个可以吗
74LS00与非门传输延迟测量:3个74LS00门串联,4个可以吗?
\((\overline{A B})\)
-
+
2-12怎么化简
4位全加器的延时较长
因此采用carry look ahead adder
@@ -2599,7 +2599,7 @@ 分为transport delay 和 i
同理,C12 = G8~11+ P8~11*C8
C16 = G12~15+ P12~15*C12
依赖关系和4位的CLA相似
-
+
小测1 复习
1、逻辑表达式化简:
\(A+\overline{A}B=(A+B)(A+\overline{A})=A+B\)
@@ -2607,7 +2607,7 @@ \(逻辑表达式可重复使用\)
2、门代价计算:
3、卡诺图化简
4变量的卡诺图,16个格子,圈的大小为8->1个变量
-
+
diff --git "a/site/JY_HU/1 \346\225\260\345\255\227\351\200\273\350\276\221\350\256\276\350\256\241/\346\225\260\351\200\273\345\256\236\351\252\214/index.html" "b/site/JY_HU/1 \346\225\260\345\255\227\351\200\273\350\276\221\350\256\276\350\256\241/\346\225\260\351\200\273\345\256\236\351\252\214/index.html"
index a074085c..6352fcf4 100644
--- "a/site/JY_HU/1 \346\225\260\345\255\227\351\200\273\350\276\221\350\256\276\350\256\241/\346\225\260\351\200\273\345\256\236\351\252\214/index.html"
+++ "b/site/JY_HU/1 \346\225\260\345\255\227\351\200\273\350\276\221\350\256\276\350\256\241/\346\225\260\351\200\273\345\256\236\351\252\214/index.html"
@@ -2511,15 +2511,15 @@
-数逻实验过程笔记
-
+数逻实验过程笔记
+
发现只要是在这个文件结构下的图片都会正常显示
因为实际上typora编辑器的设置中拷贝图片时会将assets会单独复制一份
-
+
然而,拷贝后进行缩放,就是改为了html格式,就不能够正常渲染?
-
-
-
发现mkdocs在渲染导出HTML时是会将除了md格式的所有东西都拷贝一份到自己的目录下面的
+
+
+
发现mkdocs在渲染导出HTML时是会将除了md格式的所有东西都拷贝一份到自己的目录下面的
diff --git "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/exams/15-16-middle/index.html" "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/exams/15-16-middle/index.html"
index 353020ed..9e45caeb 100644
--- "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/exams/15-16-middle/index.html"
+++ "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/exams/15-16-middle/index.html"
@@ -2474,14 +2474,13 @@
-15-16年期中考试试卷
-
+15-16年期中考试试卷
+
-
+
浙江大学2015-16秋冬《数据结构基础》期中模拟练习
-
+
+
-
-
-
-
浙江大学2015-16秋冬《数据结构基础》期中模拟练习
开始时间 01/01/2016 8:00:00 AM
结束时间 01/18/2038 8:00:00 AM
答题时长 90分钟
考生
得分 43
总分 104
判断题 得分:8 总分:10
R1-1
N ( l o g N ) 2 N(logN)^2 N ( l o g N ) 2 is O ( N 2 ) O(N^2) O ( N 2 ) .
-
(2分)
评测结果 答案正确(2 分)
R1-2
If the postorder and inorder traversal sequences of a binary tree are the same, then none of the nodes in the tree has a right child.
-
(2分)
评测结果 答案正确(2 分)
R1-3
The best "worst-case time complexity" for any algorithm that sorts by comparisons only must be O ( N l o g N ) O(NlogN) O ( Nl o g N ) .
-
(2分)
评测结果 答案正确(2 分)
R1-4
If the most commonly used operations are to visit a random position and to insert and delete the last element in a linear list, then sequential storage works the fastest.
-
(2分)
评测结果 答案正确(2 分)
R1-5
Given the input sequence onto a stack as {1, 2, 3, ..., N N N }. If the first output is i i i , then the j j j -th output must be j − i − 1 j-i-1 j − i − 1 .
-
(2分)
评测结果 答案错误(0 分)
单选题 得分:30 总分:64
R2-1
Given a tree of degree 4. Suppose that the numbers of nodes of degrees 2, 3 and 4 are 4, 2 and 1, respectively. Then the number of leaf nodes must be:
-
(6分)
D.
20
+
+
+
+
浙江大学2015-16秋冬《数据结构基础》期中模拟练习
开始时间 01/01/2016 8:00:00 AM
结束时间 01/18/2038 8:00:00 AM
答题时长 90分钟
考生
得分 43
总分 104
判断题 得分:8 总分:10
R1-1
N ( l o g N ) 2 N(logN)^2 N ( l o g N ) 2 is O ( N 2 ) O(N^2) O ( N 2 ) .
+
(2分)
评测结果 答案正确(2 分)
R1-2
If the postorder and inorder traversal sequences of a binary tree are the same, then none of the nodes in the tree has a right child.
+
(2分)
评测结果 答案正确(2 分)
R1-3
The best "worst-case time complexity" for any algorithm that sorts by comparisons only must be O ( N l o g N ) O(NlogN) O ( Nl o g N ) .
+
(2分)
评测结果 答案正确(2 分)
R1-4
If the most commonly used operations are to visit a random position and to insert and delete the last element in a linear list, then sequential storage works the fastest.
+
(2分)
评测结果 答案正确(2 分)
R1-5
Given the input sequence onto a stack as {1, 2, 3, ..., N N N }. If the first output is i i i , then the j j j -th output must be j − i − 1 j-i-1 j − i − 1 .
+
(2分)
评测结果 答案错误(0 分)
单选题 得分:30 总分:64
R2-1
Given a tree of degree 4. Suppose that the numbers of nodes of degrees 2, 3 and 4 are 4, 2 and 1, respectively. Then the number of leaf nodes must be:
+
(6分)
评测结果 答案错误(0 分)
R2-2
Suppose that an array of size m
is used to store a circular queue. If the front position is front
and the current size is size
, then the rear element must be at:
-
(6分)
评测结果 答案错误(0 分)
R2-3
Insert {5, 2, 7, 3, 4, 1, 6} one by one into an initially empty min-heap. The preorder traversal sequence of the resulting tree is:
-
(6分)
评测结果 答案正确(6 分)
R2-4
Among the following methods, which one's time complexity is always O ( N l o g N ) O(NlogN) O ( Nl o g N ) , no matter what the initial condition is?
-
(3分)
评测结果 答案正确(6 分)
R2-4
Among the following methods, which one's time complexity is always O ( N l o g N ) O(NlogN) O ( Nl o g N ) , no matter what the initial condition is?
+
(3分)
评测结果 答案错误(0 分)
R2-5
Suppose that the height of a binary tree is h h h (the height of a leaf node is defined to be 1), and it has only the nodes of degrees 0 and 2. Then the minimum and maximum possible total numbers of nodes are:
-
(6分)
A.
2 h − 1 + 1 2^{h-1}+1 2 h − 1 + 1 , 2 h − 1 2^h-1 2 h − 1
-
B.
2 h − 1 2h-1 2 h − 1 , 2 h − 1 2^h-1 2 h − 1
-
D.
2 h − 1 2h-1 2 h − 1 , 2 h − 1 − 1 2^{h-1}-1 2 h − 1 − 1
+
(6分)
A.
2 h − 1 + 1 2^{h-1}+1 2 h − 1 + 1 , 2 h − 1 2^h-1 2 h − 1
+
B.
2 h − 1 2h-1 2 h − 1 , 2 h − 1 2^h-1 2 h − 1
+
评测结果 答案错误(0 分)
R2-6
Suppose that the level-order traversal sequence of a min-heap is {1, 3, 2, 5, 4, 7, 6}. Use the linear algorithm to adjust this min-heap into a max-heap. The inorder traversal sequence of the resulting tree is:
-
(6分)
评测结果 答案正确(6 分)
R2-7
To delete p
from a doubly linked list, we must do:
-
(6分)
A.
p->prior->next=p->next; p->next->prior=p->prior;
-
B.
p->next=p->prior->prior; p->prior=p->next->next;
-
C.
p->next->prior=p; p->next=p->next->next;
-
D.
p->prior=p->prior->prior; p->prior->next=p;
+
(6分)
A.
p->prior->next=p->next; p->next->prior=p->prior;
+
B.
p->next=p->prior->prior; p->prior=p->next->next;
+
C.
p->next->prior=p; p->next=p->next->next;
+
评测结果 答案正确(6 分)
R2-8
If on the 9th level of a complete binary tree (assume that the root is on the 1st level) there are 100 leaf nodes, then the maximum number of nodes of this tree must be:
-
(6分)
评测结果 答案正确(6 分)
R2-9
The array representation of a disjoint set containing numbers 0 to 8 is given by { 1, -4, 1, 1, -3, 4, 4, 8, -2 }. Then to union the two sets which contain 6 and 8 (with union-by-size), the index of the resulting root and the value stored at the root are:
-
(6分)
评测结果 答案错误(0 分)
R2-10
For a binary search tree, in which order of traversal that we can obtain a non-decreasing sequence?
-
(3分)
评测结果 答案正确(3 分)
R2-11
Given input { 321, 156, 57, 46, 28, 7, 331, 33, 34, 63 }. Which one of the following is the result after the 1st run of the Least Signification Digit (LSD) radix sort?
-
(4分)
A.
→321→331→33→63→34→156→46→57→7→28
-
B.
→331→321→33→63→34→156→46→57→7→28
-
C.
→156→28→321→331→33→34→46→57→63→7
-
D.
→57→46→28→7→33→34→63→156→321→331
+
(4分)
A.
→321→331→33→63→34→156→46→57→7→28
+
B.
→331→321→33→63→34→156→46→57→7→28
+
C.
→156→28→321→331→33→34→46→57→63→7
+
评测结果 答案错误(0 分)
R2-12
Which one of the following relations is correct about the extra space taken by heap sort, quick sort and merge sort?
-
(3分)
A.
heap sort > > > quick sort > > > merge sort
-
B.
heap sort < < < quick sort < < < merge sort
-
C.
heap sort > > > merge sort > > > quick sort
-
D.
heap sort < < < merge sort < < < quick sort
+
(3分)
A.
heap sort > > > quick sort > > > merge sort
+
B.
heap sort < < < quick sort < < < merge sort
+
C.
heap sort > > > merge sort > > > quick sort
+
评测结果 答案错误(0 分)
R2-13
Given the pushing sequence of a stack as {1, 2, 3, 4, 5}. If the first number being popped out is 4, then the last one out must be:
-
(3分)
评测结果 答案正确(3 分)
程序填空题 得分:0 总分:10
函数题 得分:5 总分:20
R6-1
No Greater Than X in BST
(20分)
You are supposed to output, in decreasing order, all the elements no greater than X
in a binary search tree T
.
-
void Print_NGT( Tree T, int X );
+
void Print_NGT( Tree T, int X );
where Tree
is defined as the following:
typedef struct TreeNode *Tree;
struct TreeNode {
int Element;
Tree Left;
Tree Right;
-};
+};
The function is supposed to use Output(X)
to print X
.
Sample program of judge:
#include <stdio.h>
@@ -2718,36 +2717,36 @@ Sample program of judge:
int X;
T = BuildTree();
- scanf("%d", &X);
+ scanf("%d", &X);
Print_NGT( T, X );
- printf("End\n");
+ printf("End\n");
return 0;
}
/* Your function will be put here */
-
+
-
91 90 85 81 80 55 End
+
91 90 85 81 80 55 End
-
End
+
End
代码
void Print_NGT( Tree T, int X ) {
return;
} 编译器输出
a.c: In function ‘BuildTree’:
a.c:33:6: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
- scanf("%d", &n);
+ scanf("%d", &n);
^~~~~~~~~~~~~~~
a.c:35:10: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
- scanf("%d", &x);
+ scanf("%d", &x);
^~~~~~~~~~~~~~~
a.c: In function ‘main’:
a.c:52:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
- scanf("%d", &X);
+ scanf("%d", &X);
^~~~~~~~~~~~~~~ 测试点 结果 测试点得分 耗时 内存 0 答案错误 0 4.00 ms 312 KB 1 答案正确 3 4.00 ms 432 KB 2 答案错误 0 4.00 ms 336 KB 3 答案正确 2 4.00 ms 352 KB 4 答案错误 0 4.00 ms 384 KB
评测结果 部分正确(5 分)
-
+
diff --git "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/exams/16-17-middle/index.html" "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/exams/16-17-middle/index.html"
index 7aaf549e..7e622fb7 100644
--- "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/exams/16-17-middle/index.html"
+++ "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/exams/16-17-middle/index.html"
@@ -2474,14 +2474,13 @@
-
16-17年期中考试试卷
-
+
16-17年期中考试试卷
+
-
+
浙江大学2016-17秋冬《数据结构基础》期中模拟练习
-
+
+
-
-
-
-
浙江大学2016-17秋冬《数据结构基础》期中模拟练习
开始时间 01/01/2016 8:00:00 AM
结束时间 01/18/2038 8:00:00 AM
答题时长 45分钟
考生
得分 17
总分 100
判断题 得分:12 总分:15
R1-1
In a binary search tree, the keys on the same level from left to right must be in sorted (non-decreasing) order.
-
(3分)
评测结果 答案正确(3 分)
R1-2
For a sequentially stored linear list of length N N N , the time complexities for query and insertion are O ( 1 ) O(1) O ( 1 ) and O ( N ) O(N) O ( N ) , respectively.
-
(3分)
评测结果 答案正确(3 分)
R1-3
2 N 2^N 2 N and N N N^N N N have the same speed of growth.
-
(3分)
评测结果 答案错误(0 分)
R1-4
In a directed graph, the sum of the in-degrees must be equal to the sum of the out-degrees of all the vertices.
-
(3分)
评测结果 答案正确(3 分)
R1-5
If keys are pushed onto a stack in the order {1, 2, 3, 4, 5}, then it is impossible to obtain the output sequence {3, 4, 1, 2, 5}.
-
(3分)
评测结果 答案正确(3 分)
单选题 得分:0 总分:65
R2-1
Suppose that an array of size m
is used to store a circular queue. If the front position is front
and the current size is size
, then the rear element must be at:
-
(5分)
D.
(front+size)%m
+
+
+
+
浙江大学2016-17秋冬《数据结构基础》期中模拟练习
开始时间 01/01/2016 8:00:00 AM
结束时间 01/18/2038 8:00:00 AM
答题时长 45分钟
考生
得分 17
总分 100
判断题 得分:12 总分:15
R1-1
In a binary search tree, the keys on the same level from left to right must be in sorted (non-decreasing) order.
+
(3分)
评测结果 答案正确(3 分)
R1-2
For a sequentially stored linear list of length N N N , the time complexities for query and insertion are O ( 1 ) O(1) O ( 1 ) and O ( N ) O(N) O ( N ) , respectively.
+
(3分)
评测结果 答案正确(3 分)
R1-3
2 N 2^N 2 N and N N N^N N N have the same speed of growth.
+
(3分)
评测结果 答案错误(0 分)
R1-4
In a directed graph, the sum of the in-degrees must be equal to the sum of the out-degrees of all the vertices.
+
(3分)
评测结果 答案正确(3 分)
R1-5
If keys are pushed onto a stack in the order {1, 2, 3, 4, 5}, then it is impossible to obtain the output sequence {3, 4, 1, 2, 5}.
+
(3分)
评测结果 答案正确(3 分)
单选题 得分:0 总分:65
R2-1
Suppose that an array of size m
is used to store a circular queue. If the front position is front
and the current size is size
, then the rear element must be at:
+
(5分)
评测结果 答案错误(0 分)
R2-2
The result of performing three DeleteMin operations in the min-heap {1,3,2,6,7,5,4,15,14,12,9,10,11,13,8} is:
-
(5分)
A.
4,5,6,12,7,10,8,15,14,13,9,11
-
B.
4,5,6,7,8,9,10,11,12,13,14,15
-
C.
4,6,5,13,7,10,8,15,14,12,9,11
-
D.
4,6,5,12,7,10,8,15,14,9,13,11
+
(5分)
A.
4,5,6,12,7,10,8,15,14,13,9,11
+
B.
4,5,6,7,8,9,10,11,12,13,14,15
+
C.
4,6,5,13,7,10,8,15,14,12,9,11
+
D.
4,6,5,12,7,10,8,15,14,9,13,11
评测结果 答案错误(0 分)
R2-3
In a complete binary tree with 1102 nodes, there must be __ leaf nodes.
-
(6分)
评测结果 答案错误(0 分)
R2-4
Use Dijkstra algorithm to find the shortest paths from 1 to every other vertices. In which order that the destinations must be obtained?
-
(5分)
评测结果 答案错误(0 分)
R2-5
Given a directed graph G=(V, E) where V = {v1, v2, v3, v4, v5, v6}
and E = {<v1,v2>, <v1,v4>, <v2,v6>, <v3,v1>, <v3,v4>, <v4,v5>, <v5,v2>, <v5,v6>}
. Then the topological order of G is:
-
(5分)
评测结果 答案错误(0 分)
R2-6
In a weighted graph, if the length of the shortest path from b
to a
is 10, and there exists an edge of weight 3 between c
and b
, then how many of the following statements is/are TRUE?
The length of the shortest path from c
to a
must be 13.
@@ -2644,64 +2643,64 @@ 16-17年期中考试试卷
The length of the shortest path from c
to a
must be no greater than 13.
The length of the shortest path from c
to a
must be no less than 7.
-
(6分)
评测结果 答案错误(0 分)
R2-7
The array representation of a disjoint set is given by { 4, 6, 5, 2, -3, -4, 3 }. If the elements are numbered from 1 to 7, the resulting array after invoking Union(Find(7),Find(1))
with union-by-size and path-compression is:
-
(5分)
A.
{ 4, 6, 5, 2, 6, -7, 3 }
-
B.
{ 6, 6, 5, 6, 6, -7, 5 }
-
C.
{ 4, 6, 5, 2, -7, 5, 3 }
-
D.
{ 6, 6, 5, 6, -7, 5, 5 }
+
(5分)
A.
{ 4, 6, 5, 2, 6, -7, 3 }
+
B.
{ 6, 6, 5, 6, 6, -7, 5 }
+
C.
{ 4, 6, 5, 2, -7, 5, 3 }
+
评测结果 答案错误(0 分)
R2-8
Given a quadtree(四叉树) with 3 nodes of degree 2, 2 nodes of degree 3, 4 nodes of degree 4. The number of leaf nodes in this tree is __.
-
(5分)
评测结果 答案错误(0 分)
R2-9
What is a critical path in an AOE network?
-
(5分)
A.
the shortest path from the first to the last event
-
B.
the longest path from the first to the last event
-
评测结果 答案错误(0 分)
R2-10
Insert { 6, 9, 12, 3, 4, 8 } one by one into an initially empty binary search tree. The post-order traversal sequence of the resulting tree is:
-
(6分)
评测结果 答案错误(0 分)
R2-11
To insert s
after p
in a doubly linked circular list, we must do:
-
(6分)
A.
s->prior=p; s->next=p->next; p->next=s; p->next->prior=s;
-
B.
p->next=s; s->prior=p; p->next->prior=s ; s->next=p->next;
-
C.
p->next->prior=s; p->next=s; s->prior=p; s->next=p->next;
-
D.
s->prior=p; s->next=p->next; p->next->prior=s; p->next=s;
+
(6分)
A.
s->prior=p; s->next=p->next; p->next=s; p->next->prior=s;
+
B.
p->next=s; s->prior=p; p->next->prior=s ; s->next=p->next;
+
C.
p->next->prior=s; p->next=s; s->prior=p; s->next=p->next;
+
评测结果 答案错误(0 分)
R2-12
If an undirected graph G = (V, E) contains 7 vertices. Then to guarantee that G is connected in any cases, there has to be at least ____ edges.
-
(6分)
评测结果 答案错误(0 分)
程序填空题 得分:5 总分:20
-
+
diff --git "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/exams/17-18-middle/index.html" "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/exams/17-18-middle/index.html"
index f678f5b1..2ed00cbc 100644
--- "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/exams/17-18-middle/index.html"
+++ "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/exams/17-18-middle/index.html"
@@ -2474,14 +2474,13 @@
-
17-18年期中考试试卷
-
+
17-18年期中考试试卷
+
-
+
浙江大学2017-18秋冬《数据结构基础》期中模拟练习
-
+
+
-
-
-
-
浙江大学2017-18秋冬《数据结构基础》期中模拟练习
开始时间 01/01/2016 8:00:00 AM
结束时间 01/18/2038 8:00:00 AM
答题时长 45分钟
考生
得分 27
总分 100
判断题 得分:9 总分:15
R1-1
If keys are pushed onto a stack in the order {1, 2, 3, 4, 5}, then it is impossible to obtain the output sequence {3, 4, 1, 2, 5}.
-
(3分)
评测结果 答案正确(3 分)
R1-2
For a sequentially stored linear list of length N N N , the time complexities for deleting the first element and inserting the last element are O ( 1 ) O(1) O ( 1 ) and O ( N ) O(N) O ( N ) , respectively.
-
(3分)
评测结果 答案错误(0 分)
R1-3
The sum of the degrees of all the vertices in a connected graph must be an even number.
-
(3分)
评测结果 答案正确(3 分)
R1-4
In a binary search tree, the keys on the same level from left to right must be in sorted (non-decreasing) order.
-
(3分)
评测结果 答案正确(3 分)
R1-5
N 2 l o g N N^2 logN N 2 l o g N and N l o g N 2 N logN^2 Nl o g N 2 have the same speed of growth.
-
(3分)
评测结果 答案错误(0 分)
单选题 得分:18 总分:65
R2-1
How many leaf node does a complete binary tree with 2435 nodes have?
-
(6分)
D.
812
+
+
+
+
浙江大学2017-18秋冬《数据结构基础》期中模拟练习
开始时间 01/01/2016 8:00:00 AM
结束时间 01/18/2038 8:00:00 AM
答题时长 45分钟
考生
得分 27
总分 100
判断题 得分:9 总分:15
R1-1
If keys are pushed onto a stack in the order {1, 2, 3, 4, 5}, then it is impossible to obtain the output sequence {3, 4, 1, 2, 5}.
+
(3分)
评测结果 答案正确(3 分)
R1-2
For a sequentially stored linear list of length N N N , the time complexities for deleting the first element and inserting the last element are O ( 1 ) O(1) O ( 1 ) and O ( N ) O(N) O ( N ) , respectively.
+
(3分)
评测结果 答案错误(0 分)
R1-3
The sum of the degrees of all the vertices in a connected graph must be an even number.
+
(3分)
评测结果 答案正确(3 分)
R1-4
In a binary search tree, the keys on the same level from left to right must be in sorted (non-decreasing) order.
+
(3分)
评测结果 答案正确(3 分)
R1-5
N 2 l o g N N^2 logN N 2 l o g N and N l o g N 2 N logN^2 Nl o g N 2 have the same speed of growth.
+
(3分)
评测结果 答案错误(0 分)
单选题 得分:18 总分:65
R2-1
How many leaf node does a complete binary tree with 2435 nodes have?
+
(6分)
评测结果 答案正确(6 分)
R2-2
The result of performing three DeleteMin operations in the min-heap {1,3,2,6,7,5,4,15,14,12,9,10,11,13,8} is:
-
(5分)
A.
4,5,6,12,7,10,8,15,14,13,9,11
-
B.
4,5,6,7,8,9,10,11,12,13,14,15
-
C.
4,6,5,13,7,10,8,15,14,12,9,11
-
D.
4,6,5,12,7,10,8,15,14,9,13,11
+
(5分)
A.
4,5,6,12,7,10,8,15,14,13,9,11
+
B.
4,5,6,7,8,9,10,11,12,13,14,15
+
C.
4,6,5,13,7,10,8,15,14,12,9,11
+
D.
4,6,5,12,7,10,8,15,14,9,13,11
评测结果 答案错误(0 分)
R2-3
The array representation of a disjoint set is given by { 4, 6, 5, 2, -3, -4, 3 }. If the elements are numbered from 1 to 7, the resulting array after invoking Union(Find(7),Find(1))
with union-by-size and path-compression is:
-
(5分)
A.
{ 4, 6, 5, 2, -7, 5, 3 }
-
B.
{ 4, 6, 5, 2, 6, -7, 3 }
-
C.
{ 6, 6, 5, 6, -7, 5, 5 }
-
D.
{ 6, 6, 5, 6, 6, -7, 5 }
+
(5分)
A.
{ 4, 6, 5, 2, -7, 5, 3 }
+
B.
{ 4, 6, 5, 2, 6, -7, 3 }
+
C.
{ 6, 6, 5, 6, -7, 5, 5 }
+
评测结果 答案错误(0 分)
R2-4
Insert { 6, 9, 12, 3, 4, 8 } one by one into an initially empty binary search tree. The post-order traversal sequence of the resulting tree is:
-
(6分)
评测结果 答案错误(0 分)
R2-5
In-order traversal of a binary tree can be done iteratively. Given the stack operation sequence as the following:
-
push(1), push(2), push(3), pop(), push(4), pop(), pop(), push(5), pop(), pop(), push(6), pop()
+
push(1), push(2), push(3), pop(), push(4), pop(), pop(), push(5), pop(), pop(), push(6), pop()
Which one of the following statements is TRUE?
-
(6分)
评测结果 答案正确(6 分)
R2-6
The recurrent equations for the time complexities of programs P1 and P2 are:
P1: T ( 1 ) = 1 T(1)=1 T ( 1 ) = 1 , T ( N ) = T ( N / 2 ) + 1 T(N)=T(N/2)+1 T ( N ) = T ( N /2 ) + 1 ;
P2: T ( 1 ) = 1 T(1)=1 T ( 1 ) = 1 , T ( N ) = 2 T ( N / 2 ) + 1 T(N)=2T(N/2)+1 T ( N ) = 2 T ( N /2 ) + 1 ;
Then the best conclusion about their time complexities is:
-
(5分)
A.
they are both O ( l o g N ) O(logN) O ( l o g N )
-
B.
O ( l o g N ) O(logN) O ( l o g N ) for P1, and O ( N ) O(N) O ( N ) for P2
-
C.
O ( l o g N ) O(logN) O ( l o g N ) for P1, and O ( N l o g N ) O(NlogN) O ( Nl o g N ) for P2
-
D.
they are both O ( N ) O(N) O ( N )
+
(5分)
A.
they are both O ( l o g N ) O(logN) O ( l o g N )
+
B.
O ( l o g N ) O(logN) O ( l o g N ) for P1, and O ( N ) O(N) O ( N ) for P2
+
C.
O ( l o g N ) O(logN) O ( l o g N ) for P1, and O ( N l o g N ) O(NlogN) O ( Nl o g N ) for P2
+
评测结果 答案错误(0 分)
R2-7
From the given graph shown by the figure, how many different topological orders can we obtain?
-
(5分)
评测结果 答案错误(0 分)
R2-8
If an undirected graph G = (V, E) contains 7 vertices. Then to guarantee that G is connected in any cases, there has to be at least ____ edges.
-
(6分)
评测结果 答案错误(0 分)
R2-9
To delete p
from a doubly linked list, we must do:
-
(6分)
A.
p->prior=p->prior->prior; p->prior->next=p;
-
B.
p->next=p->prior->prior; p->prior=p->next->next;
-
C.
p->next->prior=p; p->next=p->next->next;
-
D.
p->prior->next=p->next; p->next->prior=p->prior;
+
(6分)
A.
p->prior=p->prior->prior; p->prior->next=p;
+
B.
p->next=p->prior->prior; p->prior=p->next->next;
+
C.
p->next->prior=p; p->next=p->next->next;
+
评测结果 答案正确(6 分)
R2-10
Which of the following statements is TRUE about topological sorting?
-
(5分)
A.
In a DAG, if for any pair of distinct vertices V i V_i V i and V j V_j V j , there is a path either from V i V_i V i to V j V_j V j or from V j V_j V j to V i V_i V i , then the DAG must have a unique topological sequence.
-
B.
If the adjacency matrix is triangular, then the corresponding directed graph must have a unique topological sequence.
-
C.
If V i V_i V i precedes V j V_j V j in a topological sequence, then there must be a path from V i V_i V i to V j V_j V j .
-
D.
If a graph has a topological sequence, then its adjacency matrix must be triangular.
+
(5分)
A.
In a DAG, if for any pair of distinct vertices V i V_i V i and V j V_j V j , there is a path either from V i V_i V i to V j V_j V j or from V j V_j V j to V i V_i V i , then the DAG must have a unique topological sequence.
+
B.
If the adjacency matrix is triangular, then the corresponding directed graph must have a unique topological sequence.
+
C.
If V i V_i V i precedes V j V_j V j in a topological sequence, then there must be a path from V i V_i V i to V j V_j V j .
+
评测结果 答案错误(0 分)
R2-11
Given a quadtree(四叉树) with 4 nodes of degree 2, 4 nodes of degree 3, 3 nodes of degree 4. The number of leaf nodes in this tree is __.
-
(5分)
评测结果 答案错误(0 分)
R2-12
Suppose that an array of size m
is used to store a circular queue. If the front position is front
and the current size is size
, then the rear element must be at:
-
(5分)
评测结果 答案错误(0 分)
程序填空题 得分:0 总分:20
-
+
diff --git "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/exams/18-19-middle/index.html" "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/exams/18-19-middle/index.html"
index b7dd3129..9c7023bd 100644
--- "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/exams/18-19-middle/index.html"
+++ "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/exams/18-19-middle/index.html"
@@ -2474,14 +2474,13 @@
-
18-19年期中考试试卷
-
+
18-19年期中考试试卷
+
-
+
浙江大学2018-19秋冬《数据结构基础》期中模拟练习
-
+
+
-
-
-
-
浙江大学2018-19秋冬《数据结构基础》期中模拟练习
开始时间 01/01/2016 8:00:00 AM
结束时间 01/18/2038 8:00:00 AM
答题时长 90分钟
考生
得分 19
总分 100
判断题 得分:12 总分:15
R1-1
2 N 2^N 2 N and N N N^N N N have the same speed of growth.
-
(3分)
评测结果 答案错误(0 分)
R1-2
If keys are pushed onto a stack in the order {1, 2, 3, 4, 5}, then it is impossible to obtain the output sequence {3, 4, 1, 2, 5}.
-
(3分)
评测结果 答案正确(3 分)
R1-3
If there are less than 20 inversions in an integer array, then Insertion Sort will be the best method among Quick Sort, Heap Sort and Insertion Sort.
-
(3分)
评测结果 答案正确(3 分)
R1-4
For a sequentially stored linear list of length N N N , the time complexities for query and insertion are O ( 1 ) O(1) O ( 1 ) and O ( N ) O(N) O ( N ) , respectively.
-
(3分)
评测结果 答案正确(3 分)
R1-5
In a binary search tree, the keys on the same level from left to right must be in sorted (non-decreasing) order.
-
(3分)
评测结果 答案正确(3 分)
单选题 得分:5 总分:64
R2-1
The recurrent equations for the time complexities of programs P1 and P2 are:
+
+
+
+
浙江大学2018-19秋冬《数据结构基础》期中模拟练习
开始时间 01/01/2016 8:00:00 AM
结束时间 01/18/2038 8:00:00 AM
答题时长 90分钟
考生
得分 19
总分 100
判断题 得分:12 总分:15
R1-1
2 N 2^N 2 N and N N N^N N N have the same speed of growth.
+
(3分)
评测结果 答案错误(0 分)
R1-2
If keys are pushed onto a stack in the order {1, 2, 3, 4, 5}, then it is impossible to obtain the output sequence {3, 4, 1, 2, 5}.
+
(3分)
评测结果 答案正确(3 分)
R1-3
If there are less than 20 inversions in an integer array, then Insertion Sort will be the best method among Quick Sort, Heap Sort and Insertion Sort.
+
(3分)
评测结果 答案正确(3 分)
R1-4
For a sequentially stored linear list of length N N N , the time complexities for query and insertion are O ( 1 ) O(1) O ( 1 ) and O ( N ) O(N) O ( N ) , respectively.
+
(3分)
评测结果 答案正确(3 分)
R1-5
In a binary search tree, the keys on the same level from left to right must be in sorted (non-decreasing) order.
+
(3分)
评测结果 答案正确(3 分)
单选题 得分:5 总分:64
R2-1
The recurrent equations for the time complexities of programs P1 and P2 are:
P1: T ( 1 ) = 1 T(1)=1 T ( 1 ) = 1 , T ( N ) = T ( N / 2 ) + 1 T(N)=T(N/2)+1 T ( N ) = T ( N /2 ) + 1 ;
P2: T ( 1 ) = 1 T(1)=1 T ( 1 ) = 1 , T ( N ) = 2 T ( N / 2 ) + 1 T(N)=2T(N/2)+1 T ( N ) = 2 T ( N /2 ) + 1 ;
Then the best conclusion about their time complexities is:
-
(5分)
A.
O ( l o g N ) O(logN) O ( l o g N ) for P1, and O ( N l o g N ) O(NlogN) O ( Nl o g N ) for P2
-
B.
they are both O ( N ) O(N) O ( N )
-
C.
O ( l o g N ) O(logN) O ( l o g N ) for P1, and O ( N ) O(N) O ( N ) for P2
-
D.
they are both O ( l o g N ) O(logN) O ( l o g N )
+
(5分)
A.
O ( l o g N ) O(logN) O ( l o g N ) for P1, and O ( N l o g N ) O(NlogN) O ( Nl o g N ) for P2
+
B.
they are both O ( N ) O(N) O ( N )
+
C.
O ( l o g N ) O(logN) O ( l o g N ) for P1, and O ( N ) O(N) O ( N ) for P2
+
评测结果 答案错误(0 分)
R2-2
To delete p
from a doubly linked list, we must do:
-
(5分)
A.
p->prior=p->prior->prior; p->prior->next=p;
-
B.
p->next->prior=p; p->next=p->next->next;
-
C.
p->prior->next=p->next; p->next->prior=p->prior;
-
D.
p->next=p->prior->prior; p->prior=p->next->next;
+
(5分)
A.
p->prior=p->prior->prior; p->prior->next=p;
+
B.
p->next->prior=p; p->next=p->next->next;
+
C.
p->prior->next=p->next; p->next->prior=p->prior;
+
评测结果 答案错误(0 分)
R2-3
Given input {15, 9, 7, 8, 20, -1, 4}. If the result of the 1st run of Shell sort is {15, -1, 4, 8, 20, 9, 7}, then the initial increment must be:
-
(5分)
评测结果 答案错误(0 分)
R2-4
In-order traversal of a binary tree can be done iteratively. Given the stack operation sequence as the following:
-
push(1), push(2), push(3), pop(), push(4), pop(), pop(), push(5), pop(), pop(), push(6), pop()
+
push(1), push(2), push(3), pop(), push(4), pop(), pop(), push(5), pop(), pop(), push(6), pop()
Which one of the following statements is TRUE?
-
(5分)
评测结果 答案错误(0 分)
R2-5
How many leaf node does a complete binary tree with 2435 nodes have?
-
(5分)
评测结果 答案错误(0 分)
R2-6
Suppose that an array of size m
is used to store a circular queue. If the head pointer front
and the current size variable size
are used to represent the range of the queue instead of front
and rear
, then the maximum capacity of this queue can be:
-
(5分)
评测结果 答案错误(0 分)
R2-7
Given input { 4321, 56, 57, 46, 28, 7, 331, 33, 234, 63 }. Which one of the following is the result after the 1st run of the Least Signification Digit (LSD) radix sort?
-
(5分)
A.
→4321→331→33→63→234→56→46→57→7→28
-
B.
→57→46→28→7→33→234→63→56→4321→331
-
C.
→56→28→4321→331→33→234→46→57→63→7
-
D.
→331→4321→33→63→234→56→46→57→7→28
+
(5分)
A.
→4321→331→33→63→234→56→46→57→7→28
+
B.
→57→46→28→7→33→234→63→56→4321→331
+
C.
→56→28→4321→331→33→234→46→57→63→7
+
评测结果 答案正确(5 分)
R2-8
Given a quadtree(四叉树) with 4 nodes of degree 2, 4 nodes of degree 3, 3 nodes of degree 4. The number of leaf nodes in this tree is __.
-
(5分)
评测结果 答案错误(0 分)
R2-9
For an in-order threaded binary tree, if the pre-order and in-order traversal sequences are B E A C F D
and A E C B D F
respectively, which pair of nodes' left links are both threads?
-
(4分)
评测结果 答案错误(0 分)
R2-9
For an in-order threaded binary tree, if the pre-order and in-order traversal sequences are B E A C F D
and A E C B D F
respectively, which pair of nodes' left links are both threads?
+
(4分)
评测结果 答案错误(0 分)
R2-10
The result of performing three DeleteMin operations in the min-heap {1,3,2,12,6,4,8,15,14,9,7,5,11,13,10} is:
-
(5分)
A.
4,6,5,12,7,10,8,15,14,9,13,11
-
B.
4,6,5,13,7,10,8,15,14,12,9,11
-
C.
4,5,6,12,7,10,8,15,14,13,9,11
-
D.
4,5,6,7,8,9,10,11,12,13,14,15
+
(5分)
A.
4,6,5,12,7,10,8,15,14,9,13,11
+
B.
4,6,5,13,7,10,8,15,14,12,9,11
+
C.
4,5,6,12,7,10,8,15,14,13,9,11
+
D.
4,5,6,7,8,9,10,11,12,13,14,15
评测结果 答案错误(0 分)
R2-11
For the quicksort implementation with the left pointer stops at an element with the same key as the pivot during the partitioning, but the right pointer does not stop in a similar case, what is the running time when all keys are equal?
-
(5分)
D.
O ( N l o g N ) O(NlogN) O ( Nl o g N )
+
(5分)
评测结果 答案错误(0 分)
R2-12
Among the following sorting methods, which ones will be slowed down if we store the elements in a linked structure instead of a sequential structure?
Insertion sort; 2. Selection Sort; 3. Bubble sort; 4. Shell sort; 5. Heap sort
-
(5分)
评测结果 答案错误(0 分)
R2-13
Insert { 3, 8, 9, 1, 2, 6 } one by one into an initially empty binary search tree. The post-order traversal sequence of the resulting tree is:
-
(5分)
评测结果 答案错误(0 分)
程序填空题 得分:0 总分:15
函数题 得分:2 总分:6
R6-1
No Less Than X in BST
(6分)
You are supposed to output, in decreasing order, all the elements no less than X
in a binary search tree T
.
-
void Print_NLT( Tree T, int X );
+
void Print_NLT( Tree T, int X );
where Tree
is defined as the following:
typedef struct TreeNode *Tree;
struct TreeNode {
int Element;
Tree Left;
Tree Right;
-};
+};
The function is supposed to use Output(X)
to print X
.
Sample program of judge:
#include <stdio.h>
@@ -2763,17 +2762,17 @@ Sample program of judge:
int X;
T = BuildTree();
- scanf("%d", &X);
+ scanf("%d", &X);
Print_NLT( T, X );
- printf("End\n");
+ printf("End\n");
return 0;
}
/* Your function will be put here */
-
+
-
92 91 90 85 81 80 End
+
92 91 90 85 81 80 End
@@ -2781,7 +2780,7 @@
-
End
+
End
@@ -2790,17 +2789,17 @@ 编译器输出
a.c: In function ‘BuildTree’:
a.c:33:6: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
- scanf("%d", &n);
+ scanf("%d", &n);
^~~~~~~~~~~~~~~
a.c:35:10: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
- scanf("%d", &x);
+ scanf("%d", &x);
^~~~~~~~~~~~~~~
a.c: In function ‘main’:
a.c:52:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
- scanf("%d", &X);
+ scanf("%d", &X);
^~~~~~~~~~~~~~~ 测试点 结果 测试点得分 耗时 内存 0 答案错误 0 5.00 ms 316 KB 1 答案正确 1 4.00 ms 384 KB 2 答案错误 0 5.00 ms 356 KB 3 答案正确 1 4.00 ms 324 KB 4 答案错误 0 5.00 ms 400 KB
评测结果 部分正确(2 分)
-
+
diff --git "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/exams/19-20-middle/index.html" "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/exams/19-20-middle/index.html"
index 3450c46e..49f14ba4 100644
--- "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/exams/19-20-middle/index.html"
+++ "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/exams/19-20-middle/index.html"
@@ -2474,14 +2474,13 @@
-
19-20年期中考试试卷
-
+
19-20年期中考试试卷
+
-
+
浙江大学2019-20秋冬《数据结构基础》期中模拟练习(45分钟)
-
+
+
-
-
+
-
浙江大学2019-20秋冬《数据结构基础》期中模拟练习(45分钟)
开始时间 01/01/2016 8:00:00 AM
结束时间 01/18/2038 8:00:00 AM
答题时长 45分钟
考生
得分 38
总分 100
判断题 得分:12 总分:15
R1-1
N l o g N \sqrt{N}logN N l o g N is O ( N ) O(N) O ( N ) .
-
(3分)
评测结果 答案正确(3 分)
R1-2
In Union/Find algorithm, if Unions are done by size, the depth of any node must be no more than N / 2 N/2 N /2 , but not O ( l o g N ) O(logN) O ( l o g N ) .
-
(3分)
评测结果 答案错误(0 分)
R1-3
If a linear list is represented by a 1-dimensional array, the addresses of the elements in the memory must be consecutive.
-
(3分)
评测结果 答案正确(3 分)
R1-4
ADT is the abbreviation for Abstract Data Type in the textbook of data structures.
-
(3分)
评测结果 答案正确(3 分)
R1-5
In a directed graph, the sum of the in-degrees must be equal to the sum of the out-degrees of all the vertices.
-
(3分)
评测结果 答案正确(3 分)
单选题 得分:26 总分:60
R2-1
If a binary search tree of N N N nodes is also a complete binary tree, then among the following, which one is FALSE?
-
(5分)
A.
The average search time is O ( l o g N ) O(logN) O ( l o g N )
-
B.
The largest key must be on the last level
-
C.
The median key must be at either the root or in the left subtree of the root
-
D.
The smallest key must be at a leaf node
+M834 80h400000v40h-400000z">
l o g N is
O ( N ) O(N) O ( N ) .
+
(3分)
评测结果 答案正确(3 分)
R1-2
In Union/Find algorithm, if Unions are done by size, the depth of any node must be no more than N / 2 N/2 N /2 , but not O ( l o g N ) O(logN) O ( l o g N ) .
+
(3分)
评测结果 答案错误(0 分)
R1-3
If a linear list is represented by a 1-dimensional array, the addresses of the elements in the memory must be consecutive.
+
(3分)
评测结果 答案正确(3 分)
R1-4
ADT is the abbreviation for Abstract Data Type in the textbook of data structures.
+
(3分)
评测结果 答案正确(3 分)
R1-5
In a directed graph, the sum of the in-degrees must be equal to the sum of the out-degrees of all the vertices.
+
(3分)
评测结果 答案正确(3 分)
单选题 得分:26 总分:60
R2-1
If a binary search tree of N N N nodes is also a complete binary tree, then among the following, which one is FALSE?
+
(5分)
A.
The average search time is O ( l o g N ) O(logN) O ( l o g N )
+
B.
The largest key must be on the last level
+
C.
The median key must be at either the root or in the left subtree of the root
+
评测结果 答案正确(5 分)
R2-2
The following figure shows the AOE network of a project with 8 activities. The earliest and the latest start times of the activity d
are __, respectively.
-
(5分)
评测结果 答案正确(5 分)
R2-3
Which one of the following is the data structure that is best represented by the above picture?
-
(1分)
评测结果 答案正确(1 分)
R2-4
For a sequentially stored linear list of length N N N , the time complexities for query and insertion are:
-
(5分)
A.
O ( 1 ) O(1) O ( 1 ) , O ( 1 ) O(1) O ( 1 )
-
B.
O ( 1 ) O(1) O ( 1 ) , O ( N ) O(N) O ( N )
-
C.
O ( N ) O(N) O ( N ) , O ( 1 ) O(1) O ( 1 )
-
D.
O ( N ) O(N) O ( N ) , O ( N ) O(N) O ( N )
+
(5分)
A.
O ( 1 ) O(1) O ( 1 ) , O ( 1 ) O(1) O ( 1 )
+
B.
O ( 1 ) O(1) O ( 1 ) , O ( N ) O(N) O ( N )
+
C.
O ( N ) O(N) O ( N ) , O ( 1 ) O(1) O ( 1 )
+
评测结果 答案错误(0 分)
R2-5
If graph G is NOT connected and has 27 edges, then it must have at least ____ vertices.
-
(5分)
评测结果 答案错误(0 分)
R2-6
A full tree of degree 3 is a tree in which every node other than the leaves has 3 children. How many leaves does a full tree of degree 3 have if it has 127 nodes?
-
(5分)
评测结果 答案正确(5 分)
R2-7
Since the speed of a printer cannot match the speed of a computer, a buffer is designed to temperarily store the data from a computer so that later the printer can retrieve data in order. Then the proper structure of the buffer shall be a:
-
(5分)
评测结果 答案正确(5 分)
R2-8
Let n n n be a non-negative integer representing the size of input. The time complexity of the following piece of code is:
x = 0;
while ( n >= (x+1)*(x+1) )
- x = x+1;
-
(5分)
B.
O ( n 1 / 2 ) O(n^{1/2}) O ( n 1/2 )
-
D.
O ( n 2 ) O(n^2) O ( n 2 )
+ x = x+1;
+
(5分)
B.
O ( n 1 / 2 ) O(n^{1/2}) O ( n 1/2 )
+
评测结果 答案错误(0 分)
R2-9
From the given graph shown by the figure, how many different topological orders can we obtain?
-
(5分)
评测结果 答案正确(5 分)
R2-10
If besides finding the shortest path from S
to every other vertices, we also need to count the number of different shortest paths, we can modify the Dijkstra algorithm in the following way: add an array count[]
so that count[V]
records the number of different shortest paths from S
to V
. Then count[V]
shall be initialized as:
-
(5分)
A.
count[V]=1
for all vertices
-
B.
count[S]=1;
and count[V]=0
for other V
-
C.
count[V]=0
for all vertices
-
D.
count[S]=0;
and count[V]=1
for other V
+
(5分)
A.
count[V]=1
for all vertices
+
B.
count[S]=1;
and count[V]=0
for other V
+
C.
count[V]=0
for all vertices
+
评测结果 答案错误(0 分)
R2-11
Given the shape of a binary tree shown by the figure below. If its postorder traversal sequence is { e
, a
, c
, b
, d
, f
}, then the node on the same level of b
must be:
-
(5分)
评测结果 答案错误(0 分)
R2-12
The array representation of the disjoint sets is given by {2, –4, 2, 3, -3, 5, 6, 9, -2}. Keep in mind that the elements are numbered from 1 to 9. After invoking Union(Find(4), Find(6)) with union-by-size, which elements will be changed in the resulting array?
-
(4分)
A.
a. elements of index 4 and 6
-
B.
a. elements of index 2 and 6
-
C.
a. elements of index 4 and 5
-
D.
a. elements of index 2 and 5
+
(4分)
A.
a. elements of index 4 and 6
+
B.
a. elements of index 2 and 6
+
C.
a. elements of index 4 and 5
+
评测结果 答案错误(0 分)
R2-13
Given the popping sequence of a stack as {1, 2, 3, 4, 5}. Among the following, the impossible pushing sequence is:
-
(5分)
评测结果 答案错误(0 分)
程序填空题 得分:暂无 总分:25
-
+
diff --git "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/mynotes/FDS-notes/index.html" "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/mynotes/FDS-notes/index.html"
index e079f939..8684225f 100644
--- "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/mynotes/FDS-notes/index.html"
+++ "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/mynotes/FDS-notes/index.html"
@@ -2556,9 +2556,9 @@
-
FDS-notes-2023
+
FDS-notes-2023
注意复习:填空题,以下内容均可能作为填空
-
+
树
四种遍历顺序
层序 1 11 5 12 17 8 20 15
@@ -2722,7 +2722,7 @@
树
{
for ( int i = queue -> front ; i < queue -> front + len ; i ++ )
{
- printf ( " %d" , queue -> list [ i ] -> data );
+ printf ( " %d" , queue -> list [ i ] -> data );
}
}
else
@@ -2730,9 +2730,9 @@ 树
for ( int i = queue -> front + len - 1 ; i >= queue -> front ; i -- )
{
if ( level == 0 )
- printf ( "%d" , queue -> list [ i ] -> data );
+ printf ( "%d" , queue -> list [ i ] -> data );
else
- printf ( " %d" , queue -> list [ i ] -> data );
+ printf ( " %d" , queue -> list [ i ] -> data );
}
}
//到此为止,往上:打印,也就是visit
@@ -3277,10 +3277,10 @@ 双端队列 double-ended queue,简称Deque
void printDeque ( struct Deque * deque ) {
struct Node * current = deque -> front ;
while ( current != NULL ) {
- printf ( "%d " , current -> data );
+ printf ( "%d " , current -> data );
current = current -> next ;
}
- printf ( " \n " );
+ printf ( " \n " );
}
// 主函数
@@ -3446,7 +3446,7 @@ 双端队列 double-ended queue,简称Deque
} else if ( deque -> front > 0 ) {
deque -> arr [ -- deque -> front ] = data ;
} else {
- printf ( "Deque is full (front). \n " );
+ printf ( "Deque is full (front). \n " );
}
}
@@ -3459,7 +3459,7 @@ 双端队列 double-ended queue,简称Deque
} else if ( deque -> rear < MAX_SIZE - 1 ) {
deque -> arr [ ++ deque -> rear ] = data ;
} else {
- printf ( "Deque is full (rear). \n " );
+ printf ( "Deque is full (rear). \n " );
}
}
@@ -3473,7 +3473,7 @@ 双端队列 double-ended queue,简称Deque
deque -> front ++ ;
}
} else {
- printf ( "Deque is empty (front). \n " );
+ printf ( "Deque is empty (front). \n " );
}
}
@@ -3487,7 +3487,7 @@ 双端队列 double-ended queue,简称Deque
deque -> rear -- ;
}
} else {
- printf ( "Deque is empty (rear). \n " );
+ printf ( "Deque is empty (rear). \n " );
}
}
@@ -3499,16 +3499,16 @@ 双端队列 double-ended queue,简称Deque
// 打印双端队列中的元素
void printDeque ( struct Deque * deque ) {
if ( isEmpty ( deque )) {
- printf ( "Deque is empty. \n " );
+ printf ( "Deque is empty. \n " );
return ;
}
- printf ( "Front: %d, Rear: %d \n " , deque -> front , deque -> rear );
- printf ( "Elements: " );
+ printf ( "Front: %d, Rear: %d \n " , deque -> front , deque -> rear );
+ printf ( "Elements: " );
for ( int i = deque -> front ; i <= deque -> rear ; i ++ ) {
- printf ( "%d " , deque -> arr [ i ]);
+ printf ( "%d " , deque -> arr [ i ]);
}
- printf ( " \n " );
+ printf ( " \n " );
}
// 主函数
@@ -3678,7 +3678,7 @@ 循环队列
// 出队操作
int dequeue ( struct CircularQueue * queue ) {
if ( queue -> front == NULL ) {
- printf ( "Queue is empty. \n " );
+ printf ( "Queue is empty. \n " );
return -1 ; // 队列为空时返回-1
}
int data = queue -> front -> data ;
@@ -3703,14 +3703,14 @@ 循环队列
void printCircularQueue ( struct CircularQueue * queue ) {
struct Node * current = queue -> front ;
if ( current == NULL ) {
- printf ( "Circular Queue is empty. \n " );
+ printf ( "Circular Queue is empty. \n " );
return ;
}
do {
- printf ( "%d " , current -> data );
+ printf ( "%d " , current -> data );
current = current -> next ;
} while ( current != queue -> front );
- printf ( " \n " );
+ printf ( " \n " );
}
// 主函数
@@ -3865,7 +3865,7 @@ 循环队列
// 入队操作
void enqueue ( struct CircularQueue * queue , int data ) {
if (( queue -> rear + 1 ) % MAX_SIZE == queue -> front ) {
- printf ( "Queue is full. \n " );
+ printf ( "Queue is full. \n " );
return ;
}
if ( queue -> front == -1 ) {
@@ -3881,7 +3881,7 @@ 循环队列
// 出队操作
int dequeue ( struct CircularQueue * queue ) {
if ( queue -> front == -1 ) {
- printf ( "Queue is empty. \n " );
+ printf ( "Queue is empty. \n " );
return -1 ;
}
int data = queue -> arr [ queue -> front ];
@@ -3902,16 +3902,16 @@ 循环队列
// 打印循循环队列中的元素
void printCircularQueue ( struct CircularQueue * queue ) {
if ( isEmpty ( queue )) {
- printf ( "Circular Queue is empty. \n " );
+ printf ( "Circular Queue is empty. \n " );
return ;
}
int i = queue -> front ;
do {
- printf ( "%d " , queue -> arr [ i ]);
+ printf ( "%d " , queue -> arr [ i ]);
i = ( i + 1 ) % MAX_SIZE ;
} while ( i != ( queue -> rear + 1 ) % MAX_SIZE );
- printf ( " \n " );
+ printf ( " \n " );
}
// 主函数
@@ -4031,16 +4031,16 @@ 双向循环链表
// 打印双向循环链表的元素
void printDoublyCircularLinkedList ( struct Node * head ) {
if ( head == NULL ) {
- printf ( "Empty Doubly Circular Linked List \n " );
+ printf ( "Empty Doubly Circular Linked List \n " );
return ;
}
struct Node * current = head ;
do {
- printf ( "%d " , current -> data );
+ printf ( "%d " , current -> data );
current = current -> next ;
} while ( current != head );
- printf ( " \n " );
+ printf ( " \n " );
}
// 主函数
@@ -4050,7 +4050,7 @@ 双向循环链表
insertAtEnd ( & head , 2 );
insertAtEnd ( & head , 3 );
- printf ( "Doubly Circular Linked List: " ); c
+ printf ( "Doubly Circular Linked List: " ); c
printDoublyCircularLinkedList ( head );
return 0 ;
@@ -4077,7 +4077,7 @@ 双向循环链表
make_tree ( tree , a , n , p * 2 + 1 , i );
}
-
直接找到越界为止
+
直接找到越界为止
diff --git "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/mynotes/midterm/index.html" "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/mynotes/midterm/index.html"
index 4d9286cf..6633e6f2 100644
--- "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/mynotes/midterm/index.html"
+++ "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/mynotes/midterm/index.html"
@@ -2622,7 +2622,7 @@
-
midterm
+
midterm
易错复杂度分析
建堆(不是一个个插入)的算法:\(O(N)\) ,对i=n/2到1的所有节点都pecolate down
指针比较多,注意调试不要打印或者访问NULL的某个属性,避免越界等段错误
@@ -2820,7 +2820,7 @@
path-compression akaman-algorithm
4.树:二叉树,搜索树
zigzagging on a tree
-
+
C 1
2
3
@@ -3049,7 +3049,7 @@ zigzagging on a tree
void print_tree(tree_ptr tree){
//打印顺序为根左右
if(tree == NULL)return;
- printf("%d ", tree->data);
+ printf("%d ", tree->data);
if(tree->left != NULL)print_tree(tree->left);
if(tree->right != NULL)print_tree(tree->right);
}
@@ -3073,7 +3073,7 @@ zigzagging on a tree
{
for ( int i = queue -> front ; i < queue -> front + len ; i ++ )
{
- printf ( " %d" , queue -> list [ i ] -> data );
+ printf ( " %d" , queue -> list [ i ] -> data );
}
}
else
@@ -3081,9 +3081,9 @@ zigzagging on a tree
for ( int i = queue -> front + len - 1 ; i >= queue -> front ; i -- )
{
if ( level == 0 )
- printf ( "%d" , queue -> list [ i ] -> data );
+ printf ( "%d" , queue -> list [ i ] -> data );
else
- printf ( " %d" , queue -> list [ i ] -> data );
+ printf ( " %d" , queue -> list [ i ] -> data );
}
}
for ( int i = queue -> front ; i < queue -> front + len ; i ++ )
@@ -3102,7 +3102,7 @@ zigzagging on a tree
{
// zigzag 层序遍历,在每一行输出时打印出逆序的
int n ;
- scanf ( "%d" , & n );
+ scanf ( "%d" , & n );
// The second line gives the inorder sequence
// and the third line gives the postorder sequence
/* 1. 根据后序序列的最后一个元素建立根结点;
@@ -3113,9 +3113,9 @@ zigzagging on a tree
int in_order [ MAX_NODE_NUM ] = { 0 };
int post_order [ MAX_NODE_NUM ] = { 0 };
for ( int i = 0 ; i < n ; i ++ )
- scanf ( "%d" , & in_order [ i ]);
+ scanf ( "%d" , & in_order [ i ]);
for ( int i = 0 ; i < n ; i ++ )
- scanf ( "%d" , & post_order [ i ]);
+ scanf ( "%d" , & post_order [ i ]);
tree_ptr tree = build_tree ( in_order , post_order , n );
// 把树打印出来看看
@@ -3156,7 +3156,7 @@ zigzagging on a tree
}
insertion sequence序列不同,构建出的二叉树形状可能有多种
-
+
建立二叉搜索树的顺序
先判断当前节点是否为NULL,若是,则建立新节点(data = x,left=right=NULL)
若不是,则递归向下,若大于当前,则Insert(x,tree->left),小于前,则Insert(x,tree->right)
@@ -3187,7 +3187,7 @@
zigzagging on a tree
{
T = malloc ( sizeof ( struct TreeNode ) );
if ( T == NULL )
- FatalError ( "Out of space!!!" );
+ FatalError ( "Out of space!!!" );
else
{
T -> Element = X ;
@@ -3200,13 +3200,13 @@ zigzagging on a tree
else
if ( X > T -> Element )
T -> Right = Insert ( X , T -> Right );
- /* Else X is in the tree already; we'll do nothing */
+ /* Else X is in the tree already; we'll do nothing */
return T ; /* Do not forget this line!! */
}
作业错题
-
-
+
+
环形队列 数组实现
Suppose that an array of size m
is used to store a circular queue. If the front position is front
and the current size is size
, then the rear element must be at:
Text Only A.front+size
@@ -3217,10 +3217,10 @@ zigzagging on a tree
-
-
+
+
disjoint sets
-
+
HW3: 栈最多容纳M个数,数字1~N依次入栈,而出栈顺序任意,验证给定的序列是否为出栈序列
对于某个序列,如3,2,1,7,5,6,4,栈的大小为5
预设flag=1,假设是合法出栈序列
@@ -3288,7 +3288,7 @@
HW3: 栈最多容纳M个数,数字1~N依次入栈,而出栈
int main ()
{
int M , N , K ;
- scanf ( "%d %d %d" , & M , & N , & K );
+ scanf ( "%d %d %d" , & M , & N , & K );
// M为栈的最大容量,N为入栈的数字个数,K为需要判断的出栈序列的个数
int i , j , k ;
int num [ MAXSIZE ];
@@ -3298,13 +3298,13 @@ HW3: 栈最多容纳M个数,数字1~N依次入栈,而出栈
{
for ( j = 0 ; j < N ; j ++ )
{
- scanf ( "%d" , & num [ j ]);
+ scanf ( "%d" , & num [ j ]);
}
flag = test ( num , M , N ); // 传入出栈序列,栈的最大容量,入栈数字的个数
if ( flag == 0 )
- printf ( "NO \n " );
+ printf ( "NO \n " );
else
- printf ( "YES \n " );
+ printf ( "YES \n " );
}
}
@@ -3336,7 +3336,7 @@ HW3: 栈最多容纳M个数,数字1~N依次入栈,而出栈
polish
infix操作
-
+
C
计算机只能在将中缀表达式转换为前缀或后缀表达式后才能进行运算
计算机在计算后缀表达式时只需从左到右线性扫描,遇到操作数压入栈,遇到运算符则依次 取出栈顶的两个操作数计算后将结果重新压回栈中。
@@ -3345,12 +3345,12 @@
HW3: 栈最多容纳M个数,数字1~N依次入栈,而出栈
最后输出时一般是倒序输出
注意,只有S1栈顶运算符优先级小于当前运算符时,才将当前运算符压入S1,否则直接压入中间结果栈S2
S2不叫操作数栈,因为最后结果从S2中逆序输出得到
-
-
+
+
倒序输出为ABC+*DEF+/-
操作数顺序不会变化,一定是叶子节点
二分查找+1-1问题处理
-
+
左、中、右索引的分配。
循环或递归终止条件。
@@ -3445,9 +3445,9 @@ 15-16
int X ;
T = BuildTree ();
- scanf ( "%d" , & X );
+ scanf ( "%d" , & X );
Print_NGT ( T , X );
- printf ( "End \n " );
+ printf ( "End \n " );
return 0 ;
}
@@ -3456,7 +3456,7 @@ 15-16
void Print_NGT ( Tree T , int X ){
}
-
+
diff --git "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK01/index.html" "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK01/index.html"
index b870c146..d172503c 100644
--- "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK01/index.html"
+++ "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK01/index.html"
@@ -2648,7 +2648,7 @@
-
WEEK 1
+
WEEK 1
1 Algorithm Analysis
[Definition] An algorithm is a finite set of instructions that, if followed, accomplishes a particular task. In addition, all algorithms must satisfy the following criteria.
@@ -2683,7 +2683,7 @@ Interchange list[i] and list[min];
}
-
+
1.1 What to Analyze
@@ -2780,7 +2780,7 @@ [Example] Recu
T_{rsum}(n)=2n+2
\]
But it takes more time to compute each step.
-
+
1.2 Asymptotic Notation(\(O,\Omega,\Theta,o\) )
predict the growth ; compare the time complexities of two programs ; asymptotic(渐进的) behavior
@@ -2815,8 +2815,8 @@ [Definition]
-
+
+
[Example] Matrix addition
C 1
2
@@ -2860,7 +2860,7 @@ General Rules
The running time is never more than the running time of the test plus the larger of the running time of S1 and S2.
-
+
@@ -2891,7 +2891,7 @@
General Rules
\(O(N)\)
\(O(N)\)
-
\[T(N)\]
+
\[T(N)\]
diff --git "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK02/index.html" "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK02/index.html"
index 35c05709..c4b45680 100644
--- "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK02/index.html"
+++ "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK02/index.html"
@@ -2711,7 +2711,7 @@
-WEEK 2
+WEEK 2
1.3 Compare the Algorithms
[Example] 最大子序列和
Algorithm 1
@@ -2904,7 +2904,7 @@
[Example] 最大子序列和
A[ ] is scanned once only. 扫描一次,无需存储(处理streaming data)
在任意时刻,算法都能对它已经读入的数据给出子序列问题的正确答案(其他算法不具有这个特性)
-
+
1.4 Logrithms in the Running Time
如果一个算法用常数时间将问题的大小削减为其一部分(通常是1/2),那么该算法就是\(O(logN)\) 的
@@ -2985,7 +2985,7 @@ [Example] Efficient exponentiation else return Pow ( X * X , N / 2 ) * X ; /*return Pow(X, N-1)*X is the same*/
}
-
+
1.5 Checking Your Analysis
Method 1
When \(T(N)=O(N)\) , check if \(T(2N)/T(N)\approx2\)
@@ -2993,12 +2993,12 @@ Method 1
When \(T(N)=O(N^3)\) , check if \(T(2N)/T(N)\approx8\)
Method 2
When \(T(N)=O(f(N))\) , check if $\lim\limits_{N\rightarrow\infty}\frac{T(N)}{f(N)}\approx C $
-
+
2 LIst, Stacks and Queues
2.1 Abstract Data Type(ADT) 抽象数据类型
[Definition] Data Type = {Objects} and {Operations}
[Definition] An Abstract Data Type(ADT) is a data type that is organized in such a way that the specification on the objects and specification of the operations on the objects are separated from the representation of the objects and the implementation on the operations.
-
+
2.2 The List ADT
Objects : N items
@@ -3027,7 +3027,7 @@ Simple Array implementation of Lis
Insertion and Deletion not only take \(O(N)\) times, but also involve a lot of data movements which takes time.
-
+
Query 查询
Linked Lists
@@ -3162,7 +3162,7 @@ Linked Lists
Position TmpCell ;
TmpCell = malloc ( sizeof ( struct Node ));
- if ( TmpCell == NULL ) FatalError ( "Out of space!" )
+ if ( TmpCell == NULL ) FatalError ( "Out of space!" )
TmpCell -> Element = X ;
TmpeCell -> Next = P -> Next ;
@@ -3199,7 +3199,7 @@ Doubly Linked Circular Lists
Finding take \(O(\frac N 2)\) times.
-
+
The correct answer is D.
Two Applications
@@ -3292,7 +3292,7 @@ Two Applications
PolyProd -> HighPower = Poly1 -> HighPower + Poly2 -> HighPower ;
if ( PolyProd -> HighPower > MaxDegree )
- Error ( "Exceeded array size" );
+ Error ( "Exceeded array size" );
else
for ( i = O ; i <= Poly1 -> HighPower ; i ++ )
for ( j = O ; j <= Poly2 -> HighPower ; j ++ )
@@ -3325,9 +3325,9 @@ Two Applications
Cursor Implementation of Linked Lists(no pointer)
-
-
-#blender エイサー・パルマタム || Acer Palmatum - selescha.arts的插画 - pixiv
+
+
+#blender エイサー・パルマタム || Acer Palmatum - selescha.arts的插画 - pixiv
diff --git "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK03/index.html" "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK03/index.html"
index 8253df06..bd28de41 100644
--- "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK03/index.html"
+++ "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK03/index.html"
@@ -2570,7 +2570,7 @@
-
WEEK 3
+
WEEK 3
1、栈的链表实现,push,pop和top语句
2、
2.3 The Stack ADT
@@ -2589,7 +2589,7 @@
2.3 The Stack ADT
Push on a full stack is an implementation error but not an ADT error.
-
+
The calls to malloc and free are expensive. Simply keep another stack as a recycle bin.
@@ -2623,7 +2623,7 @@
@@ -2692,7 +2692,7 @@
void Push ( ElementType X , Stack S )
{
if ( IsFull ( S ))
- Error ( "Full stack" );
+ Error ( "Full stack" );
else
S -> Array [ ++ S -> TopOfStack ] = X ;
}
@@ -2810,7 +2810,7 @@ Array Implementation of Stacks
{
if ( ! IsEmpty ( S ))
return S -> Array [ S -> TopOfStack ];
- Error ( "Empty stack" ) ;
+ Error ( "Empty stack" ) ;
return O ; /* Return value used to avoid warning*/
}
@@ -2823,7 +2823,7 @@
Array Implementation of Stacks
7 void Pop ( Stack S )
{
if ( IsEmpty ( S ))
- Error ( "Empty stack" ) ;
+ Error ( "Empty stack" ) ;
else
S -> TopOfStack -- ;
}
@@ -2838,7 +2838,7 @@ Array Implementation of Stacks
{
if ( ! Is Empty ( S ))
return S -> Array [ S -> TopOfStack -- ];
- Error ( "Empty stack" );
+ Error ( "Empty stack" );
return O ; /* Return value used to avoid warnin */
}
@@ -2897,13 +2897,13 @@
Application
Function Calls (System Stack)
-
+
Note : Recursion can always be completely removed . Non recursive programs are generally faster than equivalent recursive programs. However, recursive programs are in general much simpler and easier to understand .
-
+
2.4 The Queue ADT
First-In-First-Out (FIFO)
@@ -2933,14 +2933,14 @@ Array Implementation of Queues
};
Circular Queue :
-
+
The maximum capacity of this queue is 5.
Note : Adding a Size field can avoid wasting one empty space to distinguish “full” from “empty”.
-
+
diff --git "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK04/index.html" "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK04/index.html"
index 8b44f57f..1bdcdd7a 100644
--- "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK04/index.html"
+++ "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK04/index.html"
@@ -2612,7 +2612,7 @@
-
WEEK 4
+
WEEK 4
3 Trees
大纲:
树的定义是递归的,有根节点和从其出发的有向边,连向所有的子树
@@ -2651,14 +2651,14 @@
List Representation
The size of each node depends on the number of branches.
-
+
The correct answer is T.
FirstChild-NextSibling Representation
-
+
The representation is not unique since the children in a tree can be of any order.
-
+
3.2 Binary Trees
[Definition] A binary tree is a tree in which no node can have more than two children.
Tree Traversals (visit each node exactly once)
@@ -2781,7 +2781,7 @@
Tree Traversals (visit eac
}
}
-
+
Threaded Binary Trees
@@ -2824,7 +2824,7 @@ Threaded Binary Trees
线索化的实质就是将二叉链表中的空指针改为指向前驱或后继的线索。由于前驱和后继信息只有在遍历该二叉树时才能得到,所以,线索化的过程就是在遍历的过程中修改空指针的过程。
-
+
diff --git "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK05/index.html" "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK05/index.html"
index b5733fd1..6f08b6b2 100644
--- "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK05/index.html"
+++ "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK05/index.html"
@@ -2555,7 +2555,7 @@
-
WEEK 5
+
WEEK 5
In a tree, the order of children does not matter. But in a binary tree, left child and right child are different.
@@ -2570,7 +2570,7 @@
Properties of Binary Trees
同理,度为1的结点会延伸出一条边,则可列公式:$n-1 = 2n_2 + n_1 $,
合并两个式子可得:\(2n_2 + n_1 +1 =n_0 + n_1 + n_2\) ,则计算可知 \(n_0=n_2+1\)
-
+
3.3 Binary Search Trees
[Definition] A binary search tree is a binary tree. It may be empty. If it is not empty, it satisfies the following properties:
@@ -2715,7 +2715,7 @@ Implementations
{
T = malloc( sizeof( struct TreeNode ) );
if ( T == NULL )
- FatalError( "Out of space!!!" );
+ FatalError( "Out of space!!!" );
else
{
T->Element = X;
@@ -2728,7 +2728,7 @@ Implementations
else
if ( X > T->Element )
T->Right = Insert( X, T->Right );
- /* Else X is in the tree already; we'll do nothing */
+ /* Else X is in the tree already; we'll do nothing */
return T; /* Do not forget this line!! */
}
@@ -2774,7 +2774,7 @@
Implementations
25 SearchTree Delete( ElementType X, SearchTree T )
{
Position TmpCell;
- if ( T == NULL ) Error( "Element not found" );
+ if ( T == NULL ) Error( "Element not found" );
else if ( X < T->Element ) /* Go left */
T->Left = Delete( X, T->Left );
else if ( X > T->Element ) /* Go right */
@@ -2812,9 +2812,9 @@ Implementations
将\(n\) 个元素存入二叉搜索树,树的高度将由插入序列决定
-
+
The correct answer is A.
-
+
diff --git "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK06/index.html" "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK06/index.html"
index c14ab788..1b797db9 100644
--- "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK06/index.html"
+++ "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK06/index.html"
@@ -2681,7 +2681,7 @@
-WEEK 6
+WEEK 6
4 堆 Priority Queues (Heaps)
4.1 ADT Model
@@ -2692,7 +2692,7 @@ 4.1 ADT Model
ElementType DeleteMin( PriorityQueue H );
ElementType FindMin( PriorityQueue H );
-
+
4.2 Implementations
Array
@@ -2740,7 +2740,7 @@ Binary Search Tree
Keep a balanced tree
But there are many operations related to AVL tree that we don't really need for a priority queue.
-
+
4.3 Binary Heap
Structure Property
[Definition] A binary tree with \(n\) nodes and height \(h\) is complete if its nodes correspond to the nodes numbered from \(1\) to \(n\) in the perfect binary tree of height \(h\) .
@@ -2755,7 +2755,7 @@
Structure Property
Array Representation : BT[n + 1] ( BT[0] is not used)
-
+
[Lemma]
\(index\,of\,parent(i)=\left\{
@@ -2794,14 +2794,14 @@ Structure Property
{
PriorityQueue H ;
if ( MaxElements < MinPQSize )
- return Error ( "Priority queue size is too small" );
+ return Error ( "Priority queue size is too small" );
H = malloc ( sizeof ( struct HeapStruct ));
if ( H == NULL )
- return FatalError ( "Out of space!!!" );
+ return FatalError ( "Out of space!!!" );
/* Allocate the array plus one extra for sentinel */
H -> Elements = malloc (( MaxElements + 1 ) * sizeof ( ElementType ));
if ( H -> Elements == NULL )
- return FatalError ( "Out of space!!!" );
+ return FatalError ( "Out of space!!!" );
H -> Capacity = MaxElements ;
H -> Size = 0 ;
H -> Elements [ 0 ] = MinData ; /* set the sentinel */
@@ -2835,7 +2835,7 @@ Basic Heap Operations
int i ;
if ( IsFull ( H ))
{
- Error ( "Priority queue is full" );
+ Error ( "Priority queue is full" );
return ;
}
for ( i = ++ H -> Size ; H -> Elements [ i / 2 ] > X ; i /= 2 )
@@ -2849,7 +2849,7 @@ Basic Heap Operations
DeleteMin
-
C 1
+
C 1
2
3
4
@@ -2878,7 +2878,7 @@ Basic Heap Operations
ElementType MinElement , LastElement ;
if ( IsEmpty ( H ) )
{
- Error ( "Priority queue is empty" );
+ Error ( "Priority queue is empty" );
return H -> Elements [ 0 ];
}
MinElement = H -> Elements [ 1 ]; /*Save the min element*/
@@ -2899,7 +2899,7 @@ Basic Heap Operations
$$
T(N)=O(\log N)
-$$
+$$
Other Heap Operations
-
+
4.5 \(d\) -Heaps — All nodes have \(d\) children
Note :
@@ -2991,10 +2991,10 @@ 4.5 \(d\)
When the priority queue is too large to fit entirely in main memory, a d-heap will become interesting.
-
-
+
+
正确答案是4,注意“in the process”
-
+
diff --git "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK07/index.html" "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK07/index.html"
index 64a9e9e9..3f075885 100644
--- "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK07/index.html"
+++ "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK07/index.html"
@@ -2702,7 +2702,7 @@
-WEEK 7
+WEEK 7
5 The Disjoint Set
5.1 Equivalence Relations
@@ -2718,8 +2718,8 @@
-
+
+
5.2 The Dynamic Equivalence Problem
Given an equivalence relation ~, decide for any a and b if a ~ b
@@ -2767,7 +2767,7 @@ 5.2 The Dynamic Equivalence Problem<
Find( \(i\) ) = Find the set \(S_k\) which contains the element \(i\)
-
+
5.3 Basic Data Structure
Union( \(i, j\) )
@@ -2778,7 +2778,7 @@ Union( \(i, j\) )
Implementation 1 :
-
+
Implementation 2 :
@@ -2806,7 +2806,7 @@ Find( \(i\) )
-
+
@@ -2824,7 +2824,7 @@ Analysis
Union and find are always paired. Thus we consider the performance of a sequence of union-find operations .
-
+
Text Only 1
2
3
@@ -2846,7 +2846,7 @@ Analysis
Worst case : \(T(N)=\Theta(N^2)\)
-
+
5.4 Smart Union Algorithms
Union-by-Size
@@ -2921,7 +2921,7 @@ Union-by-Height
}
}
-
+
5.5 Path Compression
从X到Root的路径上的每一个结点都使它的父结点变成Root
@@ -2965,7 +2965,7 @@ 5.5 Path Compression
Note : Not compatible with union-by-height since it changes the heights. Just take “height” as an estimated rank .
-
+
5.6 Worst Case for Union-by-Rank and Path Compression
[Lemma] Let \(T(M,N)\) be the maximum time required to process an intermixed sequence of \(M\geq N\) finds and \(N-1\) unions, then \(k_1M\alpha(M,N)\leq T(M,N)\leq k_2M\alpha(M,N)\) for some positive constants \(k_1\) and \(k_2\) .
@@ -2986,7 +2986,7 @@ \(\alpha(M,N)=min\{i\geq1|A(i,\lfloor M/N\rfloor)>\log N\}\leq O(\log^*N)\leq4\)
\(\log^*N\) (inverse Ackermann function) = number of times the logarithm is applied to \(N\) until the result \(\leq1\) .
-
+
要求时间复杂度证明
5.7 Conclusion
一共有五种算法,注意看清题设
@@ -3007,7 +3007,7 @@
5.7 Conclusion
Union-by-height + Path Compression
-
+
diff --git "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK08/index.html" "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK08/index.html"
index 2c5cfb70..c19d0f5d 100644
--- "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK08/index.html"
+++ "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK08/index.html"
@@ -2780,7 +2780,7 @@
-WEEK 8
+WEEK 8
6 Graph Algorithms
6.1 Definitions
@@ -2791,7 +2791,7 @@ Undirected graph
\(( v_i , v_j ) = ( v_j , v_i )\) = the same edge.
Directed graph(diagraph)
-
+
Restrictions
diff --git "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK09/index.html" "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK09/index.html"
index 12819298..e552e136 100644
--- "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK09/index.html"
+++ "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK09/index.html"
@@ -2660,7 +2660,7 @@
-WEEK 9
+WEEK 9
6.4 Shortest Path Algorithms
Given a digraph \(G = ( V, E )\) , and a cost function \(c( e )\) for \(e \in E( G )\) .
The length of a path \(P\) from source to destination is \(\sum_{e_i\subset P} c(e_i)\) (also called weighted path length ).
@@ -2718,7 +2718,7 @@
Unweighted Shortest Path
}
The worst case :
-
+
$$
T(N)=O(|V|^2)
$$
@@ -2841,9 +2841,9 @@
Dijkstra’s Algorithm
if ( T [ V ]. Path != NotAVertex )
{
PrintPath ( T [ V ]. Path , T );
- printf ( " to" ) ;
+ printf ( " to" ) ;
}
- printf ( "%v" , V ) ; /* %v is pseudocode * /
+ printf ( "%v" , V ) ; /* %v is pseudocode * /
C 1
2
@@ -2971,9 +2971,9 @@ Acyclic Graphs
\(T=O(|E|+|V|)\) and no priority queue is needed.
AOE(Activity on Edge) Networks
-
-
-
+
+
+
All-Pairs Shortest Path Problem
For all pairs of \(v_i\) and \(v_j\) ( \(i\neq j\) ), find the shortest path between.
@@ -2988,7 +2988,7 @@ Method 2
动态规划
\(O(|V|^3)\) algorithm given in Chapter 10, works faster on dense graphs.
-
+
diff --git "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK10/index.html" "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK10/index.html"
index 99519bc0..8750a4de 100644
--- "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK10/index.html"
+++ "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK10/index.html"
@@ -2594,9 +2594,9 @@
-WEEK 10
+WEEK 10
6.5 Network Flow Problems
-
+
Determine the maximum amount of flow that can pass from \(s\) to \(t\) .
@@ -2668,7 +2668,7 @@
Analysis
The min-cost flow problem is to find, among all maximum flows, the one flow of minimum cost provided that each edge has a cost per unit of flow.
-
+
6.6 Minimum Spanning Tree
[Definition] A spanning tree of a graph \(G\) is a tree which consists of \(V(G)\) and a subset of \(E(G)\)
@@ -2792,10 +2792,10 @@ Greedy Method
$$
T=O(|E|\log|E|)
$$
-
-
+
+
-
+
diff --git "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK11/index.html" "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK11/index.html"
index 912ff0a0..6a333209 100644
--- "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK11/index.html"
+++ "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK11/index.html"
@@ -2645,7 +2645,7 @@
-WEEK 11
+WEEK 11
6.7 Applications of Depth-First Search
C 1
2
@@ -2676,7 +2676,7 @@ Undirected Graphs
if ( ! visited [ V ] )
{
DFS ( V );
- printf ( " \n " );
+ printf ( " \n " );
}
}
@@ -2686,8 +2686,8 @@
Biconnectivity
\(G\) is a biconnected graph if \(G\) is connected and has no articulation points.
A biconnected component is a maximal biconnected subgraph.
-
-
+
+
Note : No edges can be shared by two or more biconnected components. Hence \(E(G)\) is partitioned by the biconnected components of \(G\) .
@@ -2696,8 +2696,8 @@
Biconnectivity
Use depth first search to obtain a spanning tree of \(G\)
-
-
+
+
Depth first number(\(Num\) ) 先序编号
Back edges(背向边) = \((u,v)\notin\) tree and \(u\) is an ancestor of \(v\) .
@@ -2772,7 +2772,7 @@ Biconnectivity
{
Assignlow(W);
if(Low[W] >= Num[V])
- printf("%v is an articulation point\n", v);
+ printf("%v is an articulation point\n", v);
Low[V] = Min(Low[V], Low[W]); /*Rule 3*/
}
else
@@ -2812,7 +2812,7 @@ Biconnectivity
Parent[W] = V;
FindArt(W);
if(Low[W] >= Num[V])
- printf("%v is an articulation point\n", v);
+ printf("%v is an articulation point\n", v);
Low[V] = Min(Low[V], Low[W]); /*Rule 3*/
}
else
@@ -2832,7 +2832,7 @@ \(T=O(|E|+|V|)\)
-
+
7 Sorting
7.1 Preliminaries
C void X_Sort ( ElementType A [], int N )
@@ -2843,7 +2843,7 @@ 7.1 Preliminaries
‘>’ and ‘<’ operators exist and are the only operations allowed on the input data.
Consider internal sorting only. The entire sort can be done in main memory.
-
+
7.2 Insertion Sort
C 1
2
@@ -2887,7 +2887,7 @@ 7.2 Insertion Sort
$$
-
+
7.3 A Lower Bound for Simple Sorting Algorithms
[Definition] An inversion in an array of numbers is any ordered pair\((i,j)\) having the property that \(i<j\) but \(A[i]>A[j]\)
@@ -2900,7 +2900,7 @@ [Theorem] The average number of inversions in an array of \(N\) distinct numbers is \(N(N-1)/4\)
[Theorem] Any algorithm that sorts by exchanging adjacent elements requires \(\Omega(N^2)\) time on average
-
+
diff --git "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK12/index.html" "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK12/index.html"
index 9651d505..456ff0c2 100644
--- "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK12/index.html"
+++ "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK12/index.html"
@@ -2612,9 +2612,9 @@
-WEEK 12
+WEEK 12
7.4 Shellsort
-
+
Define an increment sequence \(h_1 < h_2 < \cdots < h_t ( h_1 = 1 )\)
@@ -2684,7 +2684,7 @@ Conclusion
Shellsort is a very simple algorithm, yet with an extremely complex analysis.
It is good for sorting up to moderately large input (tens of thousands).
-
+
7.5 Heapsort
Algorithm1
C 1
@@ -2738,7 +2738,7 @@ Algorithm2
Note : Although Heapsort gives the best average time , in practice it is slower than a version of Shellsort that uses Sedgewick’s increment sequence.
-
+
7.6 Mergesort
C 1
2
@@ -2783,7 +2783,7 @@ 7.6 Mergesort
MSort ( A , TmpArray , 0 , N -1 );
free ( TmpArray );
}
- else FatalError ( "No space for tmp array!!!" );
+ else FatalError ( "No space for tmp array!!!" );
}
diff --git "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK13/index.html" "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK13/index.html"
index 22dcff20..434672a5 100644
--- "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK13/index.html"
+++ "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK13/index.html"
@@ -2681,7 +2681,7 @@
-WEEK 13
+WEEK 13
7.7 Quicksort
the fastest known sorting algorithm in practice
@@ -2993,16 +2993,16 @@ Quickselect
InsertionSort ( A + Left , Right - Left + 1 );
}
-
+
正确答案是D
-
+
7.8 Sorting Large Structures
Swapping large structures can be very much expensive.
Add a pointer field to the structure and swap pointers instead – indirect sorting . Physically rearrange the structures at last if it is really necessary.
Table Sort
-
+
7.9 A General Lower Bound for Sorting
[Theorem] Any algorithm that sorts by comparisons only must have a worst case computing time of \(\Omega(N\log N)\) .
@@ -3012,9 +3012,9 @@ \(N!\geq (N/2)^{N/2}\) and \(\log_2N!\geq(N/2)\log_2(N/2) = \Theta(N\log_2N )\)
Therefore \(T(N)=k\geq c\cdot N\log_2 N\)
-
+
7.10 Bucket Sort
-
+
Text Only 1
2
3
@@ -3038,23 +3038,23 @@ 7.10 Bucket Sort
\[
T(N,M)=O(M+N)
\]
-
+
7.11 Radix Sort
-
-
+
+
\(T=O(P(N+B))\) where \(P\) is the number of passes, \(N\) is the number of elements to sort, and \(B\) is the number of buckets.
MSD(Most Significant Digit) Sort and LSD(Least Significant Digit) Sort
-
-
-
-
+
+
+
+
稳定的排序算法:冒泡排序、插入排序、归并排序、基数排序
不稳定的排序算法:选择排序、快速排序、希尔排序、堆排序
-
+
diff --git "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK14/index.html" "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK14/index.html"
index 1ca65f56..45bba1e0 100644
--- "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK14/index.html"
+++ "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK14/index.html"
@@ -2627,10 +2627,10 @@
-WEEK 14
+WEEK 14
8 Hashing
8.1 General Idea
-
+
Symbol Table ADT
Objects : A set of name-attribute pairs, where the names are unique
@@ -2642,18 +2642,18 @@ Symbol Table ADT
SymTab Delete(symtab, name)
Hash Tables
-
+
A collision occurs when we hash two nonidentical identifiers into the same bucket.
An overflow occurs when we hash a new identifier into a full bucket.
-
+
8.2 Hash Function
\(f(x)\) must be easy to compute and minimize the number of collisions .
\(f(x)\) should be unbiased. For any \(x\) and any \(i\) , we have that \(Probability(f(x)=i)=\frac{1}{b}\) . Such kind of a hash function is called a uniform hash function .
-
+
8.3 Separate Chaining
keep a list of all keys that hash to the same value
@@ -2719,19 +2719,19 @@ Create an empty table
int i ;
if ( TableSize < MinTableSize )
{
- Error ( "Table size too small" );
+ Error ( "Table size too small" );
return NULL ;
}
H = malloc ( sizeof ( struct HashTbl ) ); /*Allocate table*/
- if ( H == NULL ) FatalError ( "Out of space!!!" );
+ if ( H == NULL ) FatalError ( "Out of space!!!" );
H -> TableSize = NextPrime ( TableSize ); /*Better be prime*/
H -> TheLists = malloc ( sizeof ( List ) * H -> TableSize ); /*Array of lists*/
- if ( H -> TheLists == NULL ) FatalError ( "Out of space!!!" );
+ if ( H -> TheLists == NULL ) FatalError ( "Out of space!!!" );
H -> TheList = malloc ( H -> TableSize * sizeof ( struct ListNode ));
for ( i = 0 ; i < H -> TableSize ; i ++ )
{ /*Allocate list headers*/
//H->TheLists[ i ] = malloc( sizeof( struct ListNode ) ); /* Slow! */
- if ( H -> TheLists [ i ] == NULL ) FatalError ( "Out of space!!!" );
+ if ( H -> TheLists [ i ] == NULL ) FatalError ( "Out of space!!!" );
else H -> TheLists [ i ] -> Next = NULL ;
}
return H ;
@@ -2784,7 +2784,7 @@ Insert a key into a hash table
if ( Pos == NULL )
{ /*Key is not found, then insert*/
NewCell = malloc ( sizeof ( struct ListNode ) );
- if ( NewCell == NULL ) FatalError ( "Out of space!!!" );
+ if ( NewCell == NULL ) FatalError ( "Out of space!!!" );
else
{
L = H -> TheLists [ Hash ( Key , H -> TableSize ) ]; /*Compute again is bad*/
@@ -2798,7 +2798,7 @@ Insert a key into a hash table
Note : Make the TableSize about as large as the number of keys expected (i.e. to make the loading density factor \(\lambda\approx\) 1).
-
+
8.4 Open Addressing
find another empty cell to solve collision(avoiding pointers)
@@ -2838,7 +2838,7 @@ Linear Probing
逐个探测每个单元(必要时可以绕回)以查找出一个空单元
使用线性探测的预期探测次数对于插入和不成功的查找来说大约是\(\frac{1}{2}(1+\frac{1}{(1-\lambda)^2})\) ,对于成功的查找来说是\(\frac{1}{2}(1+\frac{1}{1-\lambda})\)
Cause primary clustering : any key that hashes into the cluster will add to the cluster after several attempts to resolve the collision.
-
+
diff --git "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK15/index.html" "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK15/index.html"
index c4dd0498..30d70499 100644
--- "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK15/index.html"
+++ "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/DS WEEK15/index.html"
@@ -2546,13 +2546,13 @@
-WEEK 15
+WEEK 15
Quadratic Probing
\(F(i)\) is a quadratic function of \(i\) , such as \(F(i)=i^2\) .
[Theorem] If quadratic probing is used, and the table size is prime , then a new element can always be inserted if the table is at least half empty .
-
+
Note : If the table size is a prime of the form \(4k + 3\) , then the quadratic probing \(f(i) = \pm i^2\) can probe the entire table.
@@ -2585,19 +2585,19 @@
int i ;
if ( TableSize < MinTableSize )
{
- Error ( "Table size too small" );
+ Error ( "Table size too small" );
return NULL ;
}
/*Allocate table*/
H = malloc ( sizeof ( struct HashTbl ));
if ( H == NULL )
- Fatal Error ( "Out of space!!!" );
+ Fatal Error ( "Out of space!!!" );
H -> TableSize = NextPrime ( TableSize );
/*Allocate array of Cells*/
H -> TheCells = malloc ( sizeof ( Cell ) * H -> TableSize );
if ( H -> TheCells == NULL )
- FatalError ( "Out of space!!!" );
+ FatalError ( "Out of space!!!" );
for ( i = 0 ; i < H -> TableSize ; i ++ )
H -> TheCells [ i ]. Info = Empty ;
@@ -2675,7 +2675,7 @@ Double Hashing
Quadratic probing does not require the use of a second hash function and is thus likely to be simpler and faster in practice.
-
+
8.5 Rehashing
Build another table that is about twice as big.
@@ -2723,7 +2723,7 @@ 8.5 Rehashing
return H ;
}
-
+
diff --git "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/Foundation-of-Data-Structure/index.html" "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/Foundation-of-Data-Structure/index.html"
index d86116c5..07e74f38 100644
--- "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/Foundation-of-Data-Structure/index.html"
+++ "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/Foundation-of-Data-Structure/index.html"
@@ -4553,11 +4553,11 @@
-Foundation of Data Structure
+Foundation of Data Structure
by OE.Heart
-
+
1 Algorithm Analysis
[Definition] An algorithm is a finite set of instructions that, if followed, accomplishes a particular task. In addition, all algorithms must satisfy the following criteria.
@@ -4592,7 +4592,7 @@ Interchange list[i] and list[min];
}
-
+
1.1 What to Analyze
@@ -4689,7 +4689,7 @@ [Example] Recu
T_{rsum}(n)=2n+2
\]
But it takes more time to compute each step.
-
+
1.2 Asymptotic Notation(\(O,\Omega,\Theta,o\) )
predict the growth ; compare the time complexities of two programs ; asymptotic(渐进的) behavior
@@ -4724,8 +4724,8 @@ [Definition]
-
+
+
[Example] Matrix addition
C 1
2
@@ -4769,7 +4769,7 @@ General Rules
The running time is never more than the running time of the test plus the larger of the running time of S1 and S2.
-
+
@@ -4798,7 +4798,7 @@
General Rules
时间复杂度:\(O(2^N)\) \(T(N)\) grows exponentially
空间复杂度:\(O(N)\)
-
+
1.3 Compare the Algorithms
[Example] 最大子序列和
Algorithm 1
@@ -4991,7 +4991,7 @@
[Example] 最大子序列和
A[ ] is scanned once only. 扫描一次,无需存储(处理streaming data)
在任意时刻,算法都能对它已经读入的数据给出子序列问题的正确答案(其他算法不具有这个特性)
-
+
1.4 Logrithms in the Running Time
如果一个算法用常数时间将问题的大小削减为其一部分(通常是1/2),那么该算法就是\(O(logN)\) 的
@@ -5072,7 +5072,7 @@ [Example] Efficient exponentiation else return Pow ( X * X , N / 2 ) * X ; /*return Pow(X, N-1)*X is the same*/
}
-
+
1.5 Checking Your Analysis
Method 1
When \(T(N)=O(N)\) , check if \(T(2N)/T(N)\approx2\)
@@ -5080,12 +5080,12 @@ Method 1
When \(T(N)=O(N^3)\) , check if \(T(2N)/T(N)\approx8\)
Method 2
When \(T(N)=O(f(N))\) , check if $\lim\limits_{N\rightarrow\infty}\frac{T(N)}{f(N)}\approx C $
-
+
2 LIst, Stacks and Queues
2.1 Abstract Data Type(ADT) 抽象数据类型
[Definition] Data Type = {Objects} and {Operations}
[Definition] An Abstract Data Type(ADT) is a data type that is organized in such a way that the specification on the objects and specification of the operations on the objects are separated from the representation of the objects and the implementation on the operations.
-
+
2.2 The List ADT
Objects : N items
@@ -5114,7 +5114,7 @@ Simple Array implementation of Lis
Insertion and Deletion not only take \(O(N)\) times, but also involve a lot of data movements which takes time.
-
+
Query 查询
Linked Lists
@@ -5249,7 +5249,7 @@ Linked Lists
Position TmpCell ;
TmpCell = malloc ( sizeof ( struct Node ));
- if ( TmpCell == NULL ) FatalError ( "Out of space!" )
+ if ( TmpCell == NULL ) FatalError ( "Out of space!" )
TmpCell -> Element = X ;
TmpeCell -> Next = P -> Next ;
@@ -5286,7 +5286,7 @@ Doubly Linked Circular Lists
Finding take \(O(\frac N 2)\) times.
-
+
The correct answer is D.
Two Applications
@@ -5381,7 +5381,7 @@ Two Applications
PolyProd -> HighPower = Poly1 -> HighPower + Poly2 -> HighPower ;
if ( PolyProd -> HighPower > MaxDegree )
- Error ( "Exceeded array size" );
+ Error ( "Exceeded array size" );
else
for ( i = O ; i <= Poly1 -> HighPower ; i ++ )
for ( j = O ; j <= Poly2 -> HighPower ; j ++ )
@@ -5414,8 +5414,8 @@ Two Applications
Cursor Implementation of Linked Lists(no pointer)
-
-
+
+
2.3 The Stack ADT
Last-In-First-Out (LIFO)
@@ -5432,7 +5432,7 @@ 2.3 The Stack ADT
Push on a full stack is an implementation error but not an ADT error.
-
+
The calls to malloc and free are expensive. Simply keep another stack as a recycle bin.
@@ -5466,7 +5466,7 @@
@@ -5535,7 +5535,7 @@
void Push ( ElementType X , Stack S )
{
if ( IsFull ( S ))
- Error ( "Full stack" );
+ Error ( "Full stack" );
else
S -> Array [ ++ S -> TopOfStack ] = X ;
}
@@ -5653,7 +5653,7 @@ Array Implementation of Stacks
{
if ( ! IsEmpty ( S ))
return S -> Array [ S -> TopOfStack ];
- Error ( "Empty stack" ) ;
+ Error ( "Empty stack" ) ;
return O ; /* Return value used to avoid warning*/
}
@@ -5666,7 +5666,7 @@
Array Implementation of Stacks
7 void Pop ( Stack S )
{
if ( IsEmpty ( S ))
- Error ( "Empty stack" ) ;
+ Error ( "Empty stack" ) ;
else
S -> TopOfStack -- ;
}
@@ -5681,7 +5681,7 @@ Array Implementation of Stacks
{
if ( ! Is Empty ( S ))
return S -> Array [ S -> TopOfStack -- ];
- Error ( "Empty stack" );
+ Error ( "Empty stack" );
return O ; /* Return value used to avoid warnin */
}
@@ -5742,11 +5742,11 @@
Application
Function Calls (System Stack)
-
+
Note : Recursion can always be completely removed . Non recursive programs are generally faster than equivalent recursive programs. However, recursive programs are in general much simpler and easier to understand .
-
+
2.4 The Queue ADT
First-In-First-Out (FIFO)
@@ -5776,14 +5776,14 @@ Array Implementation of Queues
};
Circular Queue :
-
+
The maximum capacity of this queue is 5.
Note : Adding a Size field can avoid wasting one empty space to distinguish “full” from “empty”.
-
+
3 Trees
3.1 Preliminaries
[Definition] A tree is a collection of nodes. The collection can be empty; otherwise, a tree consists of (1) a distinguished node r, called the root; (2) and zero or more nonempty (sub)trees, each of whose roots are connected by a directed edge from r.
@@ -5817,14 +5817,14 @@
List Representation
The size of each node depends on the number of branches.
-
+
The correct answer is T.
FirstChild-NextSibling Representation
-
+
The representation is not unique since the children in a tree can be of any order.
-
+
3.2 Binary Trees
[Definition] A binary tree is a tree in which no node can have more than two children.
Tree Traversals (visit each node exactly once)
@@ -5943,7 +5943,7 @@
Tree Traversals (visit eac
}
}
-
+
Threaded Binary Trees
@@ -5984,7 +5984,7 @@ Threaded Binary Trees
线索化的实质就是将二叉链表中的空指针改为指向前驱或后继的线索。由于前驱和后继信息只有在遍历该二叉树时才能得到,所以,线索化的过程就是在遍历的过程中修改空指针的过程。
-
+
In a tree, the order of children does not matter. But in a binary tree, left child and right child are different.
@@ -5996,7 +5996,7 @@ Properties of Binary Trees
For any nonempty binary tree, \(n_0 = n_2 + 1\) where \(n_0\) is the number of leaf nodes and \(n_2\) is the number of nodes of degree 2.
-
+
3.3 Binary Search Trees
[Definition] A binary search tree is a binary tree. It may be empty. If it is not empty, it satisfies the following properties:
@@ -6141,7 +6141,7 @@ Implementations
{
T = malloc( sizeof( struct TreeNode ) );
if ( T == NULL )
- FatalError( "Out of space!!!" );
+ FatalError( "Out of space!!!" );
else
{
T->Element = X;
@@ -6154,7 +6154,7 @@ Implementations
else
if ( X > T->Element )
T->Right = Insert( X, T->Right );
- /* Else X is in the tree already; we'll do nothing */
+ /* Else X is in the tree already; we'll do nothing */
return T; /* Do not forget this line!! */
}
@@ -6200,7 +6200,7 @@
Implementations
25 SearchTree Delete( ElementType X, SearchTree T )
{
Position TmpCell;
- if ( T == NULL ) Error( "Element not found" );
+ if ( T == NULL ) Error( "Element not found" );
else if ( X < T->Element ) /* Go left */
T->Left = Delete( X, T->Left );
else if ( X > T->Element ) /* Go right */
@@ -6238,9 +6238,9 @@ Implementations
将\(n\) 个元素存入二叉搜索树,树的高度将由插入序列决定
-
+
The correct answer is A.
-
+
4 Priority Queues (Heaps)
4.1 ADT Model
@@ -6251,7 +6251,7 @@ 4.1 ADT Model
ElementType DeleteMin( PriorityQueue H );
ElementType FindMin( PriorityQueue H );
-
+
4.2 Implementations
Array
@@ -6299,7 +6299,7 @@ Binary Search Tree
Keep a balanced tree
But there are many operations related to AVL tree that we don't really need for a priority queue.
-
+
4.3 Binary Heap
Structure Property
[Definition] A binary tree with \(n\) nodes and height \(h\) is complete if its nodes correspond to the nodes numbered from \(1\) to \(n\) in the perfect binary tree of height \(h\) .
@@ -6314,7 +6314,7 @@ Structure Property
Array Representation : BT[n + 1] ( BT[0] is not used)
-
+
[Lemma]
\(index\,of\,parent(i)=\left\{
@@ -6353,14 +6353,14 @@ Structure Property
{
PriorityQueue H ;
if ( MaxElements < MinPQSize )
- return Error ( "Priority queue size is too small" );
+ return Error ( "Priority queue size is too small" );
H = malloc ( sizeof ( struct HeapStruct ));
if ( H == NULL )
- return FatalError ( "Out of space!!!" );
+ return FatalError ( "Out of space!!!" );
/* Allocate the array plus one extra for sentinel */
H -> Elements = malloc (( MaxElements + 1 ) * sizeof ( ElementType ));
if ( H -> Elements == NULL )
- return FatalError ( "Out of space!!!" );
+ return FatalError ( "Out of space!!!" );
H -> Capacity = MaxElements ;
H -> Size = 0 ;
H -> Elements [ 0 ] = MinData ; /* set the sentinel */
@@ -6394,7 +6394,7 @@ Basic Heap Operations
int i ;
if ( IsFull ( H ))
{
- Error ( "Priority queue is full" );
+ Error ( "Priority queue is full" );
return ;
}
for ( i = ++ H -> Size ; H -> Elements [ i / 2 ] > X ; i /= 2 )
@@ -6437,7 +6437,7 @@ Basic Heap Operations
ElementType MinElement , LastElement ;
if ( IsEmpty ( H ) )
{
- Error ( "Priority queue is empty" );
+ Error ( "Priority queue is empty" );
return H -> Elements [ 0 ];
}
MinElement = H -> Elements [ 1 ]; /*Save the min element*/
@@ -6486,8 +6486,8 @@ Other Heap Operations
T(N)=O(N)
$$
[Theorem] For the perfect binary tree of height \(h\) containing \(2^{h+1}-1\) nodes, the sum of the heights of the nodes is \(2^{h+1}-1-(h+1)\) .
-
-
+
+
4.4 Applications of Priority Queues
Heap Sort
查找一个序列中第k小的元素
@@ -6540,7 +6540,7 @@ 查找一个序列中第k小的元素
return H [ 1 ];
}
-
+
4.5 \(d\) -Heaps — All nodes have \(d\) children
Note :
@@ -6550,16 +6550,16 @@ 4.5 \(d\)
When the priority queue is too large to fit entirely in main memory, a d-heap will become interesting.
-
-
+
+
正确答案是4,注意“in the process”
-
+
5 The Disjoint Set
5.1 Equivalence Relations
[Definition] A relation, ~, over a set, S , is said to be an equivalence relation over S if it is symmetric, reflexive, and transitive over S .
[Definition] Two members x and y of a set S are said to be in the same equivalence class if x ~ y .
-
+
5.2 The Dynamic Equivalence Problem
Given an equivalence relation ~, decide for any a and b if a ~ b
@@ -6611,7 +6611,7 @@ 5.2 The Dynamic Equivalence Problem<
Find( \(i\) ) = Find the set \(S_k\) which contains the element \(i\)
-
+
5.3 Basic Data Structure
Union( \(i, j\) )
@@ -6622,7 +6622,7 @@ Union( \(i, j\) )
Implementation 1 :
-
+
Implementation 2 :
@@ -6650,7 +6650,7 @@ Find( \(i\) )
-
+
@@ -6668,7 +6668,7 @@ Analysis
Union and find are always paired. Thus we consider the performance of a sequence of union-find operations .
-
+
Text Only 1
2
3
@@ -6690,7 +6690,7 @@ Analysis
Worst case : \(T(N)=\Theta(N^2)\)
-
+
5.4 Smart Union Algorithms
Union-by-Size
@@ -6765,7 +6765,7 @@ Union-by-Height
}
}
-
+
5.5 Path Compression
从X到Root的路径上的每一个结点都使它的父结点变成Root
@@ -6809,7 +6809,7 @@ 5.5 Path Compression
Note : Not compatible with union-by-height since it changes the heights. Just take “height” as an estimated rank .
-
+
5.6 Worst Case for Union-by-Rank and Path Compression
[Lemma] Let \(T(M,N)\) be the maximum time required to process an intermixed sequence of \(M\geq N\) finds and \(N-1\) unions, then \(k_1M\alpha(M,N)\leq T(M,N)\leq k_2M\alpha(M,N)\) for some positive constants \(k_1\) and \(k_2\) .
@@ -6830,7 +6830,7 @@ \(\alpha(M,N)=min\{i\geq1|A(i,\lfloor M/N\rfloor)>\log N\}\leq O(\log^*N)\leq4\)
\(\log^*N\) (inverse Ackermann function) = number of times the logarithm is applied to \(N\) until the result \(\leq1\) .
-
+
5.7 Conclusion
一共有五种算法,注意看清题设
-
+
6 Graph Algorithms
6.1 Definitions
@@ -6861,7 +6861,7 @@ Undirected graph
\(( v_i , v_j ) = ( v_j , v_i )\) = the same edge.
Directed graph(diagraph)
-
+
Restrictions
Self loop is illegal.
@@ -6871,10 +6871,10 @@ Complete graph
A graph that has the maximum number of edges.
-
+
Adjacent
-
-
+
+
Subgraph
\[
G'\subset G=V(G')\subseteq V(G) \&\& E(G')\subseteq E(G)
@@ -6936,14 +6936,14 @@
Degree
$$
-
+
6.2 Representation of Graphs
Adjacency Matrix
-
+
Note : If G is undirected, then adj_mat[][] is symmetric. Thus we can save space by storing only half of the matrix.
-
+
-
+
Adjacency Multilists
-
+
Sometimes we need to mark the edge after examine it, and then find the next edge.
@@ -6976,7 +6976,7 @@
Weighted Edges
adj_mat [ i ] [ j ] = weight
adjacency lists / multilists : add a weight field to the node
-
+
6.3 Topological Sort
AOV Network
@@ -7080,7 +7080,7 @@ \[
T=O(|V|+|E|)
\]
-
+
6.4 Shortest Path Algorithms
Given a digraph \(G = ( V, E )\) , and a cost function \(c( e )\) for \(e \in E( G )\) .
The length of a path \(P\) from source to destination is \(\sum_{e_i\subset P} c(e_i)\) (also called weighted path length ).
@@ -7138,7 +7138,7 @@ Unweighted Shortest Path
}
The worst case :
-
+
$$
T(N)=O(|V|^2)
$$
@@ -7261,9 +7261,9 @@
Dijkstra’s Algorithm
if ( T [ V ]. Path != NotAVertex )
{
PrintPath ( T [ V ]. Path , T );
- printf ( " to" ) ;
+ printf ( " to" ) ;
}
- printf ( "%v" , V ) ; /* %v is pseudocode * /
+ printf ( "%v" , V ) ; /* %v is pseudocode * /
C 1
2
@@ -7391,9 +7391,9 @@ Acyclic Graphs
\(T=O(|E|+|V|)\) and no priority queue is needed.
AOE(Activity on Edge) Networks
-
-
-
+
+
+
All-Pairs Shortest Path Problem
For all pairs of \(v_i\) and \(v_j\) ( \(i\neq j\) ), find the shortest path between.
@@ -7408,9 +7408,9 @@ Method 2
动态规划
\(O(|V|^3)\) algorithm given in Chapter 10, works faster on dense graphs.
-
+
6.5 Network Flow Problems
-
+
Determine the maximum amount of flow that can pass from \(s\) to \(t\) .
@@ -7482,7 +7482,7 @@
Analysis
The min-cost flow problem is to find, among all maximum flows, the one flow of minimum cost provided that each edge has a cost per unit of flow.
-
+
6.6 Minimum Spanning Tree
[Definition] A spanning tree of a graph \(G\) is a tree which consists of \(V(G)\) and a subset of \(E(G)\)
@@ -7606,8 +7606,8 @@ Greedy Method
$$
T=O(|E|\log|E|)
$$
-
-
+
+
6.7 Applications of Depth-First Search
@@ -7640,7 +7640,7 @@ Undirected Graphs
if ( ! visited [ V ] )
{
DFS ( V );
- printf ( " \n " );
+ printf ( " \n " );
}
}
@@ -7650,8 +7650,8 @@
Biconnectivity
\(G\) is a biconnected graph if \(G\) is connected and has no articulation points.
A biconnected component is a maximal biconnected subgraph.
-
-
+
+
Note : No edges can be shared by two or more biconnected components. Hence \(E(G)\) is partitioned by the biconnected components of \(G\) .
@@ -7660,8 +7660,8 @@
Biconnectivity
Use depth first search to obtain a spanning tree of \(G\)
-
-
+
+
Depth first number(\(Num\) ) 先序编号
Back edges(背向边) = \((u,v)\notin\) tree and \(u\) is an ancestor of \(v\) .
@@ -7740,7 +7740,7 @@ Biconnectivity
{
Assignlow(W);
if(Low[W] >= Num[V])
- printf("%v is an articulation point\n", v);
+ printf("%v is an articulation point\n", v);
Low[V] = Min(Low[V], Low[W]); /*Rule 3*/
}
else
@@ -7780,7 +7780,7 @@ Biconnectivity
Parent[W] = V;
FindArt(W);
if(Low[W] >= Num[V])
- printf("%v is an articulation point\n", v);
+ printf("%v is an articulation point\n", v);
Low[V] = Min(Low[V], Low[W]); /*Rule 3*/
}
else
@@ -7800,7 +7800,7 @@ \(T=O(|E|+|V|)\)
-
+
7 Sorting
7.1 Preliminaries
C void X_Sort ( ElementType A [], int N )
@@ -7811,7 +7811,7 @@ 7.1 Preliminaries
‘>’ and ‘<’ operators exist and are the only operations allowed on the input data.
Consider internal sorting only. The entire sort can be done in main memory.
-
+
7.2 Insertion Sort
C 1
2
@@ -7855,7 +7855,7 @@ 7.2 Insertion Sort
$$
-
+
7.3 A Lower Bound for Simple Sorting Algorithms
[Definition] An inversion in an array of numbers is any ordered pair\((i,j)\) having the property that \(i<j\) but \(A[i]>A[j]\)
@@ -7868,9 +7868,9 @@ [Theorem] The average number of inversions in an array of \(N\) distinct numbers is \(N(N-1)/4\)
[Theorem] Any algorithm that sorts by exchanging adjacent elements requires \(\Omega(N^2)\) time on average
-
+
7.4 Shellsort
-
+
Define an increment sequence \(h_1 < h_2 < \cdots < h_t ( h_1 = 1 )\)
@@ -7940,7 +7940,7 @@ Conclusion
Shellsort is a very simple algorithm, yet with an extremely complex analysis.
It is good for sorting up to moderately large input (tens of thousands).
-
+
7.5 Heapsort
Algorithm1
C 1
@@ -7994,7 +7994,7 @@ Algorithm2
Note : Although Heapsort gives the best average time , in practice it is slower than a version of Shellsort that uses Sedgewick’s increment sequence.
-
+
7.6 Mergesort
C 1
2
@@ -8039,7 +8039,7 @@ 7.6 Mergesort
MSort ( A , TmpArray , 0 , N -1 );
free ( TmpArray );
}
- else FatalError ( "No space for tmp array!!!" );
+ else FatalError ( "No space for tmp array!!!" );
}
-
+
正确答案是D
-
+
7.8 Sorting Large Structures
Swapping large structures can be very much expensive.
Add a pointer field to the structure and swap pointers instead – indirect sorting . Physically rearrange the structures at last if it is really necessary.
Table Sort
-
+
7.9 A General Lower Bound for Sorting
[Theorem] Any algorithm that sorts by comparisons only must have a worst case computing time of \(\Omega(N\log N)\) .
@@ -8428,9 +8428,9 @@ \(N!\geq (N/2)^{N/2}\) and \(\log_2N!\geq(N/2)\log_2(N/2) = \Theta(N\log_2N )\)
Therefore \(T(N)=k\geq c\cdot N\log_2 N\)
-
+
7.10 Bucket Sort
-
+
Text Only 1
2
3
@@ -8454,26 +8454,26 @@ 7.10 Bucket Sort
\[
T(N,M)=O(M+N)
\]
-
+
7.11 Radix Sort
-
-
+
+
\(T=O(P(N+B))\) where \(P\) is the number of passes, \(N\) is the number of elements to sort, and \(B\) is the number of buckets.
MSD(Most Significant Digit) Sort and LSD(Least Significant Digit) Sort
-
-
-
-
+
+
+
+
稳定的排序算法:冒泡排序、插入排序、归并排序、基数排序
不稳定的排序算法:选择排序、快速排序、希尔排序、堆排序
-
+
8 Hashing
8.1 General Idea
-
+
Symbol Table ADT
Objects : A set of name-attribute pairs, where the names are unique
@@ -8485,18 +8485,18 @@ Symbol Table ADT
SymTab Delete(symtab, name)
Hash Tables
-
+
A collision occurs when we hash two nonidentical identifiers into the same bucket.
An overflow occurs when we hash a new identifier into a full bucket.
-
+
8.2 Hash Function
\(f(x)\) must be easy to compute and minimize the number of collisions .
\(f(x)\) should be unbiased. For any \(x\) and any \(i\) , we have that \(Probability(f(x)=i)=\frac{1}{b}\) . Such kind of a hash function is called a uniform hash function .
-
+
8.3 Separate Chaining
keep a list of all keys that hash to the same value
@@ -8562,19 +8562,19 @@ Create an empty table
int i ;
if ( TableSize < MinTableSize )
{
- Error ( "Table size too small" );
+ Error ( "Table size too small" );
return NULL ;
}
H = malloc ( sizeof ( struct HashTbl ) ); /*Allocate table*/
- if ( H == NULL ) FatalError ( "Out of space!!!" );
+ if ( H == NULL ) FatalError ( "Out of space!!!" );
H -> TableSize = NextPrime ( TableSize ); /*Better be prime*/
H -> TheLists = malloc ( sizeof ( List ) * H -> TableSize ); /*Array of lists*/
- if ( H -> TheLists == NULL ) FatalError ( "Out of space!!!" );
+ if ( H -> TheLists == NULL ) FatalError ( "Out of space!!!" );
H -> TheList = malloc ( H -> TableSize * sizeof ( struct ListNode ));
for ( i = 0 ; i < H -> TableSize ; i ++ )
{ /*Allocate list headers*/
//H->TheLists[ i ] = malloc( sizeof( struct ListNode ) ); /* Slow! */
- if ( H -> TheLists [ i ] == NULL ) FatalError ( "Out of space!!!" );
+ if ( H -> TheLists [ i ] == NULL ) FatalError ( "Out of space!!!" );
else H -> TheLists [ i ] -> Next = NULL ;
}
return H ;
@@ -8627,7 +8627,7 @@ Insert a key into a hash table
if ( Pos == NULL )
{ /*Key is not found, then insert*/
NewCell = malloc ( sizeof ( struct ListNode ) );
- if ( NewCell == NULL ) FatalError ( "Out of space!!!" );
+ if ( NewCell == NULL ) FatalError ( "Out of space!!!" );
else
{
L = H -> TheLists [ Hash ( Key , H -> TableSize ) ]; /*Compute again is bad*/
@@ -8641,7 +8641,7 @@ Insert a key into a hash table
Note : Make the TableSize about as large as the number of keys expected (i.e. to make the loading density factor \(\lambda\approx\) 1).
-
+
8.4 Open Addressing
find another empty cell to solve collision(avoiding pointers)
@@ -8687,7 +8687,7 @@ Quadratic Probing
\(F(i)\) is a quadratic function of \(i\) , such as \(F(i)=i^2\) .
[Theorem] If quadratic probing is used, and the table size is prime , then a new element can always be inserted if the table is at least half empty .
-
+
Note : If the table size is a prime of the form \(4k + 3\) , then the quadratic probing \(f(i) = \pm i^2\) can probe the entire table.
@@ -8720,19 +8720,19 @@ int i ;
if ( TableSize < MinTableSize )
{
- Error ( "Table size too small" );
+ Error ( "Table size too small" );
return NULL ;
}
/*Allocate table*/
H = malloc ( sizeof ( struct HashTbl ));
if ( H == NULL )
- Fatal Error ( "Out of space!!!" );
+ Fatal Error ( "Out of space!!!" );
H -> TableSize = NextPrime ( TableSize );
/*Allocate array of Cells*/
H -> TheCells = malloc ( sizeof ( Cell ) * H -> TableSize );
if ( H -> TheCells == NULL )
- FatalError ( "Out of space!!!" );
+ FatalError ( "Out of space!!!" );
for ( i = 0 ; i < H -> TableSize ; i ++ )
H -> TheCells [ i ]. Info = Empty ;
@@ -8810,7 +8810,7 @@ Double Hashing
Quadratic probing does not require the use of a second hash function and is thus likely to be simpler and faster in practice.
-
+
8.5 Rehashing
Build another table that is about twice as big.
@@ -8858,7 +8858,7 @@ 8.5 Rehashing
return H ;
}
-
+
diff --git "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/index.html" "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/index.html"
index dac3ab92..0f395d31 100644
--- "a/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/index.html"
+++ "b/site/JY_HU/2 \346\225\260\346\215\256\347\273\223\346\236\204/webnotes/index.html"
@@ -2474,14 +2474,14 @@
-Notes for Data Structure
-
-
-
-
+Notes for Data Structure
+
+
+
+
This is my personal notes for The Foundation of Data Structure course in Zhejiang University.
Since it’s the first time I’ve learned data structure systematically, I wish I could detail the information which will make it easier for me to review in the future.
-
Also hope that my notes can help someone else a little bit.
+
Also hope that my notes can help someone else a little bit.
diff --git a/site/JY_HU/3 ZJU-AI-ML/Approach almost/index.html b/site/JY_HU/3 ZJU-AI-ML/Approach almost/index.html
index 2390457f..f8962e7e 100644
--- a/site/JY_HU/3 ZJU-AI-ML/Approach almost/index.html
+++ b/site/JY_HU/3 ZJU-AI-ML/Approach almost/index.html
@@ -2474,7 +2474,7 @@
-Approaching almost any machine learning problem
+Approaching almost any machine learning problem
Principal Component Analysis (PCA):
PCA 是一种用于降维和数据压缩的线性技术。它的目标是找到数据中最重要的方向,即方差最大的方向,然后将数据投影到这些方向上。这些方向被称为主成分。通过选择最重要的主成分,我们可以保留数据中的大部分信息,同时降低数据的维度。
@@ -2492,7 +2492,7 @@ Approaching almost any
构建 t 分布: 在低维空间中重复上述步骤,构建 t 分布,表示数据点在低维空间中的分布。
最小化 KL 散度: 通过最小化 KL 散度(Kullback-Leibler divergence),调整低维空间中的数据点位置,使其尽可能符合条件概率分布。
-
t-SNE 通常用于可视化高维数据,尤其在发现聚类结构方面表现出色。然而,需要注意的是,t-SNE 对于不同的初始化可能会导致不同的结果,因此在解释结果时需要谨慎。
+
t-SNE 通常用于可视化高维数据,尤其在发现聚类结构方面表现出色。然而,需要注意的是,t-SNE 对于不同的初始化可能会导致不同的结果,因此在解释结果时需要谨慎。
diff --git a/site/JY_HU/3 ZJU-AI-ML/ML-zju/index.html b/site/JY_HU/3 ZJU-AI-ML/ML-zju/index.html
index 919772f6..0a7571c0 100644
--- a/site/JY_HU/3 ZJU-AI-ML/ML-zju/index.html
+++ b/site/JY_HU/3 ZJU-AI-ML/ML-zju/index.html
@@ -2474,11 +2474,11 @@
-ML-for-zju
-
+ML-for-zju
+
generative model 生成式模型和非生成式模型
linear model/none linear model
-
+
生成模型(Generative Model)和判别模型(Discriminative Model)是机器学习中两种不同类型的模型,它们的主要区别在于它们对数据的建模方式和应用领域。
生成模型(Generative Model) :
@@ -2493,7 +2493,7 @@ ML-for-zju
判别模型通常在小规模数据上效果较好,因为它们只需要建模与任务相关的部分信息,而不需要学习整个数据分布。
总结来说,生成模型和判别模型的关键区别在于其建模目标。生成模型试图理解整个数据分布并生成新数据,而判别模型关注的是对数据的分类或标记。在实际应用中,选择生成模型还是判别模型通常取决于具体问题和任务的性质。有时,这两种类型的模型可以结合使用,以实现更复杂的机器学习任务。
-
+
linear feature+nonlinear model/ nonlinear feature+linear model是什么意思
ChatGPT
"线性特征 + 非线性模型" 和 "非线性特征 + 线性模型" 是机器学习中的两种不同方法,用于处理数据和建立预测模型。它们可以在特征工程和模型选择方面用于处理非线性关系。
@@ -2533,10 +2533,10 @@
ML-for-zju
-
+
mean-squared error
-
-
+
+
10-25
symbolism
logic theorist
@@ -2545,7 +2545,7 @@
symbolism
connectionism
transformers
recurrent neural networks
-
convolution neural netorks
+
convolution neural netorks
diff --git a/site/JY_HU/3 ZJU-AI-ML/feed forward and backward propagation/index.html b/site/JY_HU/3 ZJU-AI-ML/feed forward and backward propagation/index.html
index 940b048d..3684b133 100644
--- a/site/JY_HU/3 ZJU-AI-ML/feed forward and backward propagation/index.html
+++ b/site/JY_HU/3 ZJU-AI-ML/feed forward and backward propagation/index.html
@@ -2469,8 +2469,8 @@
反向传播
-feed forward and backward propagation
-反向传播中,计算的是最终的
+feed forward and backward propagation
+
反向传播中,计算的是最终的
diff --git "a/site/JY_HU/4 \345\233\276\345\203\217\344\277\241\346\201\257\345\244\204\347\220\206 DIP/DIP/index.html" "b/site/JY_HU/4 \345\233\276\345\203\217\344\277\241\346\201\257\345\244\204\347\220\206 DIP/DIP/index.html"
index fe211d29..05c41c21 100644
--- "a/site/JY_HU/4 \345\233\276\345\203\217\344\277\241\346\201\257\345\244\204\347\220\206 DIP/DIP/index.html"
+++ "b/site/JY_HU/4 \345\233\276\345\203\217\344\277\241\346\201\257\345\244\204\347\220\206 DIP/DIP/index.html"
@@ -2545,7 +2545,7 @@
-DIP
+
-
+
所谓oop就是有内置的函数
s.lower() 要非常注意python中的浅拷贝和深拷贝
-
+
Python #py不需要prototype,但是需要call main
@@ -2631,8 +2631,8 @@ CS61a PYTHON
2
3
4
for i in range ( 4 ):
- print ( "?" , end = " \n " ) -> print ( "?" , end = "" )
-= print ( "?" * 4 )
+ print ( "?" , end = " \n " ) -> print ( "?" , end = "" )
+= print ( "?" * 4 )
#没有分配内存,没有指针
global frame(全局帧)
@@ -2647,21 +2647,21 @@
$python3 -m doctest example.py
$python3 -m doctest -v example.py
打印输出所有的docstring测试结果,相当于自测情况
def嵌套定义
-
-
-
-
-
+
+
+
+
+
lambda x : f(x)==y 返回一个x
-
+
control statements
-
+
验证递归的正确性/如何写递归->分解问题,就好像n-1的答案已经写好了,只需要从n-1得到n
用数归!
1.base case
2.假设n-1的情况正确执行,正确返回,如何利用n-1的情况得出n
-
-
+
+
上面是循环,迭代
下面是递归!
迭代每次while循环内的赋值变成了递归调用时的参数
@@ -2688,14 +2688,14 @@
验证递归的正确性/如何写递归->分解问题,
return result
分清楚base case和else
-
-
-
+
+
+
怎么分解问题比较关键
counting partitions
-
-
-
+
+
+
python列表(list)和元组(tuple)详解_木子林_的博客-CSDN博客
一篇讲list和tuple区别的blog,非常细致,可以细看
Python的enumerate函数-CSDN博客
@@ -2748,7 +2748,7 @@
验证递归的正确性/如何写递归->分解问题,
self . holder = account_holder
def withdraw ( self , amount ):
if self . balance - amount < 0 :
- return 'Insufficient funds'
+ return 'Insufficient funds'
else
self . balance = self . balance - amount
return self . balance
@@ -2765,10 +2765,10 @@ 验证递归的正确性/如何写递归->分解问题,
return Account . withdraw ( self , amount + self . withdraw_fee ) #这里体现了继承的另一种用法
#递归查看,withdraw在子类中有同名的重构实现,所以按照子类的来,但是因为方便,可以调用父类的withdraw函数,所以使用Account.withdraw来访问父类中的withdraw,但需要提供self参数,因为并未初始化account属性下的withdraw,所以需要提供self参数
#即使已被overridden的属性也可以通过直接访问类对象访问
-tom_account = Account ( "Tom" )
+tom_account = Account ( "Tom" )
>>> tom_account . interest
-a = Account ( "John" )
-b = CheckingAccount ( 'Jack' )
+a = Account ( "John" )
+b = CheckingAccount ( 'Jack' )
>>> a . deposit ( 100 )
100
>>> b . deposit ( 100 )
@@ -2862,7 +2862,7 @@ 验证递归的正确性/如何写递归->分解问题,
print ( b . z . z )
print ( b . z . z . z )
print ( b . z . z . z . z )
-
+
diff --git a/site/Others/content block example/index.html b/site/Others/content block example/index.html
index ccad4813..78402d30 100644
--- a/site/Others/content block example/index.html
+++ b/site/Others/content block example/index.html
@@ -2461,9 +2461,9 @@
content
-
+
Nested Code Blocks
-
Unordered List Ordered List
+
Unordered List Ordered List
Markdown 1
@@ -2486,7 +2486,7 @@ content
Another List
-
Unordered List Ordered List
+
Unordered List Ordered List
Markdown 1
@@ -2508,7 +2508,7 @@ content
nested code block
-#include <iostream>
int main ( void ) {
- std :: cout << "Hello world!" << std :: endl ;
+ std :: cout << "Hello world!" << std :: endl ;
return 0 ;
}
@@ -2544,16 +2544,16 @@
content
展开查看nested
note
-
-
-
-
+
+
+
+
语法格式:
tab间隔,建议在vscode/typora原格式(raw)下编辑,可以选中tab
alt text形式是直接采用在md文件的同目录下插入,可以在nested tab中插入
-
-
+
+
diff --git "a/site/Others/git\344\275\277\347\224\250\346\225\231\347\250\213/index.html" "b/site/Others/git\344\275\277\347\224\250\346\225\231\347\250\213/index.html"
index a3de5250..6c2408d5 100644
--- "a/site/Others/git\344\275\277\347\224\250\346\225\231\347\250\213/index.html"
+++ "b/site/Others/git\344\275\277\347\224\250\346\225\231\347\250\213/index.html"
@@ -2507,16 +2507,16 @@
-
git使用教程
-
-
+
git使用教程
+
+
发现只要是在这个文件结构下的图片都会正常显示
因为实际上typora编辑器的设置中拷贝图片时会将assets会单独复制一份
-
+
然而,拷贝后进行缩放,就是改为了html格式,就不能够正常渲染?
-
-
-
发现mkdocs在渲染导出HTML时是会将除了md格式的所有东西都拷贝一份到自己的目录下面的
+
+
+
发现mkdocs在渲染导出HTML时是会将除了md格式的所有东西都拷贝一份到自己的目录下面的
diff --git "a/site/Others/linux \345\220\257\345\212\250/index.html" "b/site/Others/linux \345\220\257\345\212\250/index.html"
index b6c07005..55264197 100644
--- "a/site/Others/linux \345\220\257\345\212\250/index.html"
+++ "b/site/Others/linux \345\220\257\345\212\250/index.html"
@@ -2516,7 +2516,7 @@
-
linux
+
linux
云计算和虚拟化:
学习如何配置和管理云服务器,理解云计算概念和服务模型。
@@ -2601,7 +2601,7 @@ 11-16
/usr/bin/nginx
/usr/local/nginx
[root@iZ2ze72tpnr9ta1r8uvbujZ /]#
-Text Only 1
+Text Only 1
2
3
4
@@ -2652,7 +2652,7 @@ 11-16
nginx 269835 www 9u IPv4 679139 0t0 TCP *:http (LISTEN)
nginx 269836 www 9u IPv4 679139 0t0 TCP *:http (LISTEN)
[root@iZ2ze72tpnr9ta1r8uvbujZ /]#
-
+
grep
grep
是一个在文本中搜索模式的强大命令行工具。它的名字来源于全局正则表达式打印(Global Regular Expression Print)。
下面是grep
命令的基本用法和一些常见选项:
@@ -2681,35 +2681,35 @@ grep
Text Only bashCopy code
- grep "keyword" filename
+ grep "keyword" filename
递归搜索目录下所有文件中包含关键字的行:
Text Only bashCopy code
- grep -r "keyword" directory
+ grep -r "keyword" directory
忽略大小写:
Text Only bashCopy code
- grep -i "keyword" filename
+ grep -i "keyword" filename
显示匹配行的行号:
Text Only bashCopy code
- grep -n "keyword" filename
+ grep -n "keyword" filename
反向选择,显示不匹配的行:
Text Only bashCopy code
- grep -v "keyword" filename
+ grep -v "keyword" filename
这只是一些grep
命令的基本用法和选项,grep
有很多其他选项和功能,你可以通过man grep
查看grep
的手册页以获取更多详细信息。\
竟然没有apt-get??
@@ -2798,12 +2798,12 @@
grep
VuePress 和 Nuxt.js: 如果你熟悉 Vue.js,VuePress 适用于文档和博客。而 Nuxt.js 则是一个用于构建Vue.js应用程序的框架,也可以用于服务器渲染和静态站点生成。
选择哪个工具取决于你的具体需求和技术偏好。对于初学者,使用WordPress、Wix或Squarespace可能是更容易上手的选择。对于有一些编程经验的人来说,静态网站生成器如Jekyll、Hugo或VuePress可能是一个不错的选择。
-
+
2023_DD是guahao老师在github上的仓库的全部内容,其中并未包括node_modules,src/assets/javascripts文件的内容,请问
github.io建站过程
使用
-
-
+
+
diff --git a/site/Others/memories/index.html b/site/Others/memories/index.html
index 3f53701f..c9da0a4e 100644
--- a/site/Others/memories/index.html
+++ b/site/Others/memories/index.html
@@ -2468,12 +2468,12 @@
-
memories should be well kept
-
-
-
-
-
+
memories should be well kept
+
+
+
+
+
diff --git a/site/mkdocs-guide/index.html b/site/mkdocs-guide/index.html
index d6c6297d..db6411ad 100644
--- a/site/mkdocs-guide/index.html
+++ b/site/mkdocs-guide/index.html
@@ -2661,7 +2661,7 @@
-
欢迎来到JY-HF的代码空间
+
欢迎来到JY-HF的代码空间
以下简要介绍本站的主要内容以及搭建、维护网站的方法、更新日志
主要内容
一直很想搭建个人的学习网站,当内容存储在本地时虽然维护非常方便,但是有一个统一整合的页面会促使我去记笔记。维护的过程希望不要形式大于内容,而是能够从实质上促进学习。如果觉得重新回归纸质化学习效率更高,也完全ok~
@@ -2740,7 +2740,7 @@
Project layout
index.md # The documentation homepage.
... # Other markdown pages, images and other files.
-
+
参考Material for MkDocs (squidfunk.github.io) 给出的详细建站过程,大佬的UI望尘莫及呐
官方文档参考:For full documentation visit mkdocs.org .
使用aliyun存储桶
@@ -2779,8 +2779,8 @@
更新日志
11-20 20:15 pdf嵌入,对相对路径以及pathconverter的内容有基本理解
11-22 解决remote文不对板的问题,重定向了remote,参考官网教程正确配置了katex格式,渲染行内公式
使用pymdownx.highlight高亮语法
-
11-22 20:40 nested tab 格式嵌入 使用教程
-
+
11-22 20:40 nested tab 格式嵌入 使用教程
+
diff --git a/site/stylesheets/singlePageTemplate.css b/site/stylesheets/singlePageTemplate.css
index fe35c109..1a40b316 100644
--- a/site/stylesheets/singlePageTemplate.css
+++ b/site/stylesheets/singlePageTemplate.css
@@ -65,6 +65,7 @@
.hero_header {
font-size: 1.3rem;
/* Adjust width for smaller screens */
+ letter-spacing: 2px;
}
.tagline {