├── 2021 ├── additional-problem-sets │ ├── problems.pdf │ └── problems.tex ├── problem-set │ ├── hw-allinone.pdf │ ├── hw0-overview │ │ ├── README.md │ │ ├── figs │ │ │ └── nim-stone.png │ │ ├── hw-preamble.tex │ │ ├── hw0-overview.pdf │ │ ├── hw0-overview.tex │ │ ├── tufte-book.cls │ │ ├── tufte-common.def │ │ ├── tufte-handout.cls │ │ └── tufte-preamble.tex │ ├── hw1-prop-logic │ │ ├── README.md │ │ ├── hw-preamble.tex │ │ ├── hw1-prop-logic.pdf │ │ ├── hw1-prop-logic.tex │ │ ├── tufte-book.cls │ │ ├── tufte-common.def │ │ ├── tufte-handout.cls │ │ └── tufte-preamble.tex │ ├── hw10-trees │ │ ├── README.md │ │ ├── figs │ │ │ ├── Bourne.jpg │ │ │ ├── douban-star.png │ │ │ └── st-example.png │ │ ├── hw-preamble.tex │ │ ├── hw10-trees.pdf │ │ ├── hw10-trees.tex │ │ ├── tufte-book.cls │ │ ├── tufte-common.def │ │ ├── tufte-handout.cls │ │ └── tufte-preamble.tex │ ├── hw11-planarity-coloring │ │ ├── README.md │ │ ├── figs │ │ │ ├── Hall-Proof.png │ │ │ └── planarity.png │ │ ├── hw-preamble.tex │ │ ├── hw11-planarity-coloring-handout.pdf │ │ ├── hw11-planarity-coloring.pdf │ │ ├── hw11-planarity-coloring.tex │ │ ├── tufte-book.cls │ │ ├── tufte-common.def │ │ ├── tufte-handout.cls │ │ └── tufte-preamble.tex │ ├── hw12-matching-flow │ │ ├── README.md │ │ ├── hw-preamble.tex │ │ ├── hw12-matching-flow.pdf │ │ ├── hw12-matching-flow.tex │ │ ├── tufte-book.cls │ │ ├── tufte-common.def │ │ ├── tufte-handout.cls │ │ └── tufte-preamble.tex │ ├── hw13-group │ │ ├── README.md │ │ ├── figs │ │ │ ├── edge-disjoint.png │ │ │ └── network-flow.png │ │ ├── hw-preamble.tex │ │ ├── hw13-group.pdf │ │ ├── hw13-group.tex │ │ ├── tufte-book.cls │ │ ├── tufte-common.def │ │ ├── tufte-handout.cls │ │ └── tufte-preamble.tex │ ├── hw14-subgroup │ │ ├── README.md │ │ ├── hw-preamble.tex │ │ ├── hw14-subgroup.pdf │ │ ├── hw14-subgroup.tex │ │ ├── tufte-book.cls │ │ ├── tufte-common.def │ │ ├── tufte-handout.cls │ │ └── tufte-preamble.tex │ ├── hw2-predicate-logic │ │ ├── README.md │ │ ├── hw-preamble.tex │ │ ├── hw2-predicate-logic.pdf │ │ ├── hw2-predicate-logic.tex │ │ ├── tufte-book.cls │ │ ├── tufte-common.def │ │ ├── tufte-handout.cls │ │ └── tufte-preamble.tex │ ├── hw3-induction │ │ ├── README.md │ │ ├── hw-preamble.tex │ │ ├── hw3-induction.pdf │ │ ├── hw3-induction.tex │ │ ├── tufte-book.cls │ │ ├── tufte-common.def │ │ ├── tufte-handout.cls │ │ └── tufte-preamble.tex │ ├── hw4-set │ │ ├── README.md │ │ ├── hw-preamble.tex │ │ ├── hw4-set.pdf │ │ ├── hw4-set.tex │ │ ├── tufte-book.cls │ │ ├── tufte-common.def │ │ ├── tufte-handout.cls │ │ └── tufte-preamble.tex │ ├── hw5-relation │ │ ├── README.md │ │ ├── hw-preamble.tex │ │ ├── hw5-relation.pdf │ │ ├── hw5-relation.tex │ │ ├── tufte-book.cls │ │ ├── tufte-common.def │ │ ├── tufte-handout.cls │ │ └── tufte-preamble.tex │ ├── hw6-function │ │ ├── README.md │ │ ├── hw-preamble.tex │ │ ├── hw6-function.pdf │ │ ├── hw6-function.tex │ │ ├── tufte-book.cls │ │ ├── tufte-common.def │ │ ├── tufte-handout.cls │ │ └── tufte-preamble.tex │ ├── hw7-function-ordering │ │ ├── README.md │ │ ├── hw-preamble.tex │ │ ├── hw7-function-partial-order.pdf │ │ ├── hw7-function-partial-order.tex │ │ ├── tufte-book.cls │ │ ├── tufte-common.def │ │ ├── tufte-handout.cls │ │ └── tufte-preamble.tex │ ├── hw8-infinity │ │ ├── README.md │ │ ├── Schroder-Bernstein-theorem (wiki).pdf │ │ ├── hw-preamble.tex │ │ ├── hw8-infinity.pdf │ │ ├── hw8-infinity.tex │ │ ├── tufte-book.cls │ │ ├── tufte-common.def │ │ ├── tufte-handout.cls │ │ └── tufte-preamble.tex │ └── hw9-paths-cycles │ │ ├── README.md │ │ ├── figs │ │ ├── 5-room.png │ │ ├── Euler-graph.png │ │ └── chessboard-4-n.png │ │ ├── hw-preamble.tex │ │ ├── hw9-paths-cycles.pdf │ │ ├── hw9-paths-cycles.tex │ │ ├── tufte-book.cls │ │ ├── tufte-common.def │ │ ├── tufte-handout.cls │ │ └── tufte-preamble.tex ├── solution │ ├── hw-solution-allinone.pdf │ ├── hw0-overview-solution │ │ ├── README.md │ │ ├── figs │ │ │ ├── infection.jpg │ │ │ └── nim-stone.png │ │ ├── hw-preamble.tex │ │ ├── hw0-overview-solution.pdf │ │ ├── hw0-overview-solution.tex │ │ ├── tufte-book.cls │ │ ├── tufte-common.def │ │ ├── tufte-handout.cls │ │ └── tufte-preamble.tex │ ├── hw1-prop-logic-solution │ │ ├── README.md │ │ ├── hw-preamble.tex │ │ ├── hw1-prop-logic-solution.pdf │ │ ├── hw1-prop-logic-solution.tex │ │ ├── tables │ │ │ └── truth-table.tex │ │ ├── tufte-book.cls │ │ ├── tufte-common.def │ │ ├── tufte-handout.cls │ │ └── tufte-preamble.tex │ ├── hw10-trees-solution │ │ ├── README.md │ │ ├── figs │ │ │ ├── Bourne.jpg │ │ │ ├── douban-star.png │ │ │ └── st-example.png │ │ ├── hw-preamble.tex │ │ ├── hw10-trees-solution.pdf │ │ ├── hw10-trees-solution.tex │ │ ├── tufte-book.cls │ │ ├── tufte-common.def │ │ ├── tufte-handout.cls │ │ └── tufte-preamble.tex │ ├── hw11-planarity-coloring-solution │ │ ├── README.md │ │ ├── figs │ │ │ ├── Hall-Proof.png │ │ │ └── planarity.png │ │ ├── hw-preamble.tex │ │ ├── hw11-planarity-coloring-solution.pdf │ │ ├── hw11-planarity-coloring-solution.tex │ │ ├── tufte-book.cls │ │ ├── tufte-common.def │ │ ├── tufte-handout.cls │ │ └── tufte-preamble.tex │ ├── hw12-matching-flow-solution │ │ ├── README.md │ │ ├── hw-preamble.tex │ │ ├── hw12-matching-flow-solution.pdf │ │ ├── hw12-matching-flow-solution.tex │ │ ├── tufte-book.cls │ │ ├── tufte-common.def │ │ ├── tufte-handout.cls │ │ └── tufte-preamble.tex │ ├── hw13-group-solution │ │ ├── README.md │ │ ├── figs │ │ │ ├── edge-disjoint.png │ │ │ ├── graph2digraph.png │ │ │ ├── network-flow-value-7.png │ │ │ └── network-flow.png │ │ ├── hw-preamble.tex │ │ ├── hw13-group-solution.pdf │ │ ├── hw13-group-solution.tex │ │ ├── tufte-book.cls │ │ ├── tufte-common.def │ │ ├── tufte-handout.cls │ │ └── tufte-preamble.tex │ ├── hw14-subgroup-solution │ │ ├── README.md │ │ ├── hw-preamble.tex │ │ ├── hw14-subgroup-solution.pdf │ │ ├── hw14-subgroup-solution.tex │ │ ├── tufte-book.cls │ │ ├── tufte-common.def │ │ ├── tufte-handout.cls │ │ └── tufte-preamble.tex │ ├── hw2-predicate-logic-solution │ │ ├── README.md │ │ ├── figs │ │ │ └── logic-invincible.jpeg │ │ ├── hw-preamble.tex │ │ ├── hw2-predicate-logic-solution.pdf │ │ ├── hw2-predicate-logic-solution.tex │ │ ├── tufte-book.cls │ │ ├── tufte-common.def │ │ ├── tufte-handout.cls │ │ └── tufte-preamble.tex │ ├── hw3-induction-solution │ │ ├── README.md │ │ ├── figs │ │ │ ├── hard-yuanhua.jpg │ │ │ └── sorry.jpg │ │ ├── hw-preamble.tex │ │ ├── hw3-induction-solution.pdf │ │ ├── hw3-induction-solution.tex │ │ ├── tufte-book.cls │ │ ├── tufte-common.def │ │ ├── tufte-handout.cls │ │ └── tufte-preamble.tex │ ├── hw4-set-solution │ │ ├── README.md │ │ ├── hw-preamble.tex │ │ ├── hw4-set-solution.pdf │ │ ├── hw4-set-solution.tex │ │ ├── tufte-book.cls │ │ ├── tufte-common.def │ │ ├── tufte-handout.cls │ │ └── tufte-preamble.tex │ ├── hw5-relation-solution │ │ ├── README.md │ │ ├── hw-preamble.tex │ │ ├── hw5-relation-solution.pdf │ │ ├── hw5-relation-solution.tex │ │ ├── tufte-book.cls │ │ ├── tufte-common.def │ │ ├── tufte-handout.cls │ │ └── tufte-preamble.tex │ ├── hw6-function-solution │ │ ├── README.md │ │ ├── hw-preamble.tex │ │ ├── hw6-function-solution.pdf │ │ ├── hw6-function-solution.tex │ │ ├── tufte-book.cls │ │ ├── tufte-common.def │ │ ├── tufte-handout.cls │ │ └── tufte-preamble.tex │ ├── hw7-function-ordering-solution │ │ ├── README.md │ │ ├── hw-preamble.tex │ │ ├── hw7-function-ordering-solution.pdf │ │ ├── hw7-function-ordering-solution.tex │ │ ├── tufte-book.cls │ │ ├── tufte-common.def │ │ ├── tufte-handout.cls │ │ └── tufte-preamble.tex │ ├── hw8-infinity-solution │ │ ├── README.md │ │ ├── Schroder-Bernstein-theorem (wiki).pdf │ │ ├── hw-preamble.tex │ │ ├── hw8-infinity-solution.pdf │ │ ├── hw8-infinity-solution.tex │ │ ├── tufte-book.cls │ │ ├── tufte-common.def │ │ ├── tufte-handout.cls │ │ └── tufte-preamble.tex │ └── hw9-paths-cycles-solution │ │ ├── README.md │ │ ├── figs │ │ ├── 5-room.png │ │ ├── Euler-graph.png │ │ └── chessboard-4-n.png │ │ ├── hw-preamble.tex │ │ ├── hw9-paths-cycles-solution.pdf │ │ ├── hw9-paths-cycles-solution.tex │ │ ├── hw9-paths-cycles-solution.zip │ │ ├── tufte-book.cls │ │ ├── tufte-common.def │ │ ├── tufte-handout.cls │ │ └── tufte-preamble.tex └── zip │ ├── problems │ ├── hw0-overview.zip │ ├── hw1-prop-logic.zip │ ├── hw10-trees.zip │ ├── hw11-planarity-coloring.zip │ ├── hw12-matching-flow.zip │ ├── hw13-group.zip │ ├── hw14-subgroup.zip │ ├── hw2-predicate-logic.zip │ ├── hw3-induction.zip │ ├── hw4-set.zip │ ├── hw5-relation.zip │ ├── hw6-function.zip │ ├── hw7-function-partial-order.zip │ ├── hw8-infinity.zip │ └── hw9-paths-cycles.zip │ └── solutions │ ├── hw0-overview-solution.zip │ ├── hw1-prop-logic-solution.zip │ ├── hw10-trees-solution.zip │ ├── hw11-planarity-coloring-solution.zip │ ├── hw12-matching-flow-solution.zip │ ├── hw13-group-solution.zip │ ├── hw14-subgroup-solution.zip │ ├── hw2-predicate-logic-solution.zip │ ├── hw3-induction-solution.zip │ ├── hw4-set-solution.zip │ ├── hw5-relation-solution.zip │ ├── hw6-function-solution.zip │ ├── hw7-function-ordering-solution.zip │ ├── hw8-infinity-solution.zip │ └── hw9-paths-cycles-solution.zip ├── .gitignore ├── LICENSE └── README.md /2021/additional-problem-sets/problems.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/additional-problem-sets/problems.pdf -------------------------------------------------------------------------------- /2021/problem-set/hw-allinone.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/problem-set/hw-allinone.pdf -------------------------------------------------------------------------------- /2021/problem-set/hw0-overview/README.md: -------------------------------------------------------------------------------- 1 | # README.md -------------------------------------------------------------------------------- /2021/problem-set/hw0-overview/figs/nim-stone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/problem-set/hw0-overview/figs/nim-stone.png -------------------------------------------------------------------------------- /2021/problem-set/hw0-overview/hw0-overview.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/problem-set/hw0-overview/hw0-overview.pdf -------------------------------------------------------------------------------- /2021/problem-set/hw0-overview/hw0-overview.tex: -------------------------------------------------------------------------------- 1 | % hw0-overview.tex 2 | 3 | % !TEX program = xelatex 4 | %%%%%%%%%%%%%%%%%%%% 5 | % see http://mirrors.concertpass.com/tex-archive/macros/latex/contrib/tufte-latex/sample-handout.pdf 6 | % for how to use tufte-handout 7 | \documentclass[a4paper, justified]{tufte-handout} 8 | 9 | \input{hw-preamble} % feel free to modify this file if you understand LaTeX well 10 | %%%%%%%%%%%%%%%%%%%% 11 | \title{离散数学 (0-Overview)} 12 | \me{魏恒峰}{hfwei@nju.edu.cn}{}{} 13 | \date{2021年3月4日} 14 | %%%%%%%%%%%%%%%%%%%% 15 | \begin{document} 16 | \maketitle 17 | %%%%%%%%%%%%%%%%%%%% 18 | \noplagiarism % PLEASE DON'T DELETE THIS LINE! 19 | %%%%%%%%%%%%%%%%%%%% 20 | \begin{abstract} 21 | % \mfigcap{width = 0.85\textwidth}{figs/George-Boole}{George Boole} 22 | % \begin{center}{\fcolorbox{blue}{yellow!60}{\parbox{0.65\textwidth}{\large 23 | % \begin{itemize} 24 | % \item 25 | % \end{itemize}}}} 26 | % \end{center} 27 | \end{abstract} 28 | %%%%%%%%%%%%%%%%%%%% 29 | \beginrequired 30 | %%%%%%%%%%%%%%% 31 | \begin{problem}[防疫工作, 不能大意 \score{4}] 32 | 近期突发一种流感,症状极其严重,受感染的学生会无可遏制地进行编程与刷题等危险行为。 33 | 假设$n^2$位学生坐在座位按$n \times n$网格状排列的教室里。 34 | 感染正在迅速扩散: 35 | \begin{itemize} 36 | \item 如果某学生已被感染,那么他/她就不可能痊愈了; 37 | \item 如果某学生至少与2个已经感染的学生座位相邻 (前、后、左、右;不包括对角), 38 | 那么该学生也会被感染。 39 | \end{itemize} 40 | 请证明: 如果初始状态有$< n$个学生感染了流感,那么至少有一个学生永远不会被感染。 41 | \end{problem} 42 | 43 | \begin{solution} 44 | \end{solution} 45 | %%%%%%%%%%%%%%% 46 | 47 | %%%%%%%%%%%%%%% 48 | \begin{problem}[Nim Game \score{6 = 1 + 2 + 2 + 1}] 49 | Nim 是一个双人游戏 (你可以在课堂上分享的 Ludii Player 里找到它)。 50 | 游戏开始时,两人面前放着几堆石头, 51 | 两个玩家轮流操作,每次选择从某个石堆里拿走一块或多块石头。 52 | 最后没有石头可拿的那个玩家输掉比赛。 53 | 54 | \fig{width = 0.40\textwidth}{figs/nim-stone} 55 | 56 | 本题将引导大家寻找该游戏的必胜策略。 57 | 58 | 考虑对石头堆里的石头个数(二进制表示下的; 不足时高位补0)做异或操作($\oplus$), 59 | 结果称为 Nim 和。 60 | 61 | \begin{enumerate}[(1)] 62 | \item 请证明: 若 Nim 和为0, 则任意一次移动都会导致 Nim 和不为 0。 63 | \item 请证明: 若 Nim 和不为0,则必然存在一个石头堆,它的石头数大于其它所有石头堆的 Nim 和。 64 | (统一在二进制或十进制下进行大小比较) 65 | \item 请证明: 若游戏开始时, Nim 和不为 0,则先手有必胜策略。 66 | \item 在只有两堆石头的情况下,请给出某玩家有必胜策略的充要条件与他/她的必胜策略。 67 | \end{enumerate} 68 | \end{problem} 69 | 70 | \begin{solution} 71 | \end{solution} 72 | %%%%%%%%%%%%%%% 73 | 74 | %%%%%%%%%%%%%%%%%%%% 75 | % 如果没有需要订正的题目,可以把这部分删掉 76 | 77 | \begincorrection 78 | %%%%%%%%%%%%%%%%%%%% 79 | 80 | %%%%%%%%%%%%%%%%%%%% 81 | % 如果没有反馈,可以把这部分删掉 82 | \beginfb 83 | 84 | 你可以写 (也可以发邮件或者使用``教学立方'') 85 | \begin{itemize} 86 | \item 对课程及教师的建议与意见 87 | \item 教材中不理解的内容 88 | \item 希望深入了解的内容 89 | \item $\cdots$ 90 | \end{itemize} 91 | %%%%%%%%%%%%%%%%%%%% 92 | \end{document} -------------------------------------------------------------------------------- /2021/problem-set/hw0-overview/tufte-book.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-book}[2009/12/11 v3.5.0 Tufte-book class] 4 | 5 | %% 6 | % Declare we're tufte-book 7 | \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any book-specific stuff now 17 | 18 | %% 19 | % The front matter in Tufte's /Beautiful Evidence/ contains everything up 20 | % to the opening page of Chapter 1. The running heads, when they appear, 21 | % contain only the (arabic) page number in the outside corner. 22 | %\newif\if@mainmatter \@mainmattertrue 23 | \renewcommand\frontmatter{% 24 | \cleardoublepage% 25 | \@mainmatterfalse% 26 | \pagenumbering{arabic}% 27 | %\pagestyle{plain}% 28 | \fancyhf{}% 29 | \ifthenelse{\boolean{@tufte@twoside}}% 30 | {\fancyhead[LE,RO]{\thepage}}% 31 | {\fancyhead[RE,RO]{\thepage}}% 32 | } 33 | 34 | 35 | %% 36 | % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page 37 | % numbering---it continues where it left off in the front matter. 38 | \renewcommand\mainmatter{% 39 | \cleardoublepage% 40 | \@mainmattertrue% 41 | \fancyhf{}% 42 | \ifthenelse{\boolean{@tufte@twoside}}% 43 | {% two-side 44 | \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% 45 | \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title 46 | \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title 47 | }% 48 | {% one-side 49 | \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title 50 | }% 51 | } 52 | 53 | 54 | %% 55 | % The back matter contains appendices, indices, glossaries, endnotes, 56 | % biliographies, list of contributors, illustration credits, etc. 57 | \renewcommand\backmatter{% 58 | \if@openright% 59 | \cleardoublepage% 60 | \else% 61 | \clearpage% 62 | \fi% 63 | \@mainmatterfalse% 64 | } 65 | 66 | %% 67 | % Only show the chapter titles in the table of contents 68 | \setcounter{tocdepth}{0} 69 | 70 | %% 71 | % If there is a `tufte-book-local.sty' file, load it. 72 | 73 | \IfFileExists{tufte-book-local.tex} 74 | {\input{tufte-book-local} 75 | \TufteInfoNL{Loading tufte-book-local.tex}} 76 | {} 77 | 78 | %% 79 | % End of file 80 | \endinput 81 | -------------------------------------------------------------------------------- /2021/problem-set/hw0-overview/tufte-handout.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-handout}[2009/12/11 v3.5.0 Tufte-handout class] 4 | 5 | %% 6 | % Declare we're tufte-handout 7 | \newcommand{\@tufte@class}{article}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-handout}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any handout-specific stuff now 17 | 18 | %% 19 | % Abstract 20 | 21 | % TODO The abstract should be printed on its own page of the `titlepage' 22 | % option was specified. 23 | \renewenvironment{abstract} 24 | {\begin{quotation}\if@tufte@sfsidenotes\begin{sffamily}\fi} 25 | {\if@tufte@sfsidenotes\end{sffamily}\fi\end{quotation}} 26 | 27 | 28 | %% 29 | % If there is a `tufte-handout-local.tex' file, load it. 30 | 31 | \IfFileExists{tufte-handout-local.tex} 32 | {\input{tufte-handout-local} 33 | \TufteInfoNL{Loading tufte-handout-local.tex}} 34 | {} 35 | 36 | 37 | %% 38 | % End of file 39 | \endinput 40 | -------------------------------------------------------------------------------- /2021/problem-set/hw0-overview/tufte-preamble.tex: -------------------------------------------------------------------------------- 1 | % \geometry{showframe}% for debugging purposes -- displays the margins 2 | 3 | % Set up the images/graphics package 4 | \usepackage{graphicx} 5 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} 6 | % \graphicspath{{figs/}} 7 | 8 | % The following package makes prettier tables. We're all about the bling! 9 | \usepackage{booktabs} 10 | 11 | % The units package provides nice, non-stacked fractions and better spacing for units. 12 | \usepackage{units} 13 | 14 | % Small sections of multiple columns 15 | \usepackage{multicol} 16 | 17 | % Provides paragraphs of dummy text 18 | \usepackage{lipsum} 19 | 20 | % These commands are used to pretty-print LaTeX commands 21 | \newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically 22 | \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument 23 | \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument 24 | \newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment 25 | \newcommand{\docenv}[1]{\textsf{#1}}% environment name 26 | \newcommand{\docpkg}[1]{\texttt{#1}}% package name 27 | \newcommand{\doccls}[1]{\texttt{#1}}% document class name 28 | \newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name 29 | -------------------------------------------------------------------------------- /2021/problem-set/hw1-prop-logic/README.md: -------------------------------------------------------------------------------- 1 | # README.md -------------------------------------------------------------------------------- /2021/problem-set/hw1-prop-logic/hw1-prop-logic.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/problem-set/hw1-prop-logic/hw1-prop-logic.pdf -------------------------------------------------------------------------------- /2021/problem-set/hw1-prop-logic/tufte-book.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-book}[2009/12/11 v3.5.0 Tufte-book class] 4 | 5 | %% 6 | % Declare we're tufte-book 7 | \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any book-specific stuff now 17 | 18 | %% 19 | % The front matter in Tufte's /Beautiful Evidence/ contains everything up 20 | % to the opening page of Chapter 1. The running heads, when they appear, 21 | % contain only the (arabic) page number in the outside corner. 22 | %\newif\if@mainmatter \@mainmattertrue 23 | \renewcommand\frontmatter{% 24 | \cleardoublepage% 25 | \@mainmatterfalse% 26 | \pagenumbering{arabic}% 27 | %\pagestyle{plain}% 28 | \fancyhf{}% 29 | \ifthenelse{\boolean{@tufte@twoside}}% 30 | {\fancyhead[LE,RO]{\thepage}}% 31 | {\fancyhead[RE,RO]{\thepage}}% 32 | } 33 | 34 | 35 | %% 36 | % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page 37 | % numbering---it continues where it left off in the front matter. 38 | \renewcommand\mainmatter{% 39 | \cleardoublepage% 40 | \@mainmattertrue% 41 | \fancyhf{}% 42 | \ifthenelse{\boolean{@tufte@twoside}}% 43 | {% two-side 44 | \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% 45 | \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title 46 | \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title 47 | }% 48 | {% one-side 49 | \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title 50 | }% 51 | } 52 | 53 | 54 | %% 55 | % The back matter contains appendices, indices, glossaries, endnotes, 56 | % biliographies, list of contributors, illustration credits, etc. 57 | \renewcommand\backmatter{% 58 | \if@openright% 59 | \cleardoublepage% 60 | \else% 61 | \clearpage% 62 | \fi% 63 | \@mainmatterfalse% 64 | } 65 | 66 | %% 67 | % Only show the chapter titles in the table of contents 68 | \setcounter{tocdepth}{0} 69 | 70 | %% 71 | % If there is a `tufte-book-local.sty' file, load it. 72 | 73 | \IfFileExists{tufte-book-local.tex} 74 | {\input{tufte-book-local} 75 | \TufteInfoNL{Loading tufte-book-local.tex}} 76 | {} 77 | 78 | %% 79 | % End of file 80 | \endinput 81 | -------------------------------------------------------------------------------- /2021/problem-set/hw1-prop-logic/tufte-handout.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-handout}[2009/12/11 v3.5.0 Tufte-handout class] 4 | 5 | %% 6 | % Declare we're tufte-handout 7 | \newcommand{\@tufte@class}{article}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-handout}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any handout-specific stuff now 17 | 18 | %% 19 | % Abstract 20 | 21 | % TODO The abstract should be printed on its own page of the `titlepage' 22 | % option was specified. 23 | \renewenvironment{abstract} 24 | {\begin{quotation}\if@tufte@sfsidenotes\begin{sffamily}\fi} 25 | {\if@tufte@sfsidenotes\end{sffamily}\fi\end{quotation}} 26 | 27 | 28 | %% 29 | % If there is a `tufte-handout-local.tex' file, load it. 30 | 31 | \IfFileExists{tufte-handout-local.tex} 32 | {\input{tufte-handout-local} 33 | \TufteInfoNL{Loading tufte-handout-local.tex}} 34 | {} 35 | 36 | 37 | %% 38 | % End of file 39 | \endinput 40 | -------------------------------------------------------------------------------- /2021/problem-set/hw1-prop-logic/tufte-preamble.tex: -------------------------------------------------------------------------------- 1 | % \geometry{showframe}% for debugging purposes -- displays the margins 2 | 3 | % Set up the images/graphics package 4 | \usepackage{graphicx} 5 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} 6 | % \graphicspath{{figs/}} 7 | 8 | % The following package makes prettier tables. We're all about the bling! 9 | \usepackage{booktabs} 10 | 11 | % The units package provides nice, non-stacked fractions and better spacing for units. 12 | \usepackage{units} 13 | 14 | % Small sections of multiple columns 15 | \usepackage{multicol} 16 | 17 | % Provides paragraphs of dummy text 18 | \usepackage{lipsum} 19 | 20 | % These commands are used to pretty-print LaTeX commands 21 | \newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically 22 | \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument 23 | \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument 24 | \newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment 25 | \newcommand{\docenv}[1]{\textsf{#1}}% environment name 26 | \newcommand{\docpkg}[1]{\texttt{#1}}% package name 27 | \newcommand{\doccls}[1]{\texttt{#1}}% document class name 28 | \newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name 29 | -------------------------------------------------------------------------------- /2021/problem-set/hw10-trees/README.md: -------------------------------------------------------------------------------- 1 | # README.md -------------------------------------------------------------------------------- /2021/problem-set/hw10-trees/figs/Bourne.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/problem-set/hw10-trees/figs/Bourne.jpg -------------------------------------------------------------------------------- /2021/problem-set/hw10-trees/figs/douban-star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/problem-set/hw10-trees/figs/douban-star.png -------------------------------------------------------------------------------- /2021/problem-set/hw10-trees/figs/st-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/problem-set/hw10-trees/figs/st-example.png -------------------------------------------------------------------------------- /2021/problem-set/hw10-trees/hw10-trees.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/problem-set/hw10-trees/hw10-trees.pdf -------------------------------------------------------------------------------- /2021/problem-set/hw10-trees/hw10-trees.tex: -------------------------------------------------------------------------------- 1 | % hw10-trees.tex 2 | 3 | % !TEX program = xelatex 4 | %%%%%%%%%%%%%%%%%%%% 5 | % see http://mirrors.concertpass.com/tex-archive/macros/latex/contrib/tufte-latex/sample-handout.pdf 6 | % for how to use tufte-handout 7 | \documentclass[a4paper, justified]{tufte-handout} 8 | 9 | \input{hw-preamble} % feel free to modify this file if you understand LaTeX well 10 | %%%%%%%%%%%%%%%%%%%% 11 | \title{10. 图论: 树 (10-trees)} 12 | \me{魏恒峰}{hfwei@nju.edu.cn}{}{} 13 | \date{2021年5月13日} 14 | %%%%%%%%%%%%%%%%%%%% 15 | \begin{document} 16 | \maketitle 17 | %%%%%%%%%%%%%%%%%%%% 18 | \noplagiarism % PLEASE DON'T DELETE THIS LINE! 19 | %%%%%%%%%%%%%%%%%%%% 20 | \begin{abstract} 21 | % \mfigcap{width = 0.85\textwidth}{figs/George-Boole}{George Boole} 22 | % \begin{center}{\fcolorbox{blue}{yellow!60}{\parbox{0.65\textwidth}{\large 23 | % \begin{itemize} 24 | % \item 25 | % \end{itemize}}}} 26 | % \end{center} 27 | \end{abstract} 28 | %%%%%%%%%%%%%%%%%%%% 29 | \beginrequired 30 | %%%%%%%%%%%%%%% 31 | 32 | %%%%%%%%%%%%%%% 33 | \begin{problem}[\score{4} $\star\star$] 34 | 设 $T$ 是树且每个顶点的度数要么为1, 要么为 $k$。 35 | 请证明~\footnote{我们经常使用 $n(G)$ 表示 $G$ 的顶点数。}~\footnote{提示: 36 | 关于顶点度数, 我们有什么定理可用?}: 37 | \[ 38 | n(T) = \ell (k-1) + 2, \quad\ell \in \mathbb{N}. 39 | \] 40 | \end{problem} 41 | 42 | \begin{proof} 43 | \end{proof} 44 | %%%%%%%%%%%%%%% 45 | 46 | %%%%%%%%%%%%%%% 47 | \begin{problem}[\score{4} $\star\star\star$] 48 | 给定无向图 $G$。 49 | 请证明: $G$ 是树当且仅当 $G$ 没有 loop且 $G$ 有唯一的生成树。 50 | \end{problem} 51 | 52 | \begin{proof} 53 | \end{proof} 54 | %%%%%%%%%%%%%%% 55 | 56 | %%%%%%%%%%%%%%% 57 | \begin{problem}[\score{4} $\star\star\star$] 58 | 给定无向连通图 $G$ 与 $G$ 中的某条边 $e$。 59 | 请证明: $e$ 是桥 (bridge~\footnote{bridge 也称为 cut-edge (割边)。}) 60 | 当且仅当 $e$ 属于 $G$ 的每个生成树。 61 | \end{problem} 62 | 63 | \begin{proof} 64 | \end{proof} 65 | %%%%%%%%%%%%%%% 66 | 67 | %%%%%%%%%%%%%%% 68 | \begin{problem}[\score{4 = 2 + 2} $\star\star$] 69 | 请分别使用 Kruskal 算法与 Prim 算法 (从顶点1开始) 70 | 给出下图的最小生成树~\footnote{以后你会明白, Kruskal 71 | 算法与Prim算法的难度不在算法本身, 而在于搞清楚哪个是哪个。} 72 | 要求给出边添加的顺序 (在有多种选择时, 优先选择编号较小的顶点)。 73 | 74 | \fig{width = 0.50\textwidth}{figs/st-example} 75 | \end{problem} 76 | 77 | \begin{proof} 78 | \end{proof} 79 | %%%%%%%%%%%%%%% 80 | 81 | %%%%%%%%%%%%%%% 82 | \begin{problem}[\score{4} $\star\star\star\star$] 83 | 设 $G$ 是无向连通带权图, $T$ 是 $G$ 的一个最小生成树。 84 | 85 | \noindent 请证明: $T$ 是 $G$ 的唯一最小生成树当且仅当 86 | 对于不在 $T$ 中的每一条边 $e$, 87 | $e$ 的权重大于 $T + e$ 所产生的圈中其它每条边的权重。 88 | \end{problem} 89 | 90 | \begin{proof} 91 | \end{proof} 92 | %%%%%%%%%%%%%%% 93 | 94 | %%%%%%%%%%%%%%% 95 | \begin{problem}[\score{$-10$}] 96 | \fig{width = 0.70\textwidth}{figs/Bourne} 97 | \end{problem} 98 | %%%%%%%%%%%%%%% 99 | 100 | %%%%%%%%%%%%%%%%%%%% 101 | % 如果没有需要订正的题目,可以把这部分删掉 102 | 103 | \begincorrection 104 | %%%%%%%%%%%%%%%%%%%% 105 | 106 | %%%%%%%%%%%%%%%%%%%% 107 | % 如果没有反馈,可以把这部分删掉 108 | \beginfb 109 | 110 | 你可以写 (也可以发邮件或者使用``教学立方'') 111 | \begin{itemize} 112 | \item 对课程及教师的建议与意见 113 | \item 教材中不理解的内容 114 | \item 希望深入了解的内容 115 | \item $\cdots$ 116 | \end{itemize} 117 | %%%%%%%%%%%%%%%%%%%% 118 | \end{document} -------------------------------------------------------------------------------- /2021/problem-set/hw10-trees/tufte-book.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-book}[2009/12/11 v3.5.0 Tufte-book class] 4 | 5 | %% 6 | % Declare we're tufte-book 7 | \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any book-specific stuff now 17 | 18 | %% 19 | % The front matter in Tufte's /Beautiful Evidence/ contains everything up 20 | % to the opening page of Chapter 1. The running heads, when they appear, 21 | % contain only the (arabic) page number in the outside corner. 22 | %\newif\if@mainmatter \@mainmattertrue 23 | \renewcommand\frontmatter{% 24 | \cleardoublepage% 25 | \@mainmatterfalse% 26 | \pagenumbering{arabic}% 27 | %\pagestyle{plain}% 28 | \fancyhf{}% 29 | \ifthenelse{\boolean{@tufte@twoside}}% 30 | {\fancyhead[LE,RO]{\thepage}}% 31 | {\fancyhead[RE,RO]{\thepage}}% 32 | } 33 | 34 | 35 | %% 36 | % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page 37 | % numbering---it continues where it left off in the front matter. 38 | \renewcommand\mainmatter{% 39 | \cleardoublepage% 40 | \@mainmattertrue% 41 | \fancyhf{}% 42 | \ifthenelse{\boolean{@tufte@twoside}}% 43 | {% two-side 44 | \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% 45 | \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title 46 | \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title 47 | }% 48 | {% one-side 49 | \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title 50 | }% 51 | } 52 | 53 | 54 | %% 55 | % The back matter contains appendices, indices, glossaries, endnotes, 56 | % biliographies, list of contributors, illustration credits, etc. 57 | \renewcommand\backmatter{% 58 | \if@openright% 59 | \cleardoublepage% 60 | \else% 61 | \clearpage% 62 | \fi% 63 | \@mainmatterfalse% 64 | } 65 | 66 | %% 67 | % Only show the chapter titles in the table of contents 68 | \setcounter{tocdepth}{0} 69 | 70 | %% 71 | % If there is a `tufte-book-local.sty' file, load it. 72 | 73 | \IfFileExists{tufte-book-local.tex} 74 | {\input{tufte-book-local} 75 | \TufteInfoNL{Loading tufte-book-local.tex}} 76 | {} 77 | 78 | %% 79 | % End of file 80 | \endinput 81 | -------------------------------------------------------------------------------- /2021/problem-set/hw10-trees/tufte-handout.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-handout}[2009/12/11 v3.5.0 Tufte-handout class] 4 | 5 | %% 6 | % Declare we're tufte-handout 7 | \newcommand{\@tufte@class}{article}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-handout}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any handout-specific stuff now 17 | 18 | %% 19 | % Abstract 20 | 21 | % TODO The abstract should be printed on its own page of the `titlepage' 22 | % option was specified. 23 | \renewenvironment{abstract} 24 | {\begin{quotation}\if@tufte@sfsidenotes\begin{sffamily}\fi} 25 | {\if@tufte@sfsidenotes\end{sffamily}\fi\end{quotation}} 26 | 27 | 28 | %% 29 | % If there is a `tufte-handout-local.tex' file, load it. 30 | 31 | \IfFileExists{tufte-handout-local.tex} 32 | {\input{tufte-handout-local} 33 | \TufteInfoNL{Loading tufte-handout-local.tex}} 34 | {} 35 | 36 | 37 | %% 38 | % End of file 39 | \endinput 40 | -------------------------------------------------------------------------------- /2021/problem-set/hw10-trees/tufte-preamble.tex: -------------------------------------------------------------------------------- 1 | % \geometry{showframe}% for debugging purposes -- displays the margins 2 | 3 | % Set up the images/graphics package 4 | \usepackage{graphicx} 5 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} 6 | % \graphicspath{{figs/}} 7 | 8 | % The following package makes prettier tables. We're all about the bling! 9 | \usepackage{booktabs} 10 | 11 | % The units package provides nice, non-stacked fractions and better spacing for units. 12 | \usepackage{units} 13 | 14 | % Small sections of multiple columns 15 | \usepackage{multicol} 16 | 17 | % Provides paragraphs of dummy text 18 | \usepackage{lipsum} 19 | 20 | % These commands are used to pretty-print LaTeX commands 21 | \newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically 22 | \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument 23 | \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument 24 | \newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment 25 | \newcommand{\docenv}[1]{\textsf{#1}}% environment name 26 | \newcommand{\docpkg}[1]{\texttt{#1}}% package name 27 | \newcommand{\doccls}[1]{\texttt{#1}}% document class name 28 | \newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name 29 | -------------------------------------------------------------------------------- /2021/problem-set/hw11-planarity-coloring/README.md: -------------------------------------------------------------------------------- 1 | # README.md -------------------------------------------------------------------------------- /2021/problem-set/hw11-planarity-coloring/figs/Hall-Proof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/problem-set/hw11-planarity-coloring/figs/Hall-Proof.png -------------------------------------------------------------------------------- /2021/problem-set/hw11-planarity-coloring/figs/planarity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/problem-set/hw11-planarity-coloring/figs/planarity.png -------------------------------------------------------------------------------- /2021/problem-set/hw11-planarity-coloring/hw11-planarity-coloring-handout.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/problem-set/hw11-planarity-coloring/hw11-planarity-coloring-handout.pdf -------------------------------------------------------------------------------- /2021/problem-set/hw11-planarity-coloring/hw11-planarity-coloring.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/problem-set/hw11-planarity-coloring/hw11-planarity-coloring.pdf -------------------------------------------------------------------------------- /2021/problem-set/hw11-planarity-coloring/hw11-planarity-coloring.tex: -------------------------------------------------------------------------------- 1 | % hw11-planarity-coloring.tex 2 | 3 | % !TEX program = xelatex 4 | %%%%%%%%%%%%%%%%%%%% 5 | % see http://mirrors.concertpass.com/tex-archive/macros/latex/contrib/tufte-latex/sample-handout.pdf 6 | % for how to use tufte-handout 7 | \documentclass[a4paper, justified]{tufte-handout} 8 | 9 | \input{hw-preamble} % feel free to modify this file if you understand LaTeX well 10 | %%%%%%%%%%%%%%%%%%%% 11 | \title{11. 图论: 平面图与图着色 (11-planarity-coloring)} 12 | \me{魏恒峰}{hfwei@nju.edu.cn}{}{} 13 | \date{2021年5月21日} 14 | %%%%%%%%%%%%%%%%%%%% 15 | \begin{document} 16 | \maketitle 17 | %%%%%%%%%%%%%%%%%%%% 18 | \noplagiarism % PLEASE DON'T DELETE THIS LINE! 19 | %%%%%%%%%%%%%%%%%%%% 20 | \begin{abstract} 21 | % \mfigcap{width = 0.85\textwidth}{figs/George-Boole}{George Boole} 22 | % \begin{center}{\fcolorbox{blue}{yellow!60}{\parbox{0.65\textwidth}{\large 23 | % \begin{itemize} 24 | % \item 25 | % \end{itemize}}}} 26 | % \end{center} 27 | \end{abstract} 28 | %%%%%%%%%%%%%%%%%%%% 29 | \beginrequired 30 | %%%%%%%%%%%%%%% 31 | 32 | %%%%%%%%%%%%%%% 33 | \begin{problem}[\score{4} $\star\star\star$] 34 | 假设 $G$ 是顶点数 $\ge 11$ 的简单图, $\overline{G}$ 是 $G$ 的补图~\footnote{ 35 | 补图: 顶点集相同, 但是 $e$ 是 $G$ 的边当且仅当 $e$ 不是 $\overline{G}$ 的边。 36 | }。 37 | 请证明, $G$ 和 $\overline{G}$ 不同为平面图。 38 | \end{problem} 39 | 40 | \begin{proof} 41 | \end{proof} 42 | %%%%%%%%%%%%%%% 43 | 44 | %%%%%%%%%%%%%%% 45 | \begin{problem}[\score{4} $\star\star\star$] 46 | 假设 $G$ 是包含 $n$ 个顶点的$d$-正则简单图。 47 | 请证明 48 | \[ 49 | \chi(G) \ge \frac{n}{n-d}. 50 | \] 51 | \end{problem} 52 | 53 | \begin{proof} 54 | \end{proof} 55 | %%%%%%%%%%%%%%% 56 | 57 | %%%%%%%%%%%%%%% 58 | \begin{problem}[\score{4} $\star\star\star$] 59 | 假设 $G$ 是不包含三角形 $\triangle$ 的简单平面图。 60 | \begin{enumerate}[(1)] 61 | \item 请使用Euler公式证明 $G$ 含有度数 $\le 3$ 的顶点。 62 | \item 请使用数学归纳法证明 $G$ 是 $4$-可着色的。 63 | \end{enumerate} 64 | \end{problem} 65 | 66 | \begin{proof} 67 | \end{proof} 68 | %%%%%%%%%%%%%%% 69 | 70 | %%%%%%%%%%%%%%% 71 | \begin{problem}[\score{4} $\star\star$] 72 | 假设图 $G_{1}$ 与 $G_{2}$ 是 homeomorphic 的。请证明~\footnote{ 73 | $m$, $n$ 分别表示边数与点数。 74 | }: 75 | \[ 76 | m_{1} - n_{1} = m_{2} - n_{2}. 77 | \] 78 | \end{problem} 79 | 80 | \begin{proof} 81 | \end{proof} 82 | %%%%%%%%%%%%%%% 83 | 84 | %%%%%%%%%%%%%%% 85 | \begin{problem}[\score{4} $\star\star$] 86 | 请使用 Kuratowski 定理说明下图不是平面图~\footnote{你不需要制作\textsf{.gif}。}: 87 | \fig{width = 0.50\textwidth}{figs/planarity} 88 | \end{problem} 89 | 90 | \begin{proof} 91 | \end{proof} 92 | %%%%%%%%%%%%%%% 93 | 94 | %%%%%%%%%%%%%%%%%%%% 95 | % 如果没有需要订正的题目,可以把这部分删掉 96 | \begincorrection 97 | %%%%%%%%%%%%%%%%%%%% 98 | 99 | %%%%%%%%%%%%%%%%%%%% 100 | % 如果没有反馈,可以把这部分删掉 101 | \beginfb 102 | 103 | 你可以写 (也可以发邮件或者使用``教学立方'') 104 | \begin{itemize} 105 | \item 对课程及教师的建议与意见 106 | \item 教材中不理解的内容 107 | \item 希望深入了解的内容 108 | \item $\cdots$ 109 | \end{itemize} 110 | %%%%%%%%%%%%%%%%%%%% 111 | \end{document} -------------------------------------------------------------------------------- /2021/problem-set/hw11-planarity-coloring/tufte-book.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-book}[2009/12/11 v3.5.0 Tufte-book class] 4 | 5 | %% 6 | % Declare we're tufte-book 7 | \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any book-specific stuff now 17 | 18 | %% 19 | % The front matter in Tufte's /Beautiful Evidence/ contains everything up 20 | % to the opening page of Chapter 1. The running heads, when they appear, 21 | % contain only the (arabic) page number in the outside corner. 22 | %\newif\if@mainmatter \@mainmattertrue 23 | \renewcommand\frontmatter{% 24 | \cleardoublepage% 25 | \@mainmatterfalse% 26 | \pagenumbering{arabic}% 27 | %\pagestyle{plain}% 28 | \fancyhf{}% 29 | \ifthenelse{\boolean{@tufte@twoside}}% 30 | {\fancyhead[LE,RO]{\thepage}}% 31 | {\fancyhead[RE,RO]{\thepage}}% 32 | } 33 | 34 | 35 | %% 36 | % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page 37 | % numbering---it continues where it left off in the front matter. 38 | \renewcommand\mainmatter{% 39 | \cleardoublepage% 40 | \@mainmattertrue% 41 | \fancyhf{}% 42 | \ifthenelse{\boolean{@tufte@twoside}}% 43 | {% two-side 44 | \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% 45 | \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title 46 | \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title 47 | }% 48 | {% one-side 49 | \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title 50 | }% 51 | } 52 | 53 | 54 | %% 55 | % The back matter contains appendices, indices, glossaries, endnotes, 56 | % biliographies, list of contributors, illustration credits, etc. 57 | \renewcommand\backmatter{% 58 | \if@openright% 59 | \cleardoublepage% 60 | \else% 61 | \clearpage% 62 | \fi% 63 | \@mainmatterfalse% 64 | } 65 | 66 | %% 67 | % Only show the chapter titles in the table of contents 68 | \setcounter{tocdepth}{0} 69 | 70 | %% 71 | % If there is a `tufte-book-local.sty' file, load it. 72 | 73 | \IfFileExists{tufte-book-local.tex} 74 | {\input{tufte-book-local} 75 | \TufteInfoNL{Loading tufte-book-local.tex}} 76 | {} 77 | 78 | %% 79 | % End of file 80 | \endinput 81 | -------------------------------------------------------------------------------- /2021/problem-set/hw11-planarity-coloring/tufte-handout.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-handout}[2009/12/11 v3.5.0 Tufte-handout class] 4 | 5 | %% 6 | % Declare we're tufte-handout 7 | \newcommand{\@tufte@class}{article}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-handout}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any handout-specific stuff now 17 | 18 | %% 19 | % Abstract 20 | 21 | % TODO The abstract should be printed on its own page of the `titlepage' 22 | % option was specified. 23 | \renewenvironment{abstract} 24 | {\begin{quotation}\if@tufte@sfsidenotes\begin{sffamily}\fi} 25 | {\if@tufte@sfsidenotes\end{sffamily}\fi\end{quotation}} 26 | 27 | 28 | %% 29 | % If there is a `tufte-handout-local.tex' file, load it. 30 | 31 | \IfFileExists{tufte-handout-local.tex} 32 | {\input{tufte-handout-local} 33 | \TufteInfoNL{Loading tufte-handout-local.tex}} 34 | {} 35 | 36 | 37 | %% 38 | % End of file 39 | \endinput 40 | -------------------------------------------------------------------------------- /2021/problem-set/hw11-planarity-coloring/tufte-preamble.tex: -------------------------------------------------------------------------------- 1 | % \geometry{showframe}% for debugging purposes -- displays the margins 2 | 3 | % Set up the images/graphics package 4 | \usepackage{graphicx} 5 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} 6 | % \graphicspath{{figs/}} 7 | 8 | % The following package makes prettier tables. We're all about the bling! 9 | \usepackage{booktabs} 10 | 11 | % The units package provides nice, non-stacked fractions and better spacing for units. 12 | \usepackage{units} 13 | 14 | % Small sections of multiple columns 15 | \usepackage{multicol} 16 | 17 | % Provides paragraphs of dummy text 18 | \usepackage{lipsum} 19 | 20 | % These commands are used to pretty-print LaTeX commands 21 | \newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically 22 | \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument 23 | \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument 24 | \newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment 25 | \newcommand{\docenv}[1]{\textsf{#1}}% environment name 26 | \newcommand{\docpkg}[1]{\texttt{#1}}% package name 27 | \newcommand{\doccls}[1]{\texttt{#1}}% document class name 28 | \newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name 29 | -------------------------------------------------------------------------------- /2021/problem-set/hw12-matching-flow/README.md: -------------------------------------------------------------------------------- 1 | # README.md -------------------------------------------------------------------------------- /2021/problem-set/hw12-matching-flow/hw12-matching-flow.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/problem-set/hw12-matching-flow/hw12-matching-flow.pdf -------------------------------------------------------------------------------- /2021/problem-set/hw12-matching-flow/hw12-matching-flow.tex: -------------------------------------------------------------------------------- 1 | % hw12-matching-flow.tex 2 | 3 | % !TEX program = xelatex 4 | %%%%%%%%%%%%%%%%%%%% 5 | % see http://mirrors.concertpass.com/tex-archive/macros/latex/contrib/tufte-latex/sample-handout.pdf 6 | % for how to use tufte-handout 7 | \documentclass[a4paper, justified]{tufte-handout} 8 | 9 | \input{hw-preamble} % feel free to modify this file if you understand LaTeX well 10 | %%%%%%%%%%%%%%%%%%%% 11 | \title{12. 图论: 匹配与网络流 (12-matching-flow)} 12 | \me{魏恒峰}{hfwei@nju.edu.cn}{}{} 13 | \date{2021年5月28日} 14 | %%%%%%%%%%%%%%%%%%%% 15 | \begin{document} 16 | \maketitle 17 | %%%%%%%%%%%%%%%%%%%% 18 | \noplagiarism % PLEASE DON'T DELETE THIS LINE! 19 | %%%%%%%%%%%%%%%%%%%% 20 | \begin{abstract} 21 | % \mfigcap{width = 0.85\textwidth}{figs/George-Boole}{George Boole} 22 | % \begin{center}{\fcolorbox{blue}{yellow!60}{\parbox{0.65\textwidth}{\large 23 | % \begin{itemize} 24 | % \item 25 | % \end{itemize}}}} 26 | % \end{center} 27 | \end{abstract} 28 | %%%%%%%%%%%%%%%%%%%% 29 | \beginrequired 30 | %%%%%%%%%%%%%%% 31 | 32 | %%%%%%%%%%%%%%% 33 | \begin{problem}[\score{5 = 2 + 3} $\star\star$] 34 | 设 $G = (X, Y, E)$ 是一个 $k$-正则 ($k > 0$) 二部图。 35 | 请证明: 36 | \begin{enumerate}[(1)] 37 | \item $|X| = |Y|$; 38 | \item $G$ 有一个 $X$-完美匹配。 39 | \end{enumerate} 40 | \end{problem} 41 | 42 | \begin{proof} 43 | \end{proof} 44 | %%%%%%%%%%%%%%% 45 | 46 | %%%%%%%%%%%%%%% 47 | \begin{problem}[\score{5} $\star\star\star$] 48 | 设 $G = (V, E)$ 是含有 $2n$ 个顶点的简单图,且 $\delta(G) \ge n + 1$。\\ 49 | 请证明: $G$ 有完美匹配~\footnote{对于任意图, 完美匹配是 cover 了所有顶点的匹配。}。 50 | (提示: 考虑使用图论第一讲中的定理。) 51 | \end{problem} 52 | 53 | \begin{proof} 54 | \end{proof} 55 | %%%%%%%%%%%%%%% 56 | 57 | %%%%%%%%%%%%%%% 58 | \begin{problem}[\score{5} $\star\star\star\star$] 59 | 请证明: 每个二部图 $G$ 都有一个大小 $\ge e(G)/\Delta(G)$ 的匹配~\footnote{$e(G)$表示$G$的边数。}。 60 | (提示: 使用 K\"{o}nig-Egerv\'{a}ry 定理。) 61 | \end{problem} 62 | 63 | \begin{proof} 64 | \end{proof} 65 | %%%%%%%%%%%%%%% 66 | 67 | %%%%%%%%%%%%%%% 68 | \begin{problem}[\score{5} $\star\star$] 69 | 设 $Y$ 为集合, 70 | $\mathcal{A} = \set{A_{1}, \dots, A_{m}}$ 71 | 为包含 $m$ 个集合的集合, 其中 $A_{i} \subseteq Y$ (对 $1 \le i \le m$)。 72 | $\mathcal{A}$ 的相异代表系 (System of Distinct Representatives; SDR) 73 | 是 $Y$ 中 $m$ 个不同元素 $a_{1}, \dots, a_{m}$ 构成的集合, 74 | 其中 $a_{i} \in A_{i}$ (对 $1 \le i \le m$)。 75 | 76 | \noindent 请证明: $\mathcal{A}$ 有 SDR 当且仅当 77 | \[ 78 | \forall S \subseteq \set{1, \dots, m}.\; 79 | \big\lvert \bigcup_{i \in S} A_{i} \big\rvert \ge |S|. 80 | \] 81 | \end{problem} 82 | 83 | \begin{proof} 84 | \end{proof} 85 | %%%%%%%%%%%%%%% 86 | 87 | %%%%%%%%%%%%%%%%%%%% 88 | % 如果没有需要订正的题目,可以把这部分删掉 89 | \begincorrection 90 | %%%%%%%%%%%%%%%%%%%% 91 | 92 | %%%%%%%%%%%%%%%%%%%% 93 | % 如果没有反馈,可以把这部分删掉 94 | \beginfb 95 | 96 | 你可以写 (也可以发邮件或者使用``教学立方'') 97 | \begin{itemize} 98 | \item 对课程及教师的建议与意见 99 | \item 教材中不理解的内容 100 | \item 希望深入了解的内容 101 | \item $\cdots$ 102 | \end{itemize} 103 | %%%%%%%%%%%%%%%%%%%% 104 | \end{document} -------------------------------------------------------------------------------- /2021/problem-set/hw12-matching-flow/tufte-book.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-book}[2009/12/11 v3.5.0 Tufte-book class] 4 | 5 | %% 6 | % Declare we're tufte-book 7 | \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any book-specific stuff now 17 | 18 | %% 19 | % The front matter in Tufte's /Beautiful Evidence/ contains everything up 20 | % to the opening page of Chapter 1. The running heads, when they appear, 21 | % contain only the (arabic) page number in the outside corner. 22 | %\newif\if@mainmatter \@mainmattertrue 23 | \renewcommand\frontmatter{% 24 | \cleardoublepage% 25 | \@mainmatterfalse% 26 | \pagenumbering{arabic}% 27 | %\pagestyle{plain}% 28 | \fancyhf{}% 29 | \ifthenelse{\boolean{@tufte@twoside}}% 30 | {\fancyhead[LE,RO]{\thepage}}% 31 | {\fancyhead[RE,RO]{\thepage}}% 32 | } 33 | 34 | 35 | %% 36 | % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page 37 | % numbering---it continues where it left off in the front matter. 38 | \renewcommand\mainmatter{% 39 | \cleardoublepage% 40 | \@mainmattertrue% 41 | \fancyhf{}% 42 | \ifthenelse{\boolean{@tufte@twoside}}% 43 | {% two-side 44 | \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% 45 | \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title 46 | \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title 47 | }% 48 | {% one-side 49 | \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title 50 | }% 51 | } 52 | 53 | 54 | %% 55 | % The back matter contains appendices, indices, glossaries, endnotes, 56 | % biliographies, list of contributors, illustration credits, etc. 57 | \renewcommand\backmatter{% 58 | \if@openright% 59 | \cleardoublepage% 60 | \else% 61 | \clearpage% 62 | \fi% 63 | \@mainmatterfalse% 64 | } 65 | 66 | %% 67 | % Only show the chapter titles in the table of contents 68 | \setcounter{tocdepth}{0} 69 | 70 | %% 71 | % If there is a `tufte-book-local.sty' file, load it. 72 | 73 | \IfFileExists{tufte-book-local.tex} 74 | {\input{tufte-book-local} 75 | \TufteInfoNL{Loading tufte-book-local.tex}} 76 | {} 77 | 78 | %% 79 | % End of file 80 | \endinput 81 | -------------------------------------------------------------------------------- /2021/problem-set/hw12-matching-flow/tufte-handout.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-handout}[2009/12/11 v3.5.0 Tufte-handout class] 4 | 5 | %% 6 | % Declare we're tufte-handout 7 | \newcommand{\@tufte@class}{article}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-handout}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any handout-specific stuff now 17 | 18 | %% 19 | % Abstract 20 | 21 | % TODO The abstract should be printed on its own page of the `titlepage' 22 | % option was specified. 23 | \renewenvironment{abstract} 24 | {\begin{quotation}\if@tufte@sfsidenotes\begin{sffamily}\fi} 25 | {\if@tufte@sfsidenotes\end{sffamily}\fi\end{quotation}} 26 | 27 | 28 | %% 29 | % If there is a `tufte-handout-local.tex' file, load it. 30 | 31 | \IfFileExists{tufte-handout-local.tex} 32 | {\input{tufte-handout-local} 33 | \TufteInfoNL{Loading tufte-handout-local.tex}} 34 | {} 35 | 36 | 37 | %% 38 | % End of file 39 | \endinput 40 | -------------------------------------------------------------------------------- /2021/problem-set/hw12-matching-flow/tufte-preamble.tex: -------------------------------------------------------------------------------- 1 | % \geometry{showframe}% for debugging purposes -- displays the margins 2 | 3 | % Set up the images/graphics package 4 | \usepackage{graphicx} 5 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} 6 | % \graphicspath{{figs/}} 7 | 8 | % The following package makes prettier tables. We're all about the bling! 9 | \usepackage{booktabs} 10 | 11 | % The units package provides nice, non-stacked fractions and better spacing for units. 12 | \usepackage{units} 13 | 14 | % Small sections of multiple columns 15 | \usepackage{multicol} 16 | 17 | % Provides paragraphs of dummy text 18 | \usepackage{lipsum} 19 | 20 | % These commands are used to pretty-print LaTeX commands 21 | \newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically 22 | \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument 23 | \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument 24 | \newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment 25 | \newcommand{\docenv}[1]{\textsf{#1}}% environment name 26 | \newcommand{\docpkg}[1]{\texttt{#1}}% package name 27 | \newcommand{\doccls}[1]{\texttt{#1}}% document class name 28 | \newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name 29 | -------------------------------------------------------------------------------- /2021/problem-set/hw13-group/README.md: -------------------------------------------------------------------------------- 1 | # README.md -------------------------------------------------------------------------------- /2021/problem-set/hw13-group/figs/edge-disjoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/problem-set/hw13-group/figs/edge-disjoint.png -------------------------------------------------------------------------------- /2021/problem-set/hw13-group/figs/network-flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/problem-set/hw13-group/figs/network-flow.png -------------------------------------------------------------------------------- /2021/problem-set/hw13-group/hw13-group.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/problem-set/hw13-group/hw13-group.pdf -------------------------------------------------------------------------------- /2021/problem-set/hw13-group/tufte-book.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-book}[2009/12/11 v3.5.0 Tufte-book class] 4 | 5 | %% 6 | % Declare we're tufte-book 7 | \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any book-specific stuff now 17 | 18 | %% 19 | % The front matter in Tufte's /Beautiful Evidence/ contains everything up 20 | % to the opening page of Chapter 1. The running heads, when they appear, 21 | % contain only the (arabic) page number in the outside corner. 22 | %\newif\if@mainmatter \@mainmattertrue 23 | \renewcommand\frontmatter{% 24 | \cleardoublepage% 25 | \@mainmatterfalse% 26 | \pagenumbering{arabic}% 27 | %\pagestyle{plain}% 28 | \fancyhf{}% 29 | \ifthenelse{\boolean{@tufte@twoside}}% 30 | {\fancyhead[LE,RO]{\thepage}}% 31 | {\fancyhead[RE,RO]{\thepage}}% 32 | } 33 | 34 | 35 | %% 36 | % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page 37 | % numbering---it continues where it left off in the front matter. 38 | \renewcommand\mainmatter{% 39 | \cleardoublepage% 40 | \@mainmattertrue% 41 | \fancyhf{}% 42 | \ifthenelse{\boolean{@tufte@twoside}}% 43 | {% two-side 44 | \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% 45 | \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title 46 | \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title 47 | }% 48 | {% one-side 49 | \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title 50 | }% 51 | } 52 | 53 | 54 | %% 55 | % The back matter contains appendices, indices, glossaries, endnotes, 56 | % biliographies, list of contributors, illustration credits, etc. 57 | \renewcommand\backmatter{% 58 | \if@openright% 59 | \cleardoublepage% 60 | \else% 61 | \clearpage% 62 | \fi% 63 | \@mainmatterfalse% 64 | } 65 | 66 | %% 67 | % Only show the chapter titles in the table of contents 68 | \setcounter{tocdepth}{0} 69 | 70 | %% 71 | % If there is a `tufte-book-local.sty' file, load it. 72 | 73 | \IfFileExists{tufte-book-local.tex} 74 | {\input{tufte-book-local} 75 | \TufteInfoNL{Loading tufte-book-local.tex}} 76 | {} 77 | 78 | %% 79 | % End of file 80 | \endinput 81 | -------------------------------------------------------------------------------- /2021/problem-set/hw13-group/tufte-handout.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-handout}[2009/12/11 v3.5.0 Tufte-handout class] 4 | 5 | %% 6 | % Declare we're tufte-handout 7 | \newcommand{\@tufte@class}{article}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-handout}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any handout-specific stuff now 17 | 18 | %% 19 | % Abstract 20 | 21 | % TODO The abstract should be printed on its own page of the `titlepage' 22 | % option was specified. 23 | \renewenvironment{abstract} 24 | {\begin{quotation}\if@tufte@sfsidenotes\begin{sffamily}\fi} 25 | {\if@tufte@sfsidenotes\end{sffamily}\fi\end{quotation}} 26 | 27 | 28 | %% 29 | % If there is a `tufte-handout-local.tex' file, load it. 30 | 31 | \IfFileExists{tufte-handout-local.tex} 32 | {\input{tufte-handout-local} 33 | \TufteInfoNL{Loading tufte-handout-local.tex}} 34 | {} 35 | 36 | 37 | %% 38 | % End of file 39 | \endinput 40 | -------------------------------------------------------------------------------- /2021/problem-set/hw13-group/tufte-preamble.tex: -------------------------------------------------------------------------------- 1 | % \geometry{showframe}% for debugging purposes -- displays the margins 2 | 3 | % Set up the images/graphics package 4 | \usepackage{graphicx} 5 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} 6 | % \graphicspath{{figs/}} 7 | 8 | % The following package makes prettier tables. We're all about the bling! 9 | \usepackage{booktabs} 10 | 11 | % The units package provides nice, non-stacked fractions and better spacing for units. 12 | \usepackage{units} 13 | 14 | % Small sections of multiple columns 15 | \usepackage{multicol} 16 | 17 | % Provides paragraphs of dummy text 18 | \usepackage{lipsum} 19 | 20 | % These commands are used to pretty-print LaTeX commands 21 | \newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically 22 | \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument 23 | \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument 24 | \newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment 25 | \newcommand{\docenv}[1]{\textsf{#1}}% environment name 26 | \newcommand{\docpkg}[1]{\texttt{#1}}% package name 27 | \newcommand{\doccls}[1]{\texttt{#1}}% document class name 28 | \newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name 29 | -------------------------------------------------------------------------------- /2021/problem-set/hw14-subgroup/README.md: -------------------------------------------------------------------------------- 1 | # README.md -------------------------------------------------------------------------------- /2021/problem-set/hw14-subgroup/hw14-subgroup.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/problem-set/hw14-subgroup/hw14-subgroup.pdf -------------------------------------------------------------------------------- /2021/problem-set/hw14-subgroup/tufte-book.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-book}[2009/12/11 v3.5.0 Tufte-book class] 4 | 5 | %% 6 | % Declare we're tufte-book 7 | \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any book-specific stuff now 17 | 18 | %% 19 | % The front matter in Tufte's /Beautiful Evidence/ contains everything up 20 | % to the opening page of Chapter 1. The running heads, when they appear, 21 | % contain only the (arabic) page number in the outside corner. 22 | %\newif\if@mainmatter \@mainmattertrue 23 | \renewcommand\frontmatter{% 24 | \cleardoublepage% 25 | \@mainmatterfalse% 26 | \pagenumbering{arabic}% 27 | %\pagestyle{plain}% 28 | \fancyhf{}% 29 | \ifthenelse{\boolean{@tufte@twoside}}% 30 | {\fancyhead[LE,RO]{\thepage}}% 31 | {\fancyhead[RE,RO]{\thepage}}% 32 | } 33 | 34 | 35 | %% 36 | % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page 37 | % numbering---it continues where it left off in the front matter. 38 | \renewcommand\mainmatter{% 39 | \cleardoublepage% 40 | \@mainmattertrue% 41 | \fancyhf{}% 42 | \ifthenelse{\boolean{@tufte@twoside}}% 43 | {% two-side 44 | \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% 45 | \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title 46 | \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title 47 | }% 48 | {% one-side 49 | \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title 50 | }% 51 | } 52 | 53 | 54 | %% 55 | % The back matter contains appendices, indices, glossaries, endnotes, 56 | % biliographies, list of contributors, illustration credits, etc. 57 | \renewcommand\backmatter{% 58 | \if@openright% 59 | \cleardoublepage% 60 | \else% 61 | \clearpage% 62 | \fi% 63 | \@mainmatterfalse% 64 | } 65 | 66 | %% 67 | % Only show the chapter titles in the table of contents 68 | \setcounter{tocdepth}{0} 69 | 70 | %% 71 | % If there is a `tufte-book-local.sty' file, load it. 72 | 73 | \IfFileExists{tufte-book-local.tex} 74 | {\input{tufte-book-local} 75 | \TufteInfoNL{Loading tufte-book-local.tex}} 76 | {} 77 | 78 | %% 79 | % End of file 80 | \endinput 81 | -------------------------------------------------------------------------------- /2021/problem-set/hw14-subgroup/tufte-handout.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-handout}[2009/12/11 v3.5.0 Tufte-handout class] 4 | 5 | %% 6 | % Declare we're tufte-handout 7 | \newcommand{\@tufte@class}{article}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-handout}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any handout-specific stuff now 17 | 18 | %% 19 | % Abstract 20 | 21 | % TODO The abstract should be printed on its own page of the `titlepage' 22 | % option was specified. 23 | \renewenvironment{abstract} 24 | {\begin{quotation}\if@tufte@sfsidenotes\begin{sffamily}\fi} 25 | {\if@tufte@sfsidenotes\end{sffamily}\fi\end{quotation}} 26 | 27 | 28 | %% 29 | % If there is a `tufte-handout-local.tex' file, load it. 30 | 31 | \IfFileExists{tufte-handout-local.tex} 32 | {\input{tufte-handout-local} 33 | \TufteInfoNL{Loading tufte-handout-local.tex}} 34 | {} 35 | 36 | 37 | %% 38 | % End of file 39 | \endinput 40 | -------------------------------------------------------------------------------- /2021/problem-set/hw14-subgroup/tufte-preamble.tex: -------------------------------------------------------------------------------- 1 | % \geometry{showframe}% for debugging purposes -- displays the margins 2 | 3 | % Set up the images/graphics package 4 | \usepackage{graphicx} 5 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} 6 | % \graphicspath{{figs/}} 7 | 8 | % The following package makes prettier tables. We're all about the bling! 9 | \usepackage{booktabs} 10 | 11 | % The units package provides nice, non-stacked fractions and better spacing for units. 12 | \usepackage{units} 13 | 14 | % Small sections of multiple columns 15 | \usepackage{multicol} 16 | 17 | % Provides paragraphs of dummy text 18 | \usepackage{lipsum} 19 | 20 | % These commands are used to pretty-print LaTeX commands 21 | \newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically 22 | \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument 23 | \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument 24 | \newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment 25 | \newcommand{\docenv}[1]{\textsf{#1}}% environment name 26 | \newcommand{\docpkg}[1]{\texttt{#1}}% package name 27 | \newcommand{\doccls}[1]{\texttt{#1}}% document class name 28 | \newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name 29 | -------------------------------------------------------------------------------- /2021/problem-set/hw2-predicate-logic/README.md: -------------------------------------------------------------------------------- 1 | # README.md -------------------------------------------------------------------------------- /2021/problem-set/hw2-predicate-logic/hw2-predicate-logic.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/problem-set/hw2-predicate-logic/hw2-predicate-logic.pdf -------------------------------------------------------------------------------- /2021/problem-set/hw2-predicate-logic/tufte-book.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-book}[2009/12/11 v3.5.0 Tufte-book class] 4 | 5 | %% 6 | % Declare we're tufte-book 7 | \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any book-specific stuff now 17 | 18 | %% 19 | % The front matter in Tufte's /Beautiful Evidence/ contains everything up 20 | % to the opening page of Chapter 1. The running heads, when they appear, 21 | % contain only the (arabic) page number in the outside corner. 22 | %\newif\if@mainmatter \@mainmattertrue 23 | \renewcommand\frontmatter{% 24 | \cleardoublepage% 25 | \@mainmatterfalse% 26 | \pagenumbering{arabic}% 27 | %\pagestyle{plain}% 28 | \fancyhf{}% 29 | \ifthenelse{\boolean{@tufte@twoside}}% 30 | {\fancyhead[LE,RO]{\thepage}}% 31 | {\fancyhead[RE,RO]{\thepage}}% 32 | } 33 | 34 | 35 | %% 36 | % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page 37 | % numbering---it continues where it left off in the front matter. 38 | \renewcommand\mainmatter{% 39 | \cleardoublepage% 40 | \@mainmattertrue% 41 | \fancyhf{}% 42 | \ifthenelse{\boolean{@tufte@twoside}}% 43 | {% two-side 44 | \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% 45 | \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title 46 | \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title 47 | }% 48 | {% one-side 49 | \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title 50 | }% 51 | } 52 | 53 | 54 | %% 55 | % The back matter contains appendices, indices, glossaries, endnotes, 56 | % biliographies, list of contributors, illustration credits, etc. 57 | \renewcommand\backmatter{% 58 | \if@openright% 59 | \cleardoublepage% 60 | \else% 61 | \clearpage% 62 | \fi% 63 | \@mainmatterfalse% 64 | } 65 | 66 | %% 67 | % Only show the chapter titles in the table of contents 68 | \setcounter{tocdepth}{0} 69 | 70 | %% 71 | % If there is a `tufte-book-local.sty' file, load it. 72 | 73 | \IfFileExists{tufte-book-local.tex} 74 | {\input{tufte-book-local} 75 | \TufteInfoNL{Loading tufte-book-local.tex}} 76 | {} 77 | 78 | %% 79 | % End of file 80 | \endinput 81 | -------------------------------------------------------------------------------- /2021/problem-set/hw2-predicate-logic/tufte-handout.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-handout}[2009/12/11 v3.5.0 Tufte-handout class] 4 | 5 | %% 6 | % Declare we're tufte-handout 7 | \newcommand{\@tufte@class}{article}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-handout}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any handout-specific stuff now 17 | 18 | %% 19 | % Abstract 20 | 21 | % TODO The abstract should be printed on its own page of the `titlepage' 22 | % option was specified. 23 | \renewenvironment{abstract} 24 | {\begin{quotation}\if@tufte@sfsidenotes\begin{sffamily}\fi} 25 | {\if@tufte@sfsidenotes\end{sffamily}\fi\end{quotation}} 26 | 27 | 28 | %% 29 | % If there is a `tufte-handout-local.tex' file, load it. 30 | 31 | \IfFileExists{tufte-handout-local.tex} 32 | {\input{tufte-handout-local} 33 | \TufteInfoNL{Loading tufte-handout-local.tex}} 34 | {} 35 | 36 | 37 | %% 38 | % End of file 39 | \endinput 40 | -------------------------------------------------------------------------------- /2021/problem-set/hw2-predicate-logic/tufte-preamble.tex: -------------------------------------------------------------------------------- 1 | % \geometry{showframe}% for debugging purposes -- displays the margins 2 | 3 | % Set up the images/graphics package 4 | \usepackage{graphicx} 5 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} 6 | % \graphicspath{{figs/}} 7 | 8 | % The following package makes prettier tables. We're all about the bling! 9 | \usepackage{booktabs} 10 | 11 | % The units package provides nice, non-stacked fractions and better spacing for units. 12 | \usepackage{units} 13 | 14 | % Small sections of multiple columns 15 | \usepackage{multicol} 16 | 17 | % Provides paragraphs of dummy text 18 | \usepackage{lipsum} 19 | 20 | % These commands are used to pretty-print LaTeX commands 21 | \newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically 22 | \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument 23 | \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument 24 | \newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment 25 | \newcommand{\docenv}[1]{\textsf{#1}}% environment name 26 | \newcommand{\docpkg}[1]{\texttt{#1}}% package name 27 | \newcommand{\doccls}[1]{\texttt{#1}}% document class name 28 | \newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name 29 | -------------------------------------------------------------------------------- /2021/problem-set/hw3-induction/README.md: -------------------------------------------------------------------------------- 1 | # README.md -------------------------------------------------------------------------------- /2021/problem-set/hw3-induction/hw3-induction.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/problem-set/hw3-induction/hw3-induction.pdf -------------------------------------------------------------------------------- /2021/problem-set/hw3-induction/hw3-induction.tex: -------------------------------------------------------------------------------- 1 | % hw3-induction.tex 2 | 3 | % !TEX program = xelatex 4 | %%%%%%%%%%%%%%%%%%%% 5 | % see http://mirrors.concertpass.com/tex-archive/macros/latex/contrib/tufte-latex/sample-handout.pdf 6 | % for how to use tufte-handout 7 | \documentclass[a4paper, justified]{tufte-handout} 8 | 9 | \input{hw-preamble} % feel free to modify this file if you understand LaTeX well 10 | %%%%%%%%%%%%%%%%%%%% 11 | \title{3. 数学归纳法 (3-induction)} 12 | \me{魏恒峰}{hfwei@nju.edu.cn}{}{} 13 | \date{2021年3月25日} 14 | %%%%%%%%%%%%%%%%%%%% 15 | \begin{document} 16 | \maketitle 17 | %%%%%%%%%%%%%%%%%%%% 18 | \noplagiarism % PLEASE DON'T DELETE THIS LINE! 19 | %%%%%%%%%%%%%%%%%%%% 20 | \begin{abstract} 21 | % \mfigcap{width = 0.85\textwidth}{figs/George-Boole}{George Boole} 22 | % \begin{center}{\fcolorbox{blue}{yellow!60}{\parbox{0.65\textwidth}{\large 23 | % \begin{itemize} 24 | % \item 25 | % \end{itemize}}}} 26 | % \end{center} 27 | \end{abstract} 28 | %%%%%%%%%%%%%%%%%%%% 29 | \beginrequired 30 | %%%%%%%%%%%%%%% 31 | 32 | %%%%%%%%%%%%%%% 33 | \begin{problem}[相识关系 \score{4} $\star\star$] 34 | 假设有 $2n + 1$ 个人。 35 | 对于任意 $n$ 个人构成的一个小组, 36 | 都存在一个人(不属于这个小组)与这 $n$ 个人都相识 (假设 ``相识''是相互的)。 37 | 38 | \noindent 请证明, 存在一个人, 他/她认识其它所有 $2n$ 个人。 39 | \end{problem} 40 | 41 | \begin{proof} 42 | \end{proof} 43 | %%%%%%%%%%%%%%% 44 | 45 | %%%%%%%%%%%%%%% 46 | \begin{problem}[邮资问题 \score{6} $\star\star$] 47 | 请证明, 只用4分与5分邮票, 就可以组成12分及以上的每种邮资。 48 | 49 | \noindent (或者: 每个不小于12的整数都可以写成若干个4或5的和。) 50 | \end{problem} 51 | 52 | \begin{proof} 53 | \end{proof} 54 | %%%%%%%%%%%%%%% 55 | 56 | %%%%%%%%%%%%%%% 57 | \begin{problem}[结合律 \score{4} $\star\star$] 58 | 设 $\ast$ 是一个满足结合律的二元运算符, 即 59 | \[ 60 | (a \ast b) \ast c = a \ast (b \ast c). 61 | \] 62 | 请证明, $a_{1} \ast a_{2} \ast \dots \ast a_{n}\; (n \ge 3)$ 63 | 的值与括号的使用方式无关。 64 | \end{problem} 65 | 66 | \begin{proof} 67 | \end{proof} 68 | %%%%%%%%%%%%%%% 69 | 70 | %%%%%%%%%%%%%%% 71 | \begin{problem}[数数 \score{6} $\star\star\star$] 72 | 令 $T_{n}$ 表示相邻位数字不相同的 $n$ 位数的个数, 73 | $E_{n}$ 表示相邻位数字不相同的 $n$ 位数偶数的个数, 74 | $O_{n}$ 表示相邻位数字不相同的 $n$ 位数奇数的个数。 75 | 76 | \noindent 规定: 以上所有的 $n$ 位数仅考虑不以0开头的数字。 77 | 例如, $E_{1} = 4$。 78 | 79 | \noindent 请给出 $T_{n}, E_{n}, O_{n}$ 的计算公式。 80 | \end{problem} 81 | 82 | \begin{solution} 83 | \end{solution} 84 | %%%%%%%%%%%%%%% 85 | 86 | %%%%%%%%%%%%%%%%%%%% 87 | % 如果没有需要订正的题目,可以把这部分删掉 88 | 89 | \begincorrection 90 | %%%%%%%%%%%%%%%%%%%% 91 | 92 | %%%%%%%%%%%%%%%%%%%% 93 | % 如果没有反馈,可以把这部分删掉 94 | \beginfb 95 | 96 | 你可以写 (也可以发邮件或者使用``教学立方'') 97 | \begin{itemize} 98 | \item 对课程及教师的建议与意见 99 | \item 教材中不理解的内容 100 | \item 希望深入了解的内容 101 | \item $\cdots$ 102 | \end{itemize} 103 | %%%%%%%%%%%%%%%%%%%% 104 | \end{document} -------------------------------------------------------------------------------- /2021/problem-set/hw3-induction/tufte-book.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-book}[2009/12/11 v3.5.0 Tufte-book class] 4 | 5 | %% 6 | % Declare we're tufte-book 7 | \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any book-specific stuff now 17 | 18 | %% 19 | % The front matter in Tufte's /Beautiful Evidence/ contains everything up 20 | % to the opening page of Chapter 1. The running heads, when they appear, 21 | % contain only the (arabic) page number in the outside corner. 22 | %\newif\if@mainmatter \@mainmattertrue 23 | \renewcommand\frontmatter{% 24 | \cleardoublepage% 25 | \@mainmatterfalse% 26 | \pagenumbering{arabic}% 27 | %\pagestyle{plain}% 28 | \fancyhf{}% 29 | \ifthenelse{\boolean{@tufte@twoside}}% 30 | {\fancyhead[LE,RO]{\thepage}}% 31 | {\fancyhead[RE,RO]{\thepage}}% 32 | } 33 | 34 | 35 | %% 36 | % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page 37 | % numbering---it continues where it left off in the front matter. 38 | \renewcommand\mainmatter{% 39 | \cleardoublepage% 40 | \@mainmattertrue% 41 | \fancyhf{}% 42 | \ifthenelse{\boolean{@tufte@twoside}}% 43 | {% two-side 44 | \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% 45 | \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title 46 | \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title 47 | }% 48 | {% one-side 49 | \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title 50 | }% 51 | } 52 | 53 | 54 | %% 55 | % The back matter contains appendices, indices, glossaries, endnotes, 56 | % biliographies, list of contributors, illustration credits, etc. 57 | \renewcommand\backmatter{% 58 | \if@openright% 59 | \cleardoublepage% 60 | \else% 61 | \clearpage% 62 | \fi% 63 | \@mainmatterfalse% 64 | } 65 | 66 | %% 67 | % Only show the chapter titles in the table of contents 68 | \setcounter{tocdepth}{0} 69 | 70 | %% 71 | % If there is a `tufte-book-local.sty' file, load it. 72 | 73 | \IfFileExists{tufte-book-local.tex} 74 | {\input{tufte-book-local} 75 | \TufteInfoNL{Loading tufte-book-local.tex}} 76 | {} 77 | 78 | %% 79 | % End of file 80 | \endinput 81 | -------------------------------------------------------------------------------- /2021/problem-set/hw3-induction/tufte-handout.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-handout}[2009/12/11 v3.5.0 Tufte-handout class] 4 | 5 | %% 6 | % Declare we're tufte-handout 7 | \newcommand{\@tufte@class}{article}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-handout}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any handout-specific stuff now 17 | 18 | %% 19 | % Abstract 20 | 21 | % TODO The abstract should be printed on its own page of the `titlepage' 22 | % option was specified. 23 | \renewenvironment{abstract} 24 | {\begin{quotation}\if@tufte@sfsidenotes\begin{sffamily}\fi} 25 | {\if@tufte@sfsidenotes\end{sffamily}\fi\end{quotation}} 26 | 27 | 28 | %% 29 | % If there is a `tufte-handout-local.tex' file, load it. 30 | 31 | \IfFileExists{tufte-handout-local.tex} 32 | {\input{tufte-handout-local} 33 | \TufteInfoNL{Loading tufte-handout-local.tex}} 34 | {} 35 | 36 | 37 | %% 38 | % End of file 39 | \endinput 40 | -------------------------------------------------------------------------------- /2021/problem-set/hw3-induction/tufte-preamble.tex: -------------------------------------------------------------------------------- 1 | % \geometry{showframe}% for debugging purposes -- displays the margins 2 | 3 | % Set up the images/graphics package 4 | \usepackage{graphicx} 5 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} 6 | % \graphicspath{{figs/}} 7 | 8 | % The following package makes prettier tables. We're all about the bling! 9 | \usepackage{booktabs} 10 | 11 | % The units package provides nice, non-stacked fractions and better spacing for units. 12 | \usepackage{units} 13 | 14 | % Small sections of multiple columns 15 | \usepackage{multicol} 16 | 17 | % Provides paragraphs of dummy text 18 | \usepackage{lipsum} 19 | 20 | % These commands are used to pretty-print LaTeX commands 21 | \newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically 22 | \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument 23 | \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument 24 | \newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment 25 | \newcommand{\docenv}[1]{\textsf{#1}}% environment name 26 | \newcommand{\docpkg}[1]{\texttt{#1}}% package name 27 | \newcommand{\doccls}[1]{\texttt{#1}}% document class name 28 | \newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name 29 | -------------------------------------------------------------------------------- /2021/problem-set/hw4-set/README.md: -------------------------------------------------------------------------------- 1 | # README.md -------------------------------------------------------------------------------- /2021/problem-set/hw4-set/hw4-set.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/problem-set/hw4-set/hw4-set.pdf -------------------------------------------------------------------------------- /2021/problem-set/hw4-set/hw4-set.tex: -------------------------------------------------------------------------------- 1 | % hw4-set.tex 2 | 3 | % !TEX program = xelatex 4 | %%%%%%%%%%%%%%%%%%%% 5 | % see http://mirrors.concertpass.com/tex-archive/macros/latex/contrib/tufte-latex/sample-handout.pdf 6 | % for how to use tufte-handout 7 | \documentclass[a4paper, justified]{tufte-handout} 8 | 9 | \input{hw-preamble} % feel free to modify this file if you understand LaTeX well 10 | %%%%%%%%%%%%%%%%%%%% 11 | \title{4. 集合: 基本概念与运算 (4-set)} 12 | \me{魏恒峰}{hfwei@nju.edu.cn}{}{} 13 | \date{2021年4月01日} 14 | %%%%%%%%%%%%%%%%%%%% 15 | \begin{document} 16 | \maketitle 17 | %%%%%%%%%%%%%%%%%%%% 18 | \noplagiarism % PLEASE DON'T DELETE THIS LINE! 19 | %%%%%%%%%%%%%%%%%%%% 20 | \begin{abstract} 21 | % \mfigcap{width = 0.85\textwidth}{figs/George-Boole}{George Boole} 22 | % \begin{center}{\fcolorbox{blue}{yellow!60}{\parbox{0.65\textwidth}{\large 23 | % \begin{itemize} 24 | % \item 25 | % \end{itemize}}}} 26 | % \end{center} 27 | \end{abstract} 28 | %%%%%%%%%%%%%%%%%%%% 29 | \beginrequired 30 | %%%%%%%%%%%%%%% 31 | 32 | %%%%%%%%%%%%%%% 33 | \begin{problem}[相对补与绝对补 \score{5} $\star\star$] 34 | 请证明, 35 | \[ 36 | A \cap (B \setminus C) = (A \cap B) \setminus C 37 | = (A \cap B) \setminus (A \cap C). 38 | \] 39 | \end{problem} 40 | 41 | \begin{proof} 42 | \end{proof} 43 | %%%%%%%%%%%%%%% 44 | 45 | %%%%%%%%%%%%%%% 46 | \begin{problem}[对称差 \score{4} $\star\star$] 47 | 请证明, 48 | \[ 49 | A \cap (B \oplus C) = (A \cap B) \oplus (A \cap C). 50 | \] 51 | \end{problem} 52 | 53 | \begin{proof} 54 | \end{proof} 55 | %%%%%%%%%%%%%%% 56 | 57 | %%%%%%%%%%%%%%% 58 | \begin{problem}[广义并、广义交 \score{4} $\star\star$] 59 | 请证明, 60 | \[ 61 | \mathcal{F} \cap \mathcal{G} \neq \emptyset \implies 62 | \bigcap \mathcal{F} \cap \bigcap \mathcal{G} \subseteq \bigcap (\mathcal{F} \cap \mathcal{G}). 63 | \] 64 | 并举例说明, $\subseteq$ 不能换成 $=$。 65 | \end{problem} 66 | 67 | \begin{proof} 68 | \end{proof} 69 | %%%%%%%%%%%%%%% 70 | 71 | %%%%%%%%%%%%%%% 72 | \begin{problem}[广义并、广义交、德摩根律 \score{3} $\star\star\star$] 73 | 请化简集合 $A$: 74 | \[ 75 | A = \mathbb{R} \setminus \bigcap_{n \in \mathbb{Z}^{+}} (\mathbb{R} \setminus \set{-n, -n+1, \cdots, 0, \cdots, n-1, n}) 76 | \] 77 | \end{problem} 78 | 79 | \begin{solution} 80 | \end{solution} 81 | %%%%%%%%%%%%%%% 82 | 83 | %%%%%%%%%%%%%%% 84 | \begin{problem}[幂集 \score{4} $\star\star\star$] 85 | 请证明,~\footnote{不, 我有``幂集''恐惧症。} 86 | \[ 87 | \ps{A} = \ps{B} \iff A = B. 88 | \] 89 | \end{problem} 90 | 91 | \begin{solution} 92 | \end{solution} 93 | %%%%%%%%%%%%%%% 94 | 95 | %%%%%%%%%%%%%%%%%%%% 96 | % 如果没有需要订正的题目,可以把这部分删掉 97 | 98 | \begincorrection 99 | %%%%%%%%%%%%%%%%%%%% 100 | 101 | %%%%%%%%%%%%%%%%%%%% 102 | % 如果没有反馈,可以把这部分删掉 103 | \beginfb 104 | 105 | 你可以写 (也可以发邮件或者使用``教学立方'') 106 | \begin{itemize} 107 | \item 对课程及教师的建议与意见 108 | \item 教材中不理解的内容 109 | \item 希望深入了解的内容 110 | \item $\cdots$ 111 | \end{itemize} 112 | %%%%%%%%%%%%%%%%%%%% 113 | \end{document} -------------------------------------------------------------------------------- /2021/problem-set/hw4-set/tufte-book.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-book}[2009/12/11 v3.5.0 Tufte-book class] 4 | 5 | %% 6 | % Declare we're tufte-book 7 | \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any book-specific stuff now 17 | 18 | %% 19 | % The front matter in Tufte's /Beautiful Evidence/ contains everything up 20 | % to the opening page of Chapter 1. The running heads, when they appear, 21 | % contain only the (arabic) page number in the outside corner. 22 | %\newif\if@mainmatter \@mainmattertrue 23 | \renewcommand\frontmatter{% 24 | \cleardoublepage% 25 | \@mainmatterfalse% 26 | \pagenumbering{arabic}% 27 | %\pagestyle{plain}% 28 | \fancyhf{}% 29 | \ifthenelse{\boolean{@tufte@twoside}}% 30 | {\fancyhead[LE,RO]{\thepage}}% 31 | {\fancyhead[RE,RO]{\thepage}}% 32 | } 33 | 34 | 35 | %% 36 | % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page 37 | % numbering---it continues where it left off in the front matter. 38 | \renewcommand\mainmatter{% 39 | \cleardoublepage% 40 | \@mainmattertrue% 41 | \fancyhf{}% 42 | \ifthenelse{\boolean{@tufte@twoside}}% 43 | {% two-side 44 | \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% 45 | \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title 46 | \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title 47 | }% 48 | {% one-side 49 | \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title 50 | }% 51 | } 52 | 53 | 54 | %% 55 | % The back matter contains appendices, indices, glossaries, endnotes, 56 | % biliographies, list of contributors, illustration credits, etc. 57 | \renewcommand\backmatter{% 58 | \if@openright% 59 | \cleardoublepage% 60 | \else% 61 | \clearpage% 62 | \fi% 63 | \@mainmatterfalse% 64 | } 65 | 66 | %% 67 | % Only show the chapter titles in the table of contents 68 | \setcounter{tocdepth}{0} 69 | 70 | %% 71 | % If there is a `tufte-book-local.sty' file, load it. 72 | 73 | \IfFileExists{tufte-book-local.tex} 74 | {\input{tufte-book-local} 75 | \TufteInfoNL{Loading tufte-book-local.tex}} 76 | {} 77 | 78 | %% 79 | % End of file 80 | \endinput 81 | -------------------------------------------------------------------------------- /2021/problem-set/hw4-set/tufte-handout.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-handout}[2009/12/11 v3.5.0 Tufte-handout class] 4 | 5 | %% 6 | % Declare we're tufte-handout 7 | \newcommand{\@tufte@class}{article}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-handout}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any handout-specific stuff now 17 | 18 | %% 19 | % Abstract 20 | 21 | % TODO The abstract should be printed on its own page of the `titlepage' 22 | % option was specified. 23 | \renewenvironment{abstract} 24 | {\begin{quotation}\if@tufte@sfsidenotes\begin{sffamily}\fi} 25 | {\if@tufte@sfsidenotes\end{sffamily}\fi\end{quotation}} 26 | 27 | 28 | %% 29 | % If there is a `tufte-handout-local.tex' file, load it. 30 | 31 | \IfFileExists{tufte-handout-local.tex} 32 | {\input{tufte-handout-local} 33 | \TufteInfoNL{Loading tufte-handout-local.tex}} 34 | {} 35 | 36 | 37 | %% 38 | % End of file 39 | \endinput 40 | -------------------------------------------------------------------------------- /2021/problem-set/hw4-set/tufte-preamble.tex: -------------------------------------------------------------------------------- 1 | % \geometry{showframe}% for debugging purposes -- displays the margins 2 | 3 | % Set up the images/graphics package 4 | \usepackage{graphicx} 5 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} 6 | % \graphicspath{{figs/}} 7 | 8 | % The following package makes prettier tables. We're all about the bling! 9 | \usepackage{booktabs} 10 | 11 | % The units package provides nice, non-stacked fractions and better spacing for units. 12 | \usepackage{units} 13 | 14 | % Small sections of multiple columns 15 | \usepackage{multicol} 16 | 17 | % Provides paragraphs of dummy text 18 | \usepackage{lipsum} 19 | 20 | % These commands are used to pretty-print LaTeX commands 21 | \newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically 22 | \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument 23 | \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument 24 | \newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment 25 | \newcommand{\docenv}[1]{\textsf{#1}}% environment name 26 | \newcommand{\docpkg}[1]{\texttt{#1}}% package name 27 | \newcommand{\doccls}[1]{\texttt{#1}}% document class name 28 | \newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name 29 | -------------------------------------------------------------------------------- /2021/problem-set/hw5-relation/README.md: -------------------------------------------------------------------------------- 1 | # README.md -------------------------------------------------------------------------------- /2021/problem-set/hw5-relation/hw5-relation.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/problem-set/hw5-relation/hw5-relation.pdf -------------------------------------------------------------------------------- /2021/problem-set/hw5-relation/hw5-relation.tex: -------------------------------------------------------------------------------- 1 | % hw5-relation.tex 2 | 3 | % !TEX program = xelatex 4 | %%%%%%%%%%%%%%%%%%%% 5 | % see http://mirrors.concertpass.com/tex-archive/macros/latex/contrib/tufte-latex/sample-handout.pdf 6 | % for how to use tufte-handout 7 | \documentclass[a4paper, justified]{tufte-handout} 8 | 9 | \input{hw-preamble} % feel free to modify this file if you understand LaTeX well 10 | %%%%%%%%%%%%%%%%%%%% 11 | \title{5. 集合: 关系 (5-relation)} 12 | \me{魏恒峰}{hfwei@nju.edu.cn}{}{} 13 | \date{2021年4月08日} 14 | %%%%%%%%%%%%%%%%%%%% 15 | \begin{document} 16 | \maketitle 17 | %%%%%%%%%%%%%%%%%%%% 18 | \noplagiarism % PLEASE DON'T DELETE THIS LINE! 19 | %%%%%%%%%%%%%%%%%%%% 20 | \begin{abstract} 21 | % \mfigcap{width = 0.85\textwidth}{figs/George-Boole}{George Boole} 22 | % \begin{center}{\fcolorbox{blue}{yellow!60}{\parbox{0.65\textwidth}{\large 23 | % \begin{itemize} 24 | % \item 25 | % \end{itemize}}}} 26 | % \end{center} 27 | \end{abstract} 28 | %%%%%%%%%%%%%%%%%%%% 29 | \beginrequired 30 | %%%%%%%%%%%%%%% 31 | 32 | %%%%%%%%%%%%%%% 33 | \begin{problem}[笛卡尔积 \score{3} $\star\star$] 34 | 设 $C \neq \emptyset$, 请证明 35 | \[ 36 | A \subseteq B \iff A \times C \subseteq B \times C. 37 | \] 38 | \end{problem} 39 | 40 | \begin{proof} 41 | \end{proof} 42 | %%%%%%%%%%%%%%% 43 | 44 | %%%%%%%%%%%%%%% 45 | \begin{problem}[关系的运算 \score{4} $\star\star$] 46 | 请证明, 47 | \[ 48 | R[X_1 \setminus X_2] \supseteq R[X_1] \setminus R[X_2]. 49 | \] 50 | 请举例说明 $\supseteq$ 不能替换成 $=$。 51 | \end{problem} 52 | 53 | \begin{proof} 54 | \end{proof} 55 | %%%%%%%%%%%%%%% 56 | 57 | %%%%%%%%%%%%%%% 58 | \begin{problem}[关系的运算 \score{4} $\star\star$] 59 | 请证明, 60 | \[ 61 | (X \cap Y) \circ Z \subseteq (X \circ Z) \cap (Y \circ Z). 62 | \] 63 | 请举例说明, $\subseteq$ 不能换成 $=$。 64 | \end{problem} 65 | 66 | \begin{proof} 67 | \end{proof} 68 | %%%%%%%%%%%%%%% 69 | 70 | %%%%%%%%%%%%%%% 71 | \begin{problem}[关系的性质 \score{4} $\star\star$] 72 | 请证明, 73 | \[ 74 | R \text{ 是对称且传递的 } \iff R = R^{-1} \circ R 75 | \] 76 | \end{problem} 77 | 78 | \begin{proof} 79 | \end{proof} 80 | %%%%%%%%%%%%%%% 81 | 82 | %%%%%%%%%%%%%%% 83 | \begin{problem}[等价关系 \score{5} $\star\star\star$] 84 | 一个自反且传递的二元关系 $R \subseteq X \times X$ 85 | 称为 $X$ 上的拟序。 86 | 现令 $\preceq\; \subseteq X \times X$ 为拟序。 87 | 如下定义 $X$ 上的关系 $\sim$: 88 | \[ 89 | x \sim y \iff x \preceq y \land y \preceq x, 90 | \] 91 | 请证明, $\sim$ 是 $X$ 上的等价关系。 92 | \end{problem} 93 | 94 | \begin{solution} 95 | \end{solution} 96 | %%%%%%%%%%%%%%% 97 | %%%%%%%%%%%%%%%%%%%% 98 | % 如果没有需要订正的题目,可以把这部分删掉 99 | 100 | \begincorrection 101 | %%%%%%%%%%%%%%%%%%%% 102 | 103 | %%%%%%%%%%%%%%%%%%%% 104 | % 如果没有反馈,可以把这部分删掉 105 | \beginfb 106 | 107 | 你可以写 (也可以发邮件或者使用``教学立方'') 108 | \begin{itemize} 109 | \item 对课程及教师的建议与意见 110 | \item 教材中不理解的内容 111 | \item 希望深入了解的内容 112 | \item $\cdots$ 113 | \end{itemize} 114 | %%%%%%%%%%%%%%%%%%%% 115 | \end{document} -------------------------------------------------------------------------------- /2021/problem-set/hw5-relation/tufte-book.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-book}[2009/12/11 v3.5.0 Tufte-book class] 4 | 5 | %% 6 | % Declare we're tufte-book 7 | \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any book-specific stuff now 17 | 18 | %% 19 | % The front matter in Tufte's /Beautiful Evidence/ contains everything up 20 | % to the opening page of Chapter 1. The running heads, when they appear, 21 | % contain only the (arabic) page number in the outside corner. 22 | %\newif\if@mainmatter \@mainmattertrue 23 | \renewcommand\frontmatter{% 24 | \cleardoublepage% 25 | \@mainmatterfalse% 26 | \pagenumbering{arabic}% 27 | %\pagestyle{plain}% 28 | \fancyhf{}% 29 | \ifthenelse{\boolean{@tufte@twoside}}% 30 | {\fancyhead[LE,RO]{\thepage}}% 31 | {\fancyhead[RE,RO]{\thepage}}% 32 | } 33 | 34 | 35 | %% 36 | % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page 37 | % numbering---it continues where it left off in the front matter. 38 | \renewcommand\mainmatter{% 39 | \cleardoublepage% 40 | \@mainmattertrue% 41 | \fancyhf{}% 42 | \ifthenelse{\boolean{@tufte@twoside}}% 43 | {% two-side 44 | \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% 45 | \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title 46 | \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title 47 | }% 48 | {% one-side 49 | \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title 50 | }% 51 | } 52 | 53 | 54 | %% 55 | % The back matter contains appendices, indices, glossaries, endnotes, 56 | % biliographies, list of contributors, illustration credits, etc. 57 | \renewcommand\backmatter{% 58 | \if@openright% 59 | \cleardoublepage% 60 | \else% 61 | \clearpage% 62 | \fi% 63 | \@mainmatterfalse% 64 | } 65 | 66 | %% 67 | % Only show the chapter titles in the table of contents 68 | \setcounter{tocdepth}{0} 69 | 70 | %% 71 | % If there is a `tufte-book-local.sty' file, load it. 72 | 73 | \IfFileExists{tufte-book-local.tex} 74 | {\input{tufte-book-local} 75 | \TufteInfoNL{Loading tufte-book-local.tex}} 76 | {} 77 | 78 | %% 79 | % End of file 80 | \endinput 81 | -------------------------------------------------------------------------------- /2021/problem-set/hw5-relation/tufte-handout.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-handout}[2009/12/11 v3.5.0 Tufte-handout class] 4 | 5 | %% 6 | % Declare we're tufte-handout 7 | \newcommand{\@tufte@class}{article}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-handout}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any handout-specific stuff now 17 | 18 | %% 19 | % Abstract 20 | 21 | % TODO The abstract should be printed on its own page of the `titlepage' 22 | % option was specified. 23 | \renewenvironment{abstract} 24 | {\begin{quotation}\if@tufte@sfsidenotes\begin{sffamily}\fi} 25 | {\if@tufte@sfsidenotes\end{sffamily}\fi\end{quotation}} 26 | 27 | 28 | %% 29 | % If there is a `tufte-handout-local.tex' file, load it. 30 | 31 | \IfFileExists{tufte-handout-local.tex} 32 | {\input{tufte-handout-local} 33 | \TufteInfoNL{Loading tufte-handout-local.tex}} 34 | {} 35 | 36 | 37 | %% 38 | % End of file 39 | \endinput 40 | -------------------------------------------------------------------------------- /2021/problem-set/hw5-relation/tufte-preamble.tex: -------------------------------------------------------------------------------- 1 | % \geometry{showframe}% for debugging purposes -- displays the margins 2 | 3 | % Set up the images/graphics package 4 | \usepackage{graphicx} 5 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} 6 | % \graphicspath{{figs/}} 7 | 8 | % The following package makes prettier tables. We're all about the bling! 9 | \usepackage{booktabs} 10 | 11 | % The units package provides nice, non-stacked fractions and better spacing for units. 12 | \usepackage{units} 13 | 14 | % Small sections of multiple columns 15 | \usepackage{multicol} 16 | 17 | % Provides paragraphs of dummy text 18 | \usepackage{lipsum} 19 | 20 | % These commands are used to pretty-print LaTeX commands 21 | \newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically 22 | \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument 23 | \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument 24 | \newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment 25 | \newcommand{\docenv}[1]{\textsf{#1}}% environment name 26 | \newcommand{\docpkg}[1]{\texttt{#1}}% package name 27 | \newcommand{\doccls}[1]{\texttt{#1}}% document class name 28 | \newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name 29 | -------------------------------------------------------------------------------- /2021/problem-set/hw6-function/README.md: -------------------------------------------------------------------------------- 1 | # README.md -------------------------------------------------------------------------------- /2021/problem-set/hw6-function/hw6-function.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/problem-set/hw6-function/hw6-function.pdf -------------------------------------------------------------------------------- /2021/problem-set/hw6-function/hw6-function.tex: -------------------------------------------------------------------------------- 1 | % hw6-function.tex 2 | 3 | % !TEX program = xelatex 4 | %%%%%%%%%%%%%%%%%%%% 5 | % see http://mirrors.concertpass.com/tex-archive/macros/latex/contrib/tufte-latex/sample-handout.pdf 6 | % for how to use tufte-handout 7 | \documentclass[a4paper, justified]{tufte-handout} 8 | 9 | \input{hw-preamble} % feel free to modify this file if you understand LaTeX well 10 | %%%%%%%%%%%%%%%%%%%% 11 | \title{6. 集合: 函数 (6-function)} 12 | \me{魏恒峰}{hfwei@nju.edu.cn}{}{} 13 | \date{2021年4月15日} 14 | %%%%%%%%%%%%%%%%%%%% 15 | \begin{document} 16 | \maketitle 17 | %%%%%%%%%%%%%%%%%%%% 18 | \noplagiarism % PLEASE DON'T DELETE THIS LINE! 19 | %%%%%%%%%%%%%%%%%%%% 20 | \begin{abstract} 21 | % \mfigcap{width = 0.85\textwidth}{figs/George-Boole}{George Boole} 22 | % \begin{center}{\fcolorbox{blue}{yellow!60}{\parbox{0.65\textwidth}{\large 23 | % \begin{itemize} 24 | % \item 25 | % \end{itemize}}}} 26 | % \end{center} 27 | \end{abstract} 28 | %%%%%%%%%%%%%%%%%%%% 29 | \beginrequired 30 | %%%%%%%%%%%%%%% 31 | 32 | %%%%%%%%%%%%%%% 33 | \begin{problem}[等价关系 \score{3} $\star\star$] 34 | 设 $R$ 是 $X$ 上的等价关系。请证明, 35 | \[ 36 | \forall a, b \in X.\; ([a]_{R} = [b]_{R} \leftrightarrow a R b). 37 | \] 38 | \end{problem} 39 | 40 | \begin{proof} 41 | \end{proof} 42 | %%%%%%%%%%%%%%% 43 | 44 | %%%%%%%%%%%%%%% 45 | \begin{problem}[函数与等价关系 \score{7 = 3 + 4} $\star\star\star$] 46 | 设 $f: X \to Y$ 是满射。 47 | 定义 $X$ 上的二元关系 $R$ 为 $(x, y) \in R$ 当且仅当 $f(x) = f(y)$。 48 | 请证明, 49 | \begin{enumerate}[(1)] 50 | \item $R$ 是 $X$ 上的等价关系。 51 | \item 定义 $h \subseteq (X/R) \times Y$ 为 $h([x]_{R}) = f(x)$。 52 | 请证明, $h$ 是从商集 $X/R$ 到 $Y$ 的函数, 且是满射。 53 | \end{enumerate} 54 | \end{problem} 55 | 56 | \begin{proof} 57 | \end{proof} 58 | %%%%%%%%%%%%%%% 59 | %%%%%%%%%%%%%%%%%%%% 60 | % 如果没有需要订正的题目,可以把这部分删掉 61 | 62 | \begincorrection 63 | %%%%%%%%%%%%%%%%%%%% 64 | 65 | %%%%%%%%%%%%%%%%%%%% 66 | % 如果没有反馈,可以把这部分删掉 67 | \beginfb 68 | 69 | 你可以写 (也可以发邮件或者使用``教学立方'') 70 | \begin{itemize} 71 | \item 对课程及教师的建议与意见 72 | \item 教材中不理解的内容 73 | \item 希望深入了解的内容 74 | \item $\cdots$ 75 | \end{itemize} 76 | %%%%%%%%%%%%%%%%%%%% 77 | \end{document} -------------------------------------------------------------------------------- /2021/problem-set/hw6-function/tufte-book.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-book}[2009/12/11 v3.5.0 Tufte-book class] 4 | 5 | %% 6 | % Declare we're tufte-book 7 | \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any book-specific stuff now 17 | 18 | %% 19 | % The front matter in Tufte's /Beautiful Evidence/ contains everything up 20 | % to the opening page of Chapter 1. The running heads, when they appear, 21 | % contain only the (arabic) page number in the outside corner. 22 | %\newif\if@mainmatter \@mainmattertrue 23 | \renewcommand\frontmatter{% 24 | \cleardoublepage% 25 | \@mainmatterfalse% 26 | \pagenumbering{arabic}% 27 | %\pagestyle{plain}% 28 | \fancyhf{}% 29 | \ifthenelse{\boolean{@tufte@twoside}}% 30 | {\fancyhead[LE,RO]{\thepage}}% 31 | {\fancyhead[RE,RO]{\thepage}}% 32 | } 33 | 34 | 35 | %% 36 | % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page 37 | % numbering---it continues where it left off in the front matter. 38 | \renewcommand\mainmatter{% 39 | \cleardoublepage% 40 | \@mainmattertrue% 41 | \fancyhf{}% 42 | \ifthenelse{\boolean{@tufte@twoside}}% 43 | {% two-side 44 | \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% 45 | \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title 46 | \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title 47 | }% 48 | {% one-side 49 | \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title 50 | }% 51 | } 52 | 53 | 54 | %% 55 | % The back matter contains appendices, indices, glossaries, endnotes, 56 | % biliographies, list of contributors, illustration credits, etc. 57 | \renewcommand\backmatter{% 58 | \if@openright% 59 | \cleardoublepage% 60 | \else% 61 | \clearpage% 62 | \fi% 63 | \@mainmatterfalse% 64 | } 65 | 66 | %% 67 | % Only show the chapter titles in the table of contents 68 | \setcounter{tocdepth}{0} 69 | 70 | %% 71 | % If there is a `tufte-book-local.sty' file, load it. 72 | 73 | \IfFileExists{tufte-book-local.tex} 74 | {\input{tufte-book-local} 75 | \TufteInfoNL{Loading tufte-book-local.tex}} 76 | {} 77 | 78 | %% 79 | % End of file 80 | \endinput 81 | -------------------------------------------------------------------------------- /2021/problem-set/hw6-function/tufte-handout.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-handout}[2009/12/11 v3.5.0 Tufte-handout class] 4 | 5 | %% 6 | % Declare we're tufte-handout 7 | \newcommand{\@tufte@class}{article}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-handout}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any handout-specific stuff now 17 | 18 | %% 19 | % Abstract 20 | 21 | % TODO The abstract should be printed on its own page of the `titlepage' 22 | % option was specified. 23 | \renewenvironment{abstract} 24 | {\begin{quotation}\if@tufte@sfsidenotes\begin{sffamily}\fi} 25 | {\if@tufte@sfsidenotes\end{sffamily}\fi\end{quotation}} 26 | 27 | 28 | %% 29 | % If there is a `tufte-handout-local.tex' file, load it. 30 | 31 | \IfFileExists{tufte-handout-local.tex} 32 | {\input{tufte-handout-local} 33 | \TufteInfoNL{Loading tufte-handout-local.tex}} 34 | {} 35 | 36 | 37 | %% 38 | % End of file 39 | \endinput 40 | -------------------------------------------------------------------------------- /2021/problem-set/hw6-function/tufte-preamble.tex: -------------------------------------------------------------------------------- 1 | % \geometry{showframe}% for debugging purposes -- displays the margins 2 | 3 | % Set up the images/graphics package 4 | \usepackage{graphicx} 5 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} 6 | % \graphicspath{{figs/}} 7 | 8 | % The following package makes prettier tables. We're all about the bling! 9 | \usepackage{booktabs} 10 | 11 | % The units package provides nice, non-stacked fractions and better spacing for units. 12 | \usepackage{units} 13 | 14 | % Small sections of multiple columns 15 | \usepackage{multicol} 16 | 17 | % Provides paragraphs of dummy text 18 | \usepackage{lipsum} 19 | 20 | % These commands are used to pretty-print LaTeX commands 21 | \newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically 22 | \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument 23 | \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument 24 | \newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment 25 | \newcommand{\docenv}[1]{\textsf{#1}}% environment name 26 | \newcommand{\docpkg}[1]{\texttt{#1}}% package name 27 | \newcommand{\doccls}[1]{\texttt{#1}}% document class name 28 | \newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name 29 | -------------------------------------------------------------------------------- /2021/problem-set/hw7-function-ordering/README.md: -------------------------------------------------------------------------------- 1 | # README.md -------------------------------------------------------------------------------- /2021/problem-set/hw7-function-ordering/hw7-function-partial-order.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/problem-set/hw7-function-ordering/hw7-function-partial-order.pdf -------------------------------------------------------------------------------- /2021/problem-set/hw7-function-ordering/tufte-book.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-book}[2009/12/11 v3.5.0 Tufte-book class] 4 | 5 | %% 6 | % Declare we're tufte-book 7 | \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any book-specific stuff now 17 | 18 | %% 19 | % The front matter in Tufte's /Beautiful Evidence/ contains everything up 20 | % to the opening page of Chapter 1. The running heads, when they appear, 21 | % contain only the (arabic) page number in the outside corner. 22 | %\newif\if@mainmatter \@mainmattertrue 23 | \renewcommand\frontmatter{% 24 | \cleardoublepage% 25 | \@mainmatterfalse% 26 | \pagenumbering{arabic}% 27 | %\pagestyle{plain}% 28 | \fancyhf{}% 29 | \ifthenelse{\boolean{@tufte@twoside}}% 30 | {\fancyhead[LE,RO]{\thepage}}% 31 | {\fancyhead[RE,RO]{\thepage}}% 32 | } 33 | 34 | 35 | %% 36 | % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page 37 | % numbering---it continues where it left off in the front matter. 38 | \renewcommand\mainmatter{% 39 | \cleardoublepage% 40 | \@mainmattertrue% 41 | \fancyhf{}% 42 | \ifthenelse{\boolean{@tufte@twoside}}% 43 | {% two-side 44 | \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% 45 | \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title 46 | \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title 47 | }% 48 | {% one-side 49 | \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title 50 | }% 51 | } 52 | 53 | 54 | %% 55 | % The back matter contains appendices, indices, glossaries, endnotes, 56 | % biliographies, list of contributors, illustration credits, etc. 57 | \renewcommand\backmatter{% 58 | \if@openright% 59 | \cleardoublepage% 60 | \else% 61 | \clearpage% 62 | \fi% 63 | \@mainmatterfalse% 64 | } 65 | 66 | %% 67 | % Only show the chapter titles in the table of contents 68 | \setcounter{tocdepth}{0} 69 | 70 | %% 71 | % If there is a `tufte-book-local.sty' file, load it. 72 | 73 | \IfFileExists{tufte-book-local.tex} 74 | {\input{tufte-book-local} 75 | \TufteInfoNL{Loading tufte-book-local.tex}} 76 | {} 77 | 78 | %% 79 | % End of file 80 | \endinput 81 | -------------------------------------------------------------------------------- /2021/problem-set/hw7-function-ordering/tufte-handout.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-handout}[2009/12/11 v3.5.0 Tufte-handout class] 4 | 5 | %% 6 | % Declare we're tufte-handout 7 | \newcommand{\@tufte@class}{article}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-handout}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any handout-specific stuff now 17 | 18 | %% 19 | % Abstract 20 | 21 | % TODO The abstract should be printed on its own page of the `titlepage' 22 | % option was specified. 23 | \renewenvironment{abstract} 24 | {\begin{quotation}\if@tufte@sfsidenotes\begin{sffamily}\fi} 25 | {\if@tufte@sfsidenotes\end{sffamily}\fi\end{quotation}} 26 | 27 | 28 | %% 29 | % If there is a `tufte-handout-local.tex' file, load it. 30 | 31 | \IfFileExists{tufte-handout-local.tex} 32 | {\input{tufte-handout-local} 33 | \TufteInfoNL{Loading tufte-handout-local.tex}} 34 | {} 35 | 36 | 37 | %% 38 | % End of file 39 | \endinput 40 | -------------------------------------------------------------------------------- /2021/problem-set/hw7-function-ordering/tufte-preamble.tex: -------------------------------------------------------------------------------- 1 | % \geometry{showframe}% for debugging purposes -- displays the margins 2 | 3 | % Set up the images/graphics package 4 | \usepackage{graphicx} 5 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} 6 | % \graphicspath{{figs/}} 7 | 8 | % The following package makes prettier tables. We're all about the bling! 9 | \usepackage{booktabs} 10 | 11 | % The units package provides nice, non-stacked fractions and better spacing for units. 12 | \usepackage{units} 13 | 14 | % Small sections of multiple columns 15 | \usepackage{multicol} 16 | 17 | % Provides paragraphs of dummy text 18 | \usepackage{lipsum} 19 | 20 | % These commands are used to pretty-print LaTeX commands 21 | \newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically 22 | \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument 23 | \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument 24 | \newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment 25 | \newcommand{\docenv}[1]{\textsf{#1}}% environment name 26 | \newcommand{\docpkg}[1]{\texttt{#1}}% package name 27 | \newcommand{\doccls}[1]{\texttt{#1}}% document class name 28 | \newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name 29 | -------------------------------------------------------------------------------- /2021/problem-set/hw8-infinity/README.md: -------------------------------------------------------------------------------- 1 | # README.md -------------------------------------------------------------------------------- /2021/problem-set/hw8-infinity/Schroder-Bernstein-theorem (wiki).pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/problem-set/hw8-infinity/Schroder-Bernstein-theorem (wiki).pdf -------------------------------------------------------------------------------- /2021/problem-set/hw8-infinity/hw8-infinity.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/problem-set/hw8-infinity/hw8-infinity.pdf -------------------------------------------------------------------------------- /2021/problem-set/hw8-infinity/hw8-infinity.tex: -------------------------------------------------------------------------------- 1 | % hw8-infinity.tex 2 | 3 | % !TEX program = xelatex 4 | %%%%%%%%%%%%%%%%%%%% 5 | % see http://mirrors.concertpass.com/tex-archive/macros/latex/contrib/tufte-latex/sample-handout.pdf 6 | % for how to use tufte-handout 7 | \documentclass[a4paper, justified]{tufte-handout} 8 | 9 | \input{hw-preamble} % feel free to modify this file if you understand LaTeX well 10 | %%%%%%%%%%%%%%%%%%%% 11 | \title{8. 集合: 无穷 (8-infinity)} 12 | \me{魏恒峰}{hfwei@nju.edu.cn}{}{} 13 | \date{2021年4月29日} 14 | %%%%%%%%%%%%%%%%%%%% 15 | \begin{document} 16 | \maketitle 17 | %%%%%%%%%%%%%%%%%%%% 18 | \noplagiarism % PLEASE DON'T DELETE THIS LINE! 19 | %%%%%%%%%%%%%%%%%%%% 20 | \begin{abstract} 21 | % \mfigcap{width = 0.85\textwidth}{figs/George-Boole}{George Boole} 22 | % \begin{center}{\fcolorbox{blue}{yellow!60}{\parbox{0.65\textwidth}{\large 23 | % \begin{itemize} 24 | % \item 25 | % \end{itemize}}}} 26 | % \end{center} 27 | \end{abstract} 28 | %%%%%%%%%%%%%%%%%%%% 29 | \beginrequired 30 | %%%%%%%%%%%%%%% 31 | 32 | %%%%%%%%%%%%%%% 33 | \begin{problem}[\score{3} $\star\star\star$] 34 | 考虑由所有$0$, $1$串构成的集合 ($\set{0, 1, 111, 01010101010, 101010101, \dots}$)。 35 | 请问, 该集合是否是可数集合, 请给出理由。 36 | \end{problem} 37 | 38 | \begin{proof} 39 | \end{proof} 40 | %%%%%%%%%%%%%%% 41 | 42 | %%%%%%%%%%%%%%% 43 | \begin{problem}[\score{4} $\star\star\star$] 44 | 考虑如下命题: 45 | 46 | ``存在可数无穷多个两两不相交的非空集合, 它们的并是有穷集合。'' 47 | 48 | \noindent 请问, 该命题是否正确。如果正确, 请给出例子。如果不正确, 请给出(反面的)证明。 49 | \end{problem} 50 | 51 | \begin{proof} 52 | \end{proof} 53 | %%%%%%%%%%%%%%% 54 | 55 | %%%%%%%%%%%%%%% 56 | \begin{problem}[\score{3} $\star\star\star\star$] 57 | 请自行查找并阅读 Cantor-Schr\"{o}der–Bernstein 定理的某个证明, 58 | 理解它, 放下你手头的资料~\footnote{不要偷看哦}, 然后尝试自己写出这个证明~\footnote{ 59 | 是不是又偷看了 (为什么明明懂了, 但就是表达不出来?)}。 60 | 61 | \vspace{1em} 62 | \noindent 以下证明供参考~\footnote{pdf 版本见``\textsl{8-infinity.zip}''压缩包}: 63 | {\href{https://en.wikipedia.org/wiki/Schr\%C3\%B6der\%E2\%80\%93Bernstein\_theorem}{\teal{\footnotesize Schr\"{o}der–Bernstein theorem @ wiki}}} 64 | \end{problem} 65 | 66 | \begin{proof} 67 | \end{proof} 68 | %%%%%%%%%%%%%%% 69 | %%%%%%%%%%%%%%%%%%%% 70 | % 如果没有需要订正的题目,可以把这部分删掉 71 | 72 | \begincorrection 73 | %%%%%%%%%%%%%%%%%%%% 74 | 75 | %%%%%%%%%%%%%%%%%%%% 76 | % 如果没有反馈,可以把这部分删掉 77 | \beginfb 78 | 79 | 你可以写 (也可以发邮件或者使用``教学立方'') 80 | \begin{itemize} 81 | \item 对课程及教师的建议与意见 82 | \item 教材中不理解的内容 83 | \item 希望深入了解的内容 84 | \item $\cdots$ 85 | \end{itemize} 86 | %%%%%%%%%%%%%%%%%%%% 87 | \end{document} -------------------------------------------------------------------------------- /2021/problem-set/hw8-infinity/tufte-book.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-book}[2009/12/11 v3.5.0 Tufte-book class] 4 | 5 | %% 6 | % Declare we're tufte-book 7 | \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any book-specific stuff now 17 | 18 | %% 19 | % The front matter in Tufte's /Beautiful Evidence/ contains everything up 20 | % to the opening page of Chapter 1. The running heads, when they appear, 21 | % contain only the (arabic) page number in the outside corner. 22 | %\newif\if@mainmatter \@mainmattertrue 23 | \renewcommand\frontmatter{% 24 | \cleardoublepage% 25 | \@mainmatterfalse% 26 | \pagenumbering{arabic}% 27 | %\pagestyle{plain}% 28 | \fancyhf{}% 29 | \ifthenelse{\boolean{@tufte@twoside}}% 30 | {\fancyhead[LE,RO]{\thepage}}% 31 | {\fancyhead[RE,RO]{\thepage}}% 32 | } 33 | 34 | 35 | %% 36 | % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page 37 | % numbering---it continues where it left off in the front matter. 38 | \renewcommand\mainmatter{% 39 | \cleardoublepage% 40 | \@mainmattertrue% 41 | \fancyhf{}% 42 | \ifthenelse{\boolean{@tufte@twoside}}% 43 | {% two-side 44 | \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% 45 | \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title 46 | \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title 47 | }% 48 | {% one-side 49 | \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title 50 | }% 51 | } 52 | 53 | 54 | %% 55 | % The back matter contains appendices, indices, glossaries, endnotes, 56 | % biliographies, list of contributors, illustration credits, etc. 57 | \renewcommand\backmatter{% 58 | \if@openright% 59 | \cleardoublepage% 60 | \else% 61 | \clearpage% 62 | \fi% 63 | \@mainmatterfalse% 64 | } 65 | 66 | %% 67 | % Only show the chapter titles in the table of contents 68 | \setcounter{tocdepth}{0} 69 | 70 | %% 71 | % If there is a `tufte-book-local.sty' file, load it. 72 | 73 | \IfFileExists{tufte-book-local.tex} 74 | {\input{tufte-book-local} 75 | \TufteInfoNL{Loading tufte-book-local.tex}} 76 | {} 77 | 78 | %% 79 | % End of file 80 | \endinput 81 | -------------------------------------------------------------------------------- /2021/problem-set/hw8-infinity/tufte-handout.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-handout}[2009/12/11 v3.5.0 Tufte-handout class] 4 | 5 | %% 6 | % Declare we're tufte-handout 7 | \newcommand{\@tufte@class}{article}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-handout}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any handout-specific stuff now 17 | 18 | %% 19 | % Abstract 20 | 21 | % TODO The abstract should be printed on its own page of the `titlepage' 22 | % option was specified. 23 | \renewenvironment{abstract} 24 | {\begin{quotation}\if@tufte@sfsidenotes\begin{sffamily}\fi} 25 | {\if@tufte@sfsidenotes\end{sffamily}\fi\end{quotation}} 26 | 27 | 28 | %% 29 | % If there is a `tufte-handout-local.tex' file, load it. 30 | 31 | \IfFileExists{tufte-handout-local.tex} 32 | {\input{tufte-handout-local} 33 | \TufteInfoNL{Loading tufte-handout-local.tex}} 34 | {} 35 | 36 | 37 | %% 38 | % End of file 39 | \endinput 40 | -------------------------------------------------------------------------------- /2021/problem-set/hw8-infinity/tufte-preamble.tex: -------------------------------------------------------------------------------- 1 | % \geometry{showframe}% for debugging purposes -- displays the margins 2 | 3 | % Set up the images/graphics package 4 | \usepackage{graphicx} 5 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} 6 | % \graphicspath{{figs/}} 7 | 8 | % The following package makes prettier tables. We're all about the bling! 9 | \usepackage{booktabs} 10 | 11 | % The units package provides nice, non-stacked fractions and better spacing for units. 12 | \usepackage{units} 13 | 14 | % Small sections of multiple columns 15 | \usepackage{multicol} 16 | 17 | % Provides paragraphs of dummy text 18 | \usepackage{lipsum} 19 | 20 | % These commands are used to pretty-print LaTeX commands 21 | \newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically 22 | \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument 23 | \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument 24 | \newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment 25 | \newcommand{\docenv}[1]{\textsf{#1}}% environment name 26 | \newcommand{\docpkg}[1]{\texttt{#1}}% package name 27 | \newcommand{\doccls}[1]{\texttt{#1}}% document class name 28 | \newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name 29 | -------------------------------------------------------------------------------- /2021/problem-set/hw9-paths-cycles/README.md: -------------------------------------------------------------------------------- 1 | # README.md -------------------------------------------------------------------------------- /2021/problem-set/hw9-paths-cycles/figs/5-room.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/problem-set/hw9-paths-cycles/figs/5-room.png -------------------------------------------------------------------------------- /2021/problem-set/hw9-paths-cycles/figs/Euler-graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/problem-set/hw9-paths-cycles/figs/Euler-graph.png -------------------------------------------------------------------------------- /2021/problem-set/hw9-paths-cycles/figs/chessboard-4-n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/problem-set/hw9-paths-cycles/figs/chessboard-4-n.png -------------------------------------------------------------------------------- /2021/problem-set/hw9-paths-cycles/hw9-paths-cycles.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/problem-set/hw9-paths-cycles/hw9-paths-cycles.pdf -------------------------------------------------------------------------------- /2021/problem-set/hw9-paths-cycles/tufte-book.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-book}[2009/12/11 v3.5.0 Tufte-book class] 4 | 5 | %% 6 | % Declare we're tufte-book 7 | \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any book-specific stuff now 17 | 18 | %% 19 | % The front matter in Tufte's /Beautiful Evidence/ contains everything up 20 | % to the opening page of Chapter 1. The running heads, when they appear, 21 | % contain only the (arabic) page number in the outside corner. 22 | %\newif\if@mainmatter \@mainmattertrue 23 | \renewcommand\frontmatter{% 24 | \cleardoublepage% 25 | \@mainmatterfalse% 26 | \pagenumbering{arabic}% 27 | %\pagestyle{plain}% 28 | \fancyhf{}% 29 | \ifthenelse{\boolean{@tufte@twoside}}% 30 | {\fancyhead[LE,RO]{\thepage}}% 31 | {\fancyhead[RE,RO]{\thepage}}% 32 | } 33 | 34 | 35 | %% 36 | % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page 37 | % numbering---it continues where it left off in the front matter. 38 | \renewcommand\mainmatter{% 39 | \cleardoublepage% 40 | \@mainmattertrue% 41 | \fancyhf{}% 42 | \ifthenelse{\boolean{@tufte@twoside}}% 43 | {% two-side 44 | \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% 45 | \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title 46 | \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title 47 | }% 48 | {% one-side 49 | \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title 50 | }% 51 | } 52 | 53 | 54 | %% 55 | % The back matter contains appendices, indices, glossaries, endnotes, 56 | % biliographies, list of contributors, illustration credits, etc. 57 | \renewcommand\backmatter{% 58 | \if@openright% 59 | \cleardoublepage% 60 | \else% 61 | \clearpage% 62 | \fi% 63 | \@mainmatterfalse% 64 | } 65 | 66 | %% 67 | % Only show the chapter titles in the table of contents 68 | \setcounter{tocdepth}{0} 69 | 70 | %% 71 | % If there is a `tufte-book-local.sty' file, load it. 72 | 73 | \IfFileExists{tufte-book-local.tex} 74 | {\input{tufte-book-local} 75 | \TufteInfoNL{Loading tufte-book-local.tex}} 76 | {} 77 | 78 | %% 79 | % End of file 80 | \endinput 81 | -------------------------------------------------------------------------------- /2021/problem-set/hw9-paths-cycles/tufte-handout.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-handout}[2009/12/11 v3.5.0 Tufte-handout class] 4 | 5 | %% 6 | % Declare we're tufte-handout 7 | \newcommand{\@tufte@class}{article}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-handout}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any handout-specific stuff now 17 | 18 | %% 19 | % Abstract 20 | 21 | % TODO The abstract should be printed on its own page of the `titlepage' 22 | % option was specified. 23 | \renewenvironment{abstract} 24 | {\begin{quotation}\if@tufte@sfsidenotes\begin{sffamily}\fi} 25 | {\if@tufte@sfsidenotes\end{sffamily}\fi\end{quotation}} 26 | 27 | 28 | %% 29 | % If there is a `tufte-handout-local.tex' file, load it. 30 | 31 | \IfFileExists{tufte-handout-local.tex} 32 | {\input{tufte-handout-local} 33 | \TufteInfoNL{Loading tufte-handout-local.tex}} 34 | {} 35 | 36 | 37 | %% 38 | % End of file 39 | \endinput 40 | -------------------------------------------------------------------------------- /2021/problem-set/hw9-paths-cycles/tufte-preamble.tex: -------------------------------------------------------------------------------- 1 | % \geometry{showframe}% for debugging purposes -- displays the margins 2 | 3 | % Set up the images/graphics package 4 | \usepackage{graphicx} 5 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} 6 | % \graphicspath{{figs/}} 7 | 8 | % The following package makes prettier tables. We're all about the bling! 9 | \usepackage{booktabs} 10 | 11 | % The units package provides nice, non-stacked fractions and better spacing for units. 12 | \usepackage{units} 13 | 14 | % Small sections of multiple columns 15 | \usepackage{multicol} 16 | 17 | % Provides paragraphs of dummy text 18 | \usepackage{lipsum} 19 | 20 | % These commands are used to pretty-print LaTeX commands 21 | \newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically 22 | \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument 23 | \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument 24 | \newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment 25 | \newcommand{\docenv}[1]{\textsf{#1}}% environment name 26 | \newcommand{\docpkg}[1]{\texttt{#1}}% package name 27 | \newcommand{\doccls}[1]{\texttt{#1}}% document class name 28 | \newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name 29 | -------------------------------------------------------------------------------- /2021/solution/hw-solution-allinone.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw-solution-allinone.pdf -------------------------------------------------------------------------------- /2021/solution/hw0-overview-solution/README.md: -------------------------------------------------------------------------------- 1 | # README.md -------------------------------------------------------------------------------- /2021/solution/hw0-overview-solution/figs/infection.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw0-overview-solution/figs/infection.jpg -------------------------------------------------------------------------------- /2021/solution/hw0-overview-solution/figs/nim-stone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw0-overview-solution/figs/nim-stone.png -------------------------------------------------------------------------------- /2021/solution/hw0-overview-solution/hw0-overview-solution.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw0-overview-solution/hw0-overview-solution.pdf -------------------------------------------------------------------------------- /2021/solution/hw0-overview-solution/tufte-book.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-book}[2009/12/11 v3.5.0 Tufte-book class] 4 | 5 | %% 6 | % Declare we're tufte-book 7 | \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any book-specific stuff now 17 | 18 | %% 19 | % The front matter in Tufte's /Beautiful Evidence/ contains everything up 20 | % to the opening page of Chapter 1. The running heads, when they appear, 21 | % contain only the (arabic) page number in the outside corner. 22 | %\newif\if@mainmatter \@mainmattertrue 23 | \renewcommand\frontmatter{% 24 | \cleardoublepage% 25 | \@mainmatterfalse% 26 | \pagenumbering{arabic}% 27 | %\pagestyle{plain}% 28 | \fancyhf{}% 29 | \ifthenelse{\boolean{@tufte@twoside}}% 30 | {\fancyhead[LE,RO]{\thepage}}% 31 | {\fancyhead[RE,RO]{\thepage}}% 32 | } 33 | 34 | 35 | %% 36 | % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page 37 | % numbering---it continues where it left off in the front matter. 38 | \renewcommand\mainmatter{% 39 | \cleardoublepage% 40 | \@mainmattertrue% 41 | \fancyhf{}% 42 | \ifthenelse{\boolean{@tufte@twoside}}% 43 | {% two-side 44 | \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% 45 | \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title 46 | \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title 47 | }% 48 | {% one-side 49 | \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title 50 | }% 51 | } 52 | 53 | 54 | %% 55 | % The back matter contains appendices, indices, glossaries, endnotes, 56 | % biliographies, list of contributors, illustration credits, etc. 57 | \renewcommand\backmatter{% 58 | \if@openright% 59 | \cleardoublepage% 60 | \else% 61 | \clearpage% 62 | \fi% 63 | \@mainmatterfalse% 64 | } 65 | 66 | %% 67 | % Only show the chapter titles in the table of contents 68 | \setcounter{tocdepth}{0} 69 | 70 | %% 71 | % If there is a `tufte-book-local.sty' file, load it. 72 | 73 | \IfFileExists{tufte-book-local.tex} 74 | {\input{tufte-book-local} 75 | \TufteInfoNL{Loading tufte-book-local.tex}} 76 | {} 77 | 78 | %% 79 | % End of file 80 | \endinput 81 | -------------------------------------------------------------------------------- /2021/solution/hw0-overview-solution/tufte-handout.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-handout}[2009/12/11 v3.5.0 Tufte-handout class] 4 | 5 | %% 6 | % Declare we're tufte-handout 7 | \newcommand{\@tufte@class}{article}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-handout}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any handout-specific stuff now 17 | 18 | %% 19 | % Abstract 20 | 21 | % TODO The abstract should be printed on its own page of the `titlepage' 22 | % option was specified. 23 | \renewenvironment{abstract} 24 | {\begin{quotation}\if@tufte@sfsidenotes\begin{sffamily}\fi} 25 | {\if@tufte@sfsidenotes\end{sffamily}\fi\end{quotation}} 26 | 27 | 28 | %% 29 | % If there is a `tufte-handout-local.tex' file, load it. 30 | 31 | \IfFileExists{tufte-handout-local.tex} 32 | {\input{tufte-handout-local} 33 | \TufteInfoNL{Loading tufte-handout-local.tex}} 34 | {} 35 | 36 | 37 | %% 38 | % End of file 39 | \endinput 40 | -------------------------------------------------------------------------------- /2021/solution/hw0-overview-solution/tufte-preamble.tex: -------------------------------------------------------------------------------- 1 | % \geometry{showframe}% for debugging purposes -- displays the margins 2 | 3 | % Set up the images/graphics package 4 | \usepackage{graphicx} 5 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} 6 | % \graphicspath{{figs/}} 7 | 8 | % The following package makes prettier tables. We're all about the bling! 9 | \usepackage{booktabs} 10 | 11 | % The units package provides nice, non-stacked fractions and better spacing for units. 12 | \usepackage{units} 13 | 14 | % Small sections of multiple columns 15 | \usepackage{multicol} 16 | 17 | % Provides paragraphs of dummy text 18 | \usepackage{lipsum} 19 | 20 | % These commands are used to pretty-print LaTeX commands 21 | \newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically 22 | \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument 23 | \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument 24 | \newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment 25 | \newcommand{\docenv}[1]{\textsf{#1}}% environment name 26 | \newcommand{\docpkg}[1]{\texttt{#1}}% package name 27 | \newcommand{\doccls}[1]{\texttt{#1}}% document class name 28 | \newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name 29 | -------------------------------------------------------------------------------- /2021/solution/hw1-prop-logic-solution/README.md: -------------------------------------------------------------------------------- 1 | # README.md -------------------------------------------------------------------------------- /2021/solution/hw1-prop-logic-solution/hw1-prop-logic-solution.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw1-prop-logic-solution/hw1-prop-logic-solution.pdf -------------------------------------------------------------------------------- /2021/solution/hw1-prop-logic-solution/tables/truth-table.tex: -------------------------------------------------------------------------------- 1 | % truth-table.tex 2 | 3 | \newcolumntype{C}{>{$}c<{$}} % math-mode version of "c" column type 4 | 5 | % \usepackage{graphicx} 6 | \begin{table}[h] 7 | \centering 8 | \resizebox{0.50\textwidth}{!}{% 9 | \begin{tabular}{|C|C|C|C||C|C|C||C|} 10 | \hline 11 | P & Q & R & S & P \lor Q & P \to R & Q \to S & S \lor R \\ \hline 12 | T & T & T & T & \blue{T} & \blue{T} & \blue{T} & \red{T} \\ \hline 13 | T & T & T & F & T & T & F & T \\ \hline 14 | T & T & F & T & T & F & T & T \\ \hline 15 | T & T & F & F & T & F & F & F \\ \hline 16 | T & F & T & T & \blue{T} & \blue{T} & \blue{T} & \red{T} \\ \hline 17 | T & F & T & F & \blue{T} & \blue{T} & \blue{T} & \red{T} \\ \hline 18 | T & F & F & T & T & F & T & T \\ \hline 19 | T & F & F & F & T & F & T & F \\ \hline 20 | F & T & T & T & \blue{T} & \blue{T} & \blue{T} & \red{T} \\ \hline 21 | F & T & T & F & T & T & F & T \\ \hline 22 | F & T & F & T & \blue{T} & \blue{T} & \blue{T} & \red{T} \\ \hline 23 | F & T & F & F & T & T & F & F \\ \hline 24 | F & F & T & T & F & T & T & T \\ \hline 25 | F & F & T & F & F & T & T & T \\ \hline 26 | F & F & F & T & F & T & T & T \\ \hline 27 | F & F & F & F & F & T & T & F \\ \hline 28 | \end{tabular}} 29 | \end{table} -------------------------------------------------------------------------------- /2021/solution/hw1-prop-logic-solution/tufte-book.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-book}[2009/12/11 v3.5.0 Tufte-book class] 4 | 5 | %% 6 | % Declare we're tufte-book 7 | \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any book-specific stuff now 17 | 18 | %% 19 | % The front matter in Tufte's /Beautiful Evidence/ contains everything up 20 | % to the opening page of Chapter 1. The running heads, when they appear, 21 | % contain only the (arabic) page number in the outside corner. 22 | %\newif\if@mainmatter \@mainmattertrue 23 | \renewcommand\frontmatter{% 24 | \cleardoublepage% 25 | \@mainmatterfalse% 26 | \pagenumbering{arabic}% 27 | %\pagestyle{plain}% 28 | \fancyhf{}% 29 | \ifthenelse{\boolean{@tufte@twoside}}% 30 | {\fancyhead[LE,RO]{\thepage}}% 31 | {\fancyhead[RE,RO]{\thepage}}% 32 | } 33 | 34 | 35 | %% 36 | % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page 37 | % numbering---it continues where it left off in the front matter. 38 | \renewcommand\mainmatter{% 39 | \cleardoublepage% 40 | \@mainmattertrue% 41 | \fancyhf{}% 42 | \ifthenelse{\boolean{@tufte@twoside}}% 43 | {% two-side 44 | \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% 45 | \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title 46 | \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title 47 | }% 48 | {% one-side 49 | \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title 50 | }% 51 | } 52 | 53 | 54 | %% 55 | % The back matter contains appendices, indices, glossaries, endnotes, 56 | % biliographies, list of contributors, illustration credits, etc. 57 | \renewcommand\backmatter{% 58 | \if@openright% 59 | \cleardoublepage% 60 | \else% 61 | \clearpage% 62 | \fi% 63 | \@mainmatterfalse% 64 | } 65 | 66 | %% 67 | % Only show the chapter titles in the table of contents 68 | \setcounter{tocdepth}{0} 69 | 70 | %% 71 | % If there is a `tufte-book-local.sty' file, load it. 72 | 73 | \IfFileExists{tufte-book-local.tex} 74 | {\input{tufte-book-local} 75 | \TufteInfoNL{Loading tufte-book-local.tex}} 76 | {} 77 | 78 | %% 79 | % End of file 80 | \endinput 81 | -------------------------------------------------------------------------------- /2021/solution/hw1-prop-logic-solution/tufte-handout.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-handout}[2009/12/11 v3.5.0 Tufte-handout class] 4 | 5 | %% 6 | % Declare we're tufte-handout 7 | \newcommand{\@tufte@class}{article}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-handout}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any handout-specific stuff now 17 | 18 | %% 19 | % Abstract 20 | 21 | % TODO The abstract should be printed on its own page of the `titlepage' 22 | % option was specified. 23 | \renewenvironment{abstract} 24 | {\begin{quotation}\if@tufte@sfsidenotes\begin{sffamily}\fi} 25 | {\if@tufte@sfsidenotes\end{sffamily}\fi\end{quotation}} 26 | 27 | 28 | %% 29 | % If there is a `tufte-handout-local.tex' file, load it. 30 | 31 | \IfFileExists{tufte-handout-local.tex} 32 | {\input{tufte-handout-local} 33 | \TufteInfoNL{Loading tufte-handout-local.tex}} 34 | {} 35 | 36 | 37 | %% 38 | % End of file 39 | \endinput 40 | -------------------------------------------------------------------------------- /2021/solution/hw1-prop-logic-solution/tufte-preamble.tex: -------------------------------------------------------------------------------- 1 | % \geometry{showframe}% for debugging purposes -- displays the margins 2 | 3 | % Set up the images/graphics package 4 | \usepackage{graphicx} 5 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} 6 | % \graphicspath{{figs/}} 7 | 8 | % The following package makes prettier tables. We're all about the bling! 9 | \usepackage{booktabs} 10 | 11 | % The units package provides nice, non-stacked fractions and better spacing for units. 12 | \usepackage{units} 13 | 14 | % Small sections of multiple columns 15 | \usepackage{multicol} 16 | 17 | % Provides paragraphs of dummy text 18 | \usepackage{lipsum} 19 | 20 | % These commands are used to pretty-print LaTeX commands 21 | \newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically 22 | \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument 23 | \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument 24 | \newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment 25 | \newcommand{\docenv}[1]{\textsf{#1}}% environment name 26 | \newcommand{\docpkg}[1]{\texttt{#1}}% package name 27 | \newcommand{\doccls}[1]{\texttt{#1}}% document class name 28 | \newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name 29 | -------------------------------------------------------------------------------- /2021/solution/hw10-trees-solution/README.md: -------------------------------------------------------------------------------- 1 | # README.md -------------------------------------------------------------------------------- /2021/solution/hw10-trees-solution/figs/Bourne.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw10-trees-solution/figs/Bourne.jpg -------------------------------------------------------------------------------- /2021/solution/hw10-trees-solution/figs/douban-star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw10-trees-solution/figs/douban-star.png -------------------------------------------------------------------------------- /2021/solution/hw10-trees-solution/figs/st-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw10-trees-solution/figs/st-example.png -------------------------------------------------------------------------------- /2021/solution/hw10-trees-solution/hw10-trees-solution.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw10-trees-solution/hw10-trees-solution.pdf -------------------------------------------------------------------------------- /2021/solution/hw10-trees-solution/tufte-book.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-book}[2009/12/11 v3.5.0 Tufte-book class] 4 | 5 | %% 6 | % Declare we're tufte-book 7 | \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any book-specific stuff now 17 | 18 | %% 19 | % The front matter in Tufte's /Beautiful Evidence/ contains everything up 20 | % to the opening page of Chapter 1. The running heads, when they appear, 21 | % contain only the (arabic) page number in the outside corner. 22 | %\newif\if@mainmatter \@mainmattertrue 23 | \renewcommand\frontmatter{% 24 | \cleardoublepage% 25 | \@mainmatterfalse% 26 | \pagenumbering{arabic}% 27 | %\pagestyle{plain}% 28 | \fancyhf{}% 29 | \ifthenelse{\boolean{@tufte@twoside}}% 30 | {\fancyhead[LE,RO]{\thepage}}% 31 | {\fancyhead[RE,RO]{\thepage}}% 32 | } 33 | 34 | 35 | %% 36 | % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page 37 | % numbering---it continues where it left off in the front matter. 38 | \renewcommand\mainmatter{% 39 | \cleardoublepage% 40 | \@mainmattertrue% 41 | \fancyhf{}% 42 | \ifthenelse{\boolean{@tufte@twoside}}% 43 | {% two-side 44 | \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% 45 | \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title 46 | \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title 47 | }% 48 | {% one-side 49 | \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title 50 | }% 51 | } 52 | 53 | 54 | %% 55 | % The back matter contains appendices, indices, glossaries, endnotes, 56 | % biliographies, list of contributors, illustration credits, etc. 57 | \renewcommand\backmatter{% 58 | \if@openright% 59 | \cleardoublepage% 60 | \else% 61 | \clearpage% 62 | \fi% 63 | \@mainmatterfalse% 64 | } 65 | 66 | %% 67 | % Only show the chapter titles in the table of contents 68 | \setcounter{tocdepth}{0} 69 | 70 | %% 71 | % If there is a `tufte-book-local.sty' file, load it. 72 | 73 | \IfFileExists{tufte-book-local.tex} 74 | {\input{tufte-book-local} 75 | \TufteInfoNL{Loading tufte-book-local.tex}} 76 | {} 77 | 78 | %% 79 | % End of file 80 | \endinput 81 | -------------------------------------------------------------------------------- /2021/solution/hw10-trees-solution/tufte-handout.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-handout}[2009/12/11 v3.5.0 Tufte-handout class] 4 | 5 | %% 6 | % Declare we're tufte-handout 7 | \newcommand{\@tufte@class}{article}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-handout}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any handout-specific stuff now 17 | 18 | %% 19 | % Abstract 20 | 21 | % TODO The abstract should be printed on its own page of the `titlepage' 22 | % option was specified. 23 | \renewenvironment{abstract} 24 | {\begin{quotation}\if@tufte@sfsidenotes\begin{sffamily}\fi} 25 | {\if@tufte@sfsidenotes\end{sffamily}\fi\end{quotation}} 26 | 27 | 28 | %% 29 | % If there is a `tufte-handout-local.tex' file, load it. 30 | 31 | \IfFileExists{tufte-handout-local.tex} 32 | {\input{tufte-handout-local} 33 | \TufteInfoNL{Loading tufte-handout-local.tex}} 34 | {} 35 | 36 | 37 | %% 38 | % End of file 39 | \endinput 40 | -------------------------------------------------------------------------------- /2021/solution/hw10-trees-solution/tufte-preamble.tex: -------------------------------------------------------------------------------- 1 | % \geometry{showframe}% for debugging purposes -- displays the margins 2 | 3 | % Set up the images/graphics package 4 | \usepackage{graphicx} 5 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} 6 | % \graphicspath{{figs/}} 7 | 8 | % The following package makes prettier tables. We're all about the bling! 9 | \usepackage{booktabs} 10 | 11 | % The units package provides nice, non-stacked fractions and better spacing for units. 12 | \usepackage{units} 13 | 14 | % Small sections of multiple columns 15 | \usepackage{multicol} 16 | 17 | % Provides paragraphs of dummy text 18 | \usepackage{lipsum} 19 | 20 | % These commands are used to pretty-print LaTeX commands 21 | \newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically 22 | \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument 23 | \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument 24 | \newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment 25 | \newcommand{\docenv}[1]{\textsf{#1}}% environment name 26 | \newcommand{\docpkg}[1]{\texttt{#1}}% package name 27 | \newcommand{\doccls}[1]{\texttt{#1}}% document class name 28 | \newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name 29 | -------------------------------------------------------------------------------- /2021/solution/hw11-planarity-coloring-solution/README.md: -------------------------------------------------------------------------------- 1 | # README.md -------------------------------------------------------------------------------- /2021/solution/hw11-planarity-coloring-solution/figs/Hall-Proof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw11-planarity-coloring-solution/figs/Hall-Proof.png -------------------------------------------------------------------------------- /2021/solution/hw11-planarity-coloring-solution/figs/planarity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw11-planarity-coloring-solution/figs/planarity.png -------------------------------------------------------------------------------- /2021/solution/hw11-planarity-coloring-solution/hw11-planarity-coloring-solution.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw11-planarity-coloring-solution/hw11-planarity-coloring-solution.pdf -------------------------------------------------------------------------------- /2021/solution/hw11-planarity-coloring-solution/tufte-book.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-book}[2009/12/11 v3.5.0 Tufte-book class] 4 | 5 | %% 6 | % Declare we're tufte-book 7 | \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any book-specific stuff now 17 | 18 | %% 19 | % The front matter in Tufte's /Beautiful Evidence/ contains everything up 20 | % to the opening page of Chapter 1. The running heads, when they appear, 21 | % contain only the (arabic) page number in the outside corner. 22 | %\newif\if@mainmatter \@mainmattertrue 23 | \renewcommand\frontmatter{% 24 | \cleardoublepage% 25 | \@mainmatterfalse% 26 | \pagenumbering{arabic}% 27 | %\pagestyle{plain}% 28 | \fancyhf{}% 29 | \ifthenelse{\boolean{@tufte@twoside}}% 30 | {\fancyhead[LE,RO]{\thepage}}% 31 | {\fancyhead[RE,RO]{\thepage}}% 32 | } 33 | 34 | 35 | %% 36 | % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page 37 | % numbering---it continues where it left off in the front matter. 38 | \renewcommand\mainmatter{% 39 | \cleardoublepage% 40 | \@mainmattertrue% 41 | \fancyhf{}% 42 | \ifthenelse{\boolean{@tufte@twoside}}% 43 | {% two-side 44 | \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% 45 | \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title 46 | \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title 47 | }% 48 | {% one-side 49 | \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title 50 | }% 51 | } 52 | 53 | 54 | %% 55 | % The back matter contains appendices, indices, glossaries, endnotes, 56 | % biliographies, list of contributors, illustration credits, etc. 57 | \renewcommand\backmatter{% 58 | \if@openright% 59 | \cleardoublepage% 60 | \else% 61 | \clearpage% 62 | \fi% 63 | \@mainmatterfalse% 64 | } 65 | 66 | %% 67 | % Only show the chapter titles in the table of contents 68 | \setcounter{tocdepth}{0} 69 | 70 | %% 71 | % If there is a `tufte-book-local.sty' file, load it. 72 | 73 | \IfFileExists{tufte-book-local.tex} 74 | {\input{tufte-book-local} 75 | \TufteInfoNL{Loading tufte-book-local.tex}} 76 | {} 77 | 78 | %% 79 | % End of file 80 | \endinput 81 | -------------------------------------------------------------------------------- /2021/solution/hw11-planarity-coloring-solution/tufte-handout.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-handout}[2009/12/11 v3.5.0 Tufte-handout class] 4 | 5 | %% 6 | % Declare we're tufte-handout 7 | \newcommand{\@tufte@class}{article}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-handout}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any handout-specific stuff now 17 | 18 | %% 19 | % Abstract 20 | 21 | % TODO The abstract should be printed on its own page of the `titlepage' 22 | % option was specified. 23 | \renewenvironment{abstract} 24 | {\begin{quotation}\if@tufte@sfsidenotes\begin{sffamily}\fi} 25 | {\if@tufte@sfsidenotes\end{sffamily}\fi\end{quotation}} 26 | 27 | 28 | %% 29 | % If there is a `tufte-handout-local.tex' file, load it. 30 | 31 | \IfFileExists{tufte-handout-local.tex} 32 | {\input{tufte-handout-local} 33 | \TufteInfoNL{Loading tufte-handout-local.tex}} 34 | {} 35 | 36 | 37 | %% 38 | % End of file 39 | \endinput 40 | -------------------------------------------------------------------------------- /2021/solution/hw11-planarity-coloring-solution/tufte-preamble.tex: -------------------------------------------------------------------------------- 1 | % \geometry{showframe}% for debugging purposes -- displays the margins 2 | 3 | % Set up the images/graphics package 4 | \usepackage{graphicx} 5 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} 6 | % \graphicspath{{figs/}} 7 | 8 | % The following package makes prettier tables. We're all about the bling! 9 | \usepackage{booktabs} 10 | 11 | % The units package provides nice, non-stacked fractions and better spacing for units. 12 | \usepackage{units} 13 | 14 | % Small sections of multiple columns 15 | \usepackage{multicol} 16 | 17 | % Provides paragraphs of dummy text 18 | \usepackage{lipsum} 19 | 20 | % These commands are used to pretty-print LaTeX commands 21 | \newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically 22 | \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument 23 | \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument 24 | \newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment 25 | \newcommand{\docenv}[1]{\textsf{#1}}% environment name 26 | \newcommand{\docpkg}[1]{\texttt{#1}}% package name 27 | \newcommand{\doccls}[1]{\texttt{#1}}% document class name 28 | \newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name 29 | -------------------------------------------------------------------------------- /2021/solution/hw12-matching-flow-solution/README.md: -------------------------------------------------------------------------------- 1 | # README.md -------------------------------------------------------------------------------- /2021/solution/hw12-matching-flow-solution/hw12-matching-flow-solution.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw12-matching-flow-solution/hw12-matching-flow-solution.pdf -------------------------------------------------------------------------------- /2021/solution/hw12-matching-flow-solution/tufte-book.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-book}[2009/12/11 v3.5.0 Tufte-book class] 4 | 5 | %% 6 | % Declare we're tufte-book 7 | \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any book-specific stuff now 17 | 18 | %% 19 | % The front matter in Tufte's /Beautiful Evidence/ contains everything up 20 | % to the opening page of Chapter 1. The running heads, when they appear, 21 | % contain only the (arabic) page number in the outside corner. 22 | %\newif\if@mainmatter \@mainmattertrue 23 | \renewcommand\frontmatter{% 24 | \cleardoublepage% 25 | \@mainmatterfalse% 26 | \pagenumbering{arabic}% 27 | %\pagestyle{plain}% 28 | \fancyhf{}% 29 | \ifthenelse{\boolean{@tufte@twoside}}% 30 | {\fancyhead[LE,RO]{\thepage}}% 31 | {\fancyhead[RE,RO]{\thepage}}% 32 | } 33 | 34 | 35 | %% 36 | % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page 37 | % numbering---it continues where it left off in the front matter. 38 | \renewcommand\mainmatter{% 39 | \cleardoublepage% 40 | \@mainmattertrue% 41 | \fancyhf{}% 42 | \ifthenelse{\boolean{@tufte@twoside}}% 43 | {% two-side 44 | \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% 45 | \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title 46 | \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title 47 | }% 48 | {% one-side 49 | \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title 50 | }% 51 | } 52 | 53 | 54 | %% 55 | % The back matter contains appendices, indices, glossaries, endnotes, 56 | % biliographies, list of contributors, illustration credits, etc. 57 | \renewcommand\backmatter{% 58 | \if@openright% 59 | \cleardoublepage% 60 | \else% 61 | \clearpage% 62 | \fi% 63 | \@mainmatterfalse% 64 | } 65 | 66 | %% 67 | % Only show the chapter titles in the table of contents 68 | \setcounter{tocdepth}{0} 69 | 70 | %% 71 | % If there is a `tufte-book-local.sty' file, load it. 72 | 73 | \IfFileExists{tufte-book-local.tex} 74 | {\input{tufte-book-local} 75 | \TufteInfoNL{Loading tufte-book-local.tex}} 76 | {} 77 | 78 | %% 79 | % End of file 80 | \endinput 81 | -------------------------------------------------------------------------------- /2021/solution/hw12-matching-flow-solution/tufte-handout.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-handout}[2009/12/11 v3.5.0 Tufte-handout class] 4 | 5 | %% 6 | % Declare we're tufte-handout 7 | \newcommand{\@tufte@class}{article}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-handout}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any handout-specific stuff now 17 | 18 | %% 19 | % Abstract 20 | 21 | % TODO The abstract should be printed on its own page of the `titlepage' 22 | % option was specified. 23 | \renewenvironment{abstract} 24 | {\begin{quotation}\if@tufte@sfsidenotes\begin{sffamily}\fi} 25 | {\if@tufte@sfsidenotes\end{sffamily}\fi\end{quotation}} 26 | 27 | 28 | %% 29 | % If there is a `tufte-handout-local.tex' file, load it. 30 | 31 | \IfFileExists{tufte-handout-local.tex} 32 | {\input{tufte-handout-local} 33 | \TufteInfoNL{Loading tufte-handout-local.tex}} 34 | {} 35 | 36 | 37 | %% 38 | % End of file 39 | \endinput 40 | -------------------------------------------------------------------------------- /2021/solution/hw12-matching-flow-solution/tufte-preamble.tex: -------------------------------------------------------------------------------- 1 | % \geometry{showframe}% for debugging purposes -- displays the margins 2 | 3 | % Set up the images/graphics package 4 | \usepackage{graphicx} 5 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} 6 | % \graphicspath{{figs/}} 7 | 8 | % The following package makes prettier tables. We're all about the bling! 9 | \usepackage{booktabs} 10 | 11 | % The units package provides nice, non-stacked fractions and better spacing for units. 12 | \usepackage{units} 13 | 14 | % Small sections of multiple columns 15 | \usepackage{multicol} 16 | 17 | % Provides paragraphs of dummy text 18 | \usepackage{lipsum} 19 | 20 | % These commands are used to pretty-print LaTeX commands 21 | \newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically 22 | \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument 23 | \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument 24 | \newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment 25 | \newcommand{\docenv}[1]{\textsf{#1}}% environment name 26 | \newcommand{\docpkg}[1]{\texttt{#1}}% package name 27 | \newcommand{\doccls}[1]{\texttt{#1}}% document class name 28 | \newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name 29 | -------------------------------------------------------------------------------- /2021/solution/hw13-group-solution/README.md: -------------------------------------------------------------------------------- 1 | # README.md -------------------------------------------------------------------------------- /2021/solution/hw13-group-solution/figs/edge-disjoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw13-group-solution/figs/edge-disjoint.png -------------------------------------------------------------------------------- /2021/solution/hw13-group-solution/figs/graph2digraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw13-group-solution/figs/graph2digraph.png -------------------------------------------------------------------------------- /2021/solution/hw13-group-solution/figs/network-flow-value-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw13-group-solution/figs/network-flow-value-7.png -------------------------------------------------------------------------------- /2021/solution/hw13-group-solution/figs/network-flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw13-group-solution/figs/network-flow.png -------------------------------------------------------------------------------- /2021/solution/hw13-group-solution/hw13-group-solution.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw13-group-solution/hw13-group-solution.pdf -------------------------------------------------------------------------------- /2021/solution/hw13-group-solution/tufte-book.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-book}[2009/12/11 v3.5.0 Tufte-book class] 4 | 5 | %% 6 | % Declare we're tufte-book 7 | \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any book-specific stuff now 17 | 18 | %% 19 | % The front matter in Tufte's /Beautiful Evidence/ contains everything up 20 | % to the opening page of Chapter 1. The running heads, when they appear, 21 | % contain only the (arabic) page number in the outside corner. 22 | %\newif\if@mainmatter \@mainmattertrue 23 | \renewcommand\frontmatter{% 24 | \cleardoublepage% 25 | \@mainmatterfalse% 26 | \pagenumbering{arabic}% 27 | %\pagestyle{plain}% 28 | \fancyhf{}% 29 | \ifthenelse{\boolean{@tufte@twoside}}% 30 | {\fancyhead[LE,RO]{\thepage}}% 31 | {\fancyhead[RE,RO]{\thepage}}% 32 | } 33 | 34 | 35 | %% 36 | % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page 37 | % numbering---it continues where it left off in the front matter. 38 | \renewcommand\mainmatter{% 39 | \cleardoublepage% 40 | \@mainmattertrue% 41 | \fancyhf{}% 42 | \ifthenelse{\boolean{@tufte@twoside}}% 43 | {% two-side 44 | \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% 45 | \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title 46 | \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title 47 | }% 48 | {% one-side 49 | \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title 50 | }% 51 | } 52 | 53 | 54 | %% 55 | % The back matter contains appendices, indices, glossaries, endnotes, 56 | % biliographies, list of contributors, illustration credits, etc. 57 | \renewcommand\backmatter{% 58 | \if@openright% 59 | \cleardoublepage% 60 | \else% 61 | \clearpage% 62 | \fi% 63 | \@mainmatterfalse% 64 | } 65 | 66 | %% 67 | % Only show the chapter titles in the table of contents 68 | \setcounter{tocdepth}{0} 69 | 70 | %% 71 | % If there is a `tufte-book-local.sty' file, load it. 72 | 73 | \IfFileExists{tufte-book-local.tex} 74 | {\input{tufte-book-local} 75 | \TufteInfoNL{Loading tufte-book-local.tex}} 76 | {} 77 | 78 | %% 79 | % End of file 80 | \endinput 81 | -------------------------------------------------------------------------------- /2021/solution/hw13-group-solution/tufte-handout.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-handout}[2009/12/11 v3.5.0 Tufte-handout class] 4 | 5 | %% 6 | % Declare we're tufte-handout 7 | \newcommand{\@tufte@class}{article}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-handout}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any handout-specific stuff now 17 | 18 | %% 19 | % Abstract 20 | 21 | % TODO The abstract should be printed on its own page of the `titlepage' 22 | % option was specified. 23 | \renewenvironment{abstract} 24 | {\begin{quotation}\if@tufte@sfsidenotes\begin{sffamily}\fi} 25 | {\if@tufte@sfsidenotes\end{sffamily}\fi\end{quotation}} 26 | 27 | 28 | %% 29 | % If there is a `tufte-handout-local.tex' file, load it. 30 | 31 | \IfFileExists{tufte-handout-local.tex} 32 | {\input{tufte-handout-local} 33 | \TufteInfoNL{Loading tufte-handout-local.tex}} 34 | {} 35 | 36 | 37 | %% 38 | % End of file 39 | \endinput 40 | -------------------------------------------------------------------------------- /2021/solution/hw13-group-solution/tufte-preamble.tex: -------------------------------------------------------------------------------- 1 | % \geometry{showframe}% for debugging purposes -- displays the margins 2 | 3 | % Set up the images/graphics package 4 | \usepackage{graphicx} 5 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} 6 | % \graphicspath{{figs/}} 7 | 8 | % The following package makes prettier tables. We're all about the bling! 9 | \usepackage{booktabs} 10 | 11 | % The units package provides nice, non-stacked fractions and better spacing for units. 12 | \usepackage{units} 13 | 14 | % Small sections of multiple columns 15 | \usepackage{multicol} 16 | 17 | % Provides paragraphs of dummy text 18 | \usepackage{lipsum} 19 | 20 | % These commands are used to pretty-print LaTeX commands 21 | \newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically 22 | \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument 23 | \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument 24 | \newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment 25 | \newcommand{\docenv}[1]{\textsf{#1}}% environment name 26 | \newcommand{\docpkg}[1]{\texttt{#1}}% package name 27 | \newcommand{\doccls}[1]{\texttt{#1}}% document class name 28 | \newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name 29 | -------------------------------------------------------------------------------- /2021/solution/hw14-subgroup-solution/README.md: -------------------------------------------------------------------------------- 1 | # README.md -------------------------------------------------------------------------------- /2021/solution/hw14-subgroup-solution/hw14-subgroup-solution.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw14-subgroup-solution/hw14-subgroup-solution.pdf -------------------------------------------------------------------------------- /2021/solution/hw14-subgroup-solution/tufte-book.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-book}[2009/12/11 v3.5.0 Tufte-book class] 4 | 5 | %% 6 | % Declare we're tufte-book 7 | \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any book-specific stuff now 17 | 18 | %% 19 | % The front matter in Tufte's /Beautiful Evidence/ contains everything up 20 | % to the opening page of Chapter 1. The running heads, when they appear, 21 | % contain only the (arabic) page number in the outside corner. 22 | %\newif\if@mainmatter \@mainmattertrue 23 | \renewcommand\frontmatter{% 24 | \cleardoublepage% 25 | \@mainmatterfalse% 26 | \pagenumbering{arabic}% 27 | %\pagestyle{plain}% 28 | \fancyhf{}% 29 | \ifthenelse{\boolean{@tufte@twoside}}% 30 | {\fancyhead[LE,RO]{\thepage}}% 31 | {\fancyhead[RE,RO]{\thepage}}% 32 | } 33 | 34 | 35 | %% 36 | % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page 37 | % numbering---it continues where it left off in the front matter. 38 | \renewcommand\mainmatter{% 39 | \cleardoublepage% 40 | \@mainmattertrue% 41 | \fancyhf{}% 42 | \ifthenelse{\boolean{@tufte@twoside}}% 43 | {% two-side 44 | \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% 45 | \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title 46 | \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title 47 | }% 48 | {% one-side 49 | \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title 50 | }% 51 | } 52 | 53 | 54 | %% 55 | % The back matter contains appendices, indices, glossaries, endnotes, 56 | % biliographies, list of contributors, illustration credits, etc. 57 | \renewcommand\backmatter{% 58 | \if@openright% 59 | \cleardoublepage% 60 | \else% 61 | \clearpage% 62 | \fi% 63 | \@mainmatterfalse% 64 | } 65 | 66 | %% 67 | % Only show the chapter titles in the table of contents 68 | \setcounter{tocdepth}{0} 69 | 70 | %% 71 | % If there is a `tufte-book-local.sty' file, load it. 72 | 73 | \IfFileExists{tufte-book-local.tex} 74 | {\input{tufte-book-local} 75 | \TufteInfoNL{Loading tufte-book-local.tex}} 76 | {} 77 | 78 | %% 79 | % End of file 80 | \endinput 81 | -------------------------------------------------------------------------------- /2021/solution/hw14-subgroup-solution/tufte-handout.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-handout}[2009/12/11 v3.5.0 Tufte-handout class] 4 | 5 | %% 6 | % Declare we're tufte-handout 7 | \newcommand{\@tufte@class}{article}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-handout}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any handout-specific stuff now 17 | 18 | %% 19 | % Abstract 20 | 21 | % TODO The abstract should be printed on its own page of the `titlepage' 22 | % option was specified. 23 | \renewenvironment{abstract} 24 | {\begin{quotation}\if@tufte@sfsidenotes\begin{sffamily}\fi} 25 | {\if@tufte@sfsidenotes\end{sffamily}\fi\end{quotation}} 26 | 27 | 28 | %% 29 | % If there is a `tufte-handout-local.tex' file, load it. 30 | 31 | \IfFileExists{tufte-handout-local.tex} 32 | {\input{tufte-handout-local} 33 | \TufteInfoNL{Loading tufte-handout-local.tex}} 34 | {} 35 | 36 | 37 | %% 38 | % End of file 39 | \endinput 40 | -------------------------------------------------------------------------------- /2021/solution/hw14-subgroup-solution/tufte-preamble.tex: -------------------------------------------------------------------------------- 1 | % \geometry{showframe}% for debugging purposes -- displays the margins 2 | 3 | % Set up the images/graphics package 4 | \usepackage{graphicx} 5 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} 6 | % \graphicspath{{figs/}} 7 | 8 | % The following package makes prettier tables. We're all about the bling! 9 | \usepackage{booktabs} 10 | 11 | % The units package provides nice, non-stacked fractions and better spacing for units. 12 | \usepackage{units} 13 | 14 | % Small sections of multiple columns 15 | \usepackage{multicol} 16 | 17 | % Provides paragraphs of dummy text 18 | \usepackage{lipsum} 19 | 20 | % These commands are used to pretty-print LaTeX commands 21 | \newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically 22 | \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument 23 | \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument 24 | \newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment 25 | \newcommand{\docenv}[1]{\textsf{#1}}% environment name 26 | \newcommand{\docpkg}[1]{\texttt{#1}}% package name 27 | \newcommand{\doccls}[1]{\texttt{#1}}% document class name 28 | \newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name 29 | -------------------------------------------------------------------------------- /2021/solution/hw2-predicate-logic-solution/README.md: -------------------------------------------------------------------------------- 1 | # README.md -------------------------------------------------------------------------------- /2021/solution/hw2-predicate-logic-solution/figs/logic-invincible.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw2-predicate-logic-solution/figs/logic-invincible.jpeg -------------------------------------------------------------------------------- /2021/solution/hw2-predicate-logic-solution/hw2-predicate-logic-solution.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw2-predicate-logic-solution/hw2-predicate-logic-solution.pdf -------------------------------------------------------------------------------- /2021/solution/hw2-predicate-logic-solution/tufte-book.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-book}[2009/12/11 v3.5.0 Tufte-book class] 4 | 5 | %% 6 | % Declare we're tufte-book 7 | \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any book-specific stuff now 17 | 18 | %% 19 | % The front matter in Tufte's /Beautiful Evidence/ contains everything up 20 | % to the opening page of Chapter 1. The running heads, when they appear, 21 | % contain only the (arabic) page number in the outside corner. 22 | %\newif\if@mainmatter \@mainmattertrue 23 | \renewcommand\frontmatter{% 24 | \cleardoublepage% 25 | \@mainmatterfalse% 26 | \pagenumbering{arabic}% 27 | %\pagestyle{plain}% 28 | \fancyhf{}% 29 | \ifthenelse{\boolean{@tufte@twoside}}% 30 | {\fancyhead[LE,RO]{\thepage}}% 31 | {\fancyhead[RE,RO]{\thepage}}% 32 | } 33 | 34 | 35 | %% 36 | % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page 37 | % numbering---it continues where it left off in the front matter. 38 | \renewcommand\mainmatter{% 39 | \cleardoublepage% 40 | \@mainmattertrue% 41 | \fancyhf{}% 42 | \ifthenelse{\boolean{@tufte@twoside}}% 43 | {% two-side 44 | \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% 45 | \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title 46 | \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title 47 | }% 48 | {% one-side 49 | \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title 50 | }% 51 | } 52 | 53 | 54 | %% 55 | % The back matter contains appendices, indices, glossaries, endnotes, 56 | % biliographies, list of contributors, illustration credits, etc. 57 | \renewcommand\backmatter{% 58 | \if@openright% 59 | \cleardoublepage% 60 | \else% 61 | \clearpage% 62 | \fi% 63 | \@mainmatterfalse% 64 | } 65 | 66 | %% 67 | % Only show the chapter titles in the table of contents 68 | \setcounter{tocdepth}{0} 69 | 70 | %% 71 | % If there is a `tufte-book-local.sty' file, load it. 72 | 73 | \IfFileExists{tufte-book-local.tex} 74 | {\input{tufte-book-local} 75 | \TufteInfoNL{Loading tufte-book-local.tex}} 76 | {} 77 | 78 | %% 79 | % End of file 80 | \endinput 81 | -------------------------------------------------------------------------------- /2021/solution/hw2-predicate-logic-solution/tufte-handout.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-handout}[2009/12/11 v3.5.0 Tufte-handout class] 4 | 5 | %% 6 | % Declare we're tufte-handout 7 | \newcommand{\@tufte@class}{article}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-handout}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any handout-specific stuff now 17 | 18 | %% 19 | % Abstract 20 | 21 | % TODO The abstract should be printed on its own page of the `titlepage' 22 | % option was specified. 23 | \renewenvironment{abstract} 24 | {\begin{quotation}\if@tufte@sfsidenotes\begin{sffamily}\fi} 25 | {\if@tufte@sfsidenotes\end{sffamily}\fi\end{quotation}} 26 | 27 | 28 | %% 29 | % If there is a `tufte-handout-local.tex' file, load it. 30 | 31 | \IfFileExists{tufte-handout-local.tex} 32 | {\input{tufte-handout-local} 33 | \TufteInfoNL{Loading tufte-handout-local.tex}} 34 | {} 35 | 36 | 37 | %% 38 | % End of file 39 | \endinput 40 | -------------------------------------------------------------------------------- /2021/solution/hw2-predicate-logic-solution/tufte-preamble.tex: -------------------------------------------------------------------------------- 1 | % \geometry{showframe}% for debugging purposes -- displays the margins 2 | 3 | % Set up the images/graphics package 4 | \usepackage{graphicx} 5 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} 6 | % \graphicspath{{figs/}} 7 | 8 | % The following package makes prettier tables. We're all about the bling! 9 | \usepackage{booktabs} 10 | 11 | % The units package provides nice, non-stacked fractions and better spacing for units. 12 | \usepackage{units} 13 | 14 | % Small sections of multiple columns 15 | \usepackage{multicol} 16 | 17 | % Provides paragraphs of dummy text 18 | \usepackage{lipsum} 19 | 20 | % These commands are used to pretty-print LaTeX commands 21 | \newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically 22 | \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument 23 | \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument 24 | \newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment 25 | \newcommand{\docenv}[1]{\textsf{#1}}% environment name 26 | \newcommand{\docpkg}[1]{\texttt{#1}}% package name 27 | \newcommand{\doccls}[1]{\texttt{#1}}% document class name 28 | \newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name 29 | -------------------------------------------------------------------------------- /2021/solution/hw3-induction-solution/README.md: -------------------------------------------------------------------------------- 1 | # README.md -------------------------------------------------------------------------------- /2021/solution/hw3-induction-solution/figs/hard-yuanhua.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw3-induction-solution/figs/hard-yuanhua.jpg -------------------------------------------------------------------------------- /2021/solution/hw3-induction-solution/figs/sorry.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw3-induction-solution/figs/sorry.jpg -------------------------------------------------------------------------------- /2021/solution/hw3-induction-solution/hw3-induction-solution.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw3-induction-solution/hw3-induction-solution.pdf -------------------------------------------------------------------------------- /2021/solution/hw3-induction-solution/tufte-book.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-book}[2009/12/11 v3.5.0 Tufte-book class] 4 | 5 | %% 6 | % Declare we're tufte-book 7 | \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any book-specific stuff now 17 | 18 | %% 19 | % The front matter in Tufte's /Beautiful Evidence/ contains everything up 20 | % to the opening page of Chapter 1. The running heads, when they appear, 21 | % contain only the (arabic) page number in the outside corner. 22 | %\newif\if@mainmatter \@mainmattertrue 23 | \renewcommand\frontmatter{% 24 | \cleardoublepage% 25 | \@mainmatterfalse% 26 | \pagenumbering{arabic}% 27 | %\pagestyle{plain}% 28 | \fancyhf{}% 29 | \ifthenelse{\boolean{@tufte@twoside}}% 30 | {\fancyhead[LE,RO]{\thepage}}% 31 | {\fancyhead[RE,RO]{\thepage}}% 32 | } 33 | 34 | 35 | %% 36 | % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page 37 | % numbering---it continues where it left off in the front matter. 38 | \renewcommand\mainmatter{% 39 | \cleardoublepage% 40 | \@mainmattertrue% 41 | \fancyhf{}% 42 | \ifthenelse{\boolean{@tufte@twoside}}% 43 | {% two-side 44 | \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% 45 | \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title 46 | \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title 47 | }% 48 | {% one-side 49 | \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title 50 | }% 51 | } 52 | 53 | 54 | %% 55 | % The back matter contains appendices, indices, glossaries, endnotes, 56 | % biliographies, list of contributors, illustration credits, etc. 57 | \renewcommand\backmatter{% 58 | \if@openright% 59 | \cleardoublepage% 60 | \else% 61 | \clearpage% 62 | \fi% 63 | \@mainmatterfalse% 64 | } 65 | 66 | %% 67 | % Only show the chapter titles in the table of contents 68 | \setcounter{tocdepth}{0} 69 | 70 | %% 71 | % If there is a `tufte-book-local.sty' file, load it. 72 | 73 | \IfFileExists{tufte-book-local.tex} 74 | {\input{tufte-book-local} 75 | \TufteInfoNL{Loading tufte-book-local.tex}} 76 | {} 77 | 78 | %% 79 | % End of file 80 | \endinput 81 | -------------------------------------------------------------------------------- /2021/solution/hw3-induction-solution/tufte-handout.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-handout}[2009/12/11 v3.5.0 Tufte-handout class] 4 | 5 | %% 6 | % Declare we're tufte-handout 7 | \newcommand{\@tufte@class}{article}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-handout}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any handout-specific stuff now 17 | 18 | %% 19 | % Abstract 20 | 21 | % TODO The abstract should be printed on its own page of the `titlepage' 22 | % option was specified. 23 | \renewenvironment{abstract} 24 | {\begin{quotation}\if@tufte@sfsidenotes\begin{sffamily}\fi} 25 | {\if@tufte@sfsidenotes\end{sffamily}\fi\end{quotation}} 26 | 27 | 28 | %% 29 | % If there is a `tufte-handout-local.tex' file, load it. 30 | 31 | \IfFileExists{tufte-handout-local.tex} 32 | {\input{tufte-handout-local} 33 | \TufteInfoNL{Loading tufte-handout-local.tex}} 34 | {} 35 | 36 | 37 | %% 38 | % End of file 39 | \endinput 40 | -------------------------------------------------------------------------------- /2021/solution/hw3-induction-solution/tufte-preamble.tex: -------------------------------------------------------------------------------- 1 | % \geometry{showframe}% for debugging purposes -- displays the margins 2 | 3 | % Set up the images/graphics package 4 | \usepackage{graphicx} 5 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} 6 | % \graphicspath{{figs/}} 7 | 8 | % The following package makes prettier tables. We're all about the bling! 9 | \usepackage{booktabs} 10 | 11 | % The units package provides nice, non-stacked fractions and better spacing for units. 12 | \usepackage{units} 13 | 14 | % Small sections of multiple columns 15 | \usepackage{multicol} 16 | 17 | % Provides paragraphs of dummy text 18 | \usepackage{lipsum} 19 | 20 | % These commands are used to pretty-print LaTeX commands 21 | \newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically 22 | \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument 23 | \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument 24 | \newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment 25 | \newcommand{\docenv}[1]{\textsf{#1}}% environment name 26 | \newcommand{\docpkg}[1]{\texttt{#1}}% package name 27 | \newcommand{\doccls}[1]{\texttt{#1}}% document class name 28 | \newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name 29 | -------------------------------------------------------------------------------- /2021/solution/hw4-set-solution/README.md: -------------------------------------------------------------------------------- 1 | # README.md -------------------------------------------------------------------------------- /2021/solution/hw4-set-solution/hw4-set-solution.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw4-set-solution/hw4-set-solution.pdf -------------------------------------------------------------------------------- /2021/solution/hw4-set-solution/tufte-book.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-book}[2009/12/11 v3.5.0 Tufte-book class] 4 | 5 | %% 6 | % Declare we're tufte-book 7 | \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any book-specific stuff now 17 | 18 | %% 19 | % The front matter in Tufte's /Beautiful Evidence/ contains everything up 20 | % to the opening page of Chapter 1. The running heads, when they appear, 21 | % contain only the (arabic) page number in the outside corner. 22 | %\newif\if@mainmatter \@mainmattertrue 23 | \renewcommand\frontmatter{% 24 | \cleardoublepage% 25 | \@mainmatterfalse% 26 | \pagenumbering{arabic}% 27 | %\pagestyle{plain}% 28 | \fancyhf{}% 29 | \ifthenelse{\boolean{@tufte@twoside}}% 30 | {\fancyhead[LE,RO]{\thepage}}% 31 | {\fancyhead[RE,RO]{\thepage}}% 32 | } 33 | 34 | 35 | %% 36 | % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page 37 | % numbering---it continues where it left off in the front matter. 38 | \renewcommand\mainmatter{% 39 | \cleardoublepage% 40 | \@mainmattertrue% 41 | \fancyhf{}% 42 | \ifthenelse{\boolean{@tufte@twoside}}% 43 | {% two-side 44 | \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% 45 | \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title 46 | \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title 47 | }% 48 | {% one-side 49 | \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title 50 | }% 51 | } 52 | 53 | 54 | %% 55 | % The back matter contains appendices, indices, glossaries, endnotes, 56 | % biliographies, list of contributors, illustration credits, etc. 57 | \renewcommand\backmatter{% 58 | \if@openright% 59 | \cleardoublepage% 60 | \else% 61 | \clearpage% 62 | \fi% 63 | \@mainmatterfalse% 64 | } 65 | 66 | %% 67 | % Only show the chapter titles in the table of contents 68 | \setcounter{tocdepth}{0} 69 | 70 | %% 71 | % If there is a `tufte-book-local.sty' file, load it. 72 | 73 | \IfFileExists{tufte-book-local.tex} 74 | {\input{tufte-book-local} 75 | \TufteInfoNL{Loading tufte-book-local.tex}} 76 | {} 77 | 78 | %% 79 | % End of file 80 | \endinput 81 | -------------------------------------------------------------------------------- /2021/solution/hw4-set-solution/tufte-handout.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-handout}[2009/12/11 v3.5.0 Tufte-handout class] 4 | 5 | %% 6 | % Declare we're tufte-handout 7 | \newcommand{\@tufte@class}{article}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-handout}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any handout-specific stuff now 17 | 18 | %% 19 | % Abstract 20 | 21 | % TODO The abstract should be printed on its own page of the `titlepage' 22 | % option was specified. 23 | \renewenvironment{abstract} 24 | {\begin{quotation}\if@tufte@sfsidenotes\begin{sffamily}\fi} 25 | {\if@tufte@sfsidenotes\end{sffamily}\fi\end{quotation}} 26 | 27 | 28 | %% 29 | % If there is a `tufte-handout-local.tex' file, load it. 30 | 31 | \IfFileExists{tufte-handout-local.tex} 32 | {\input{tufte-handout-local} 33 | \TufteInfoNL{Loading tufte-handout-local.tex}} 34 | {} 35 | 36 | 37 | %% 38 | % End of file 39 | \endinput 40 | -------------------------------------------------------------------------------- /2021/solution/hw4-set-solution/tufte-preamble.tex: -------------------------------------------------------------------------------- 1 | % \geometry{showframe}% for debugging purposes -- displays the margins 2 | 3 | % Set up the images/graphics package 4 | \usepackage{graphicx} 5 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} 6 | % \graphicspath{{figs/}} 7 | 8 | % The following package makes prettier tables. We're all about the bling! 9 | \usepackage{booktabs} 10 | 11 | % The units package provides nice, non-stacked fractions and better spacing for units. 12 | \usepackage{units} 13 | 14 | % Small sections of multiple columns 15 | \usepackage{multicol} 16 | 17 | % Provides paragraphs of dummy text 18 | \usepackage{lipsum} 19 | 20 | % These commands are used to pretty-print LaTeX commands 21 | \newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically 22 | \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument 23 | \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument 24 | \newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment 25 | \newcommand{\docenv}[1]{\textsf{#1}}% environment name 26 | \newcommand{\docpkg}[1]{\texttt{#1}}% package name 27 | \newcommand{\doccls}[1]{\texttt{#1}}% document class name 28 | \newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name 29 | -------------------------------------------------------------------------------- /2021/solution/hw5-relation-solution/README.md: -------------------------------------------------------------------------------- 1 | # README.md -------------------------------------------------------------------------------- /2021/solution/hw5-relation-solution/hw5-relation-solution.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw5-relation-solution/hw5-relation-solution.pdf -------------------------------------------------------------------------------- /2021/solution/hw5-relation-solution/tufte-book.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-book}[2009/12/11 v3.5.0 Tufte-book class] 4 | 5 | %% 6 | % Declare we're tufte-book 7 | \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any book-specific stuff now 17 | 18 | %% 19 | % The front matter in Tufte's /Beautiful Evidence/ contains everything up 20 | % to the opening page of Chapter 1. The running heads, when they appear, 21 | % contain only the (arabic) page number in the outside corner. 22 | %\newif\if@mainmatter \@mainmattertrue 23 | \renewcommand\frontmatter{% 24 | \cleardoublepage% 25 | \@mainmatterfalse% 26 | \pagenumbering{arabic}% 27 | %\pagestyle{plain}% 28 | \fancyhf{}% 29 | \ifthenelse{\boolean{@tufte@twoside}}% 30 | {\fancyhead[LE,RO]{\thepage}}% 31 | {\fancyhead[RE,RO]{\thepage}}% 32 | } 33 | 34 | 35 | %% 36 | % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page 37 | % numbering---it continues where it left off in the front matter. 38 | \renewcommand\mainmatter{% 39 | \cleardoublepage% 40 | \@mainmattertrue% 41 | \fancyhf{}% 42 | \ifthenelse{\boolean{@tufte@twoside}}% 43 | {% two-side 44 | \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% 45 | \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title 46 | \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title 47 | }% 48 | {% one-side 49 | \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title 50 | }% 51 | } 52 | 53 | 54 | %% 55 | % The back matter contains appendices, indices, glossaries, endnotes, 56 | % biliographies, list of contributors, illustration credits, etc. 57 | \renewcommand\backmatter{% 58 | \if@openright% 59 | \cleardoublepage% 60 | \else% 61 | \clearpage% 62 | \fi% 63 | \@mainmatterfalse% 64 | } 65 | 66 | %% 67 | % Only show the chapter titles in the table of contents 68 | \setcounter{tocdepth}{0} 69 | 70 | %% 71 | % If there is a `tufte-book-local.sty' file, load it. 72 | 73 | \IfFileExists{tufte-book-local.tex} 74 | {\input{tufte-book-local} 75 | \TufteInfoNL{Loading tufte-book-local.tex}} 76 | {} 77 | 78 | %% 79 | % End of file 80 | \endinput 81 | -------------------------------------------------------------------------------- /2021/solution/hw5-relation-solution/tufte-handout.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-handout}[2009/12/11 v3.5.0 Tufte-handout class] 4 | 5 | %% 6 | % Declare we're tufte-handout 7 | \newcommand{\@tufte@class}{article}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-handout}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any handout-specific stuff now 17 | 18 | %% 19 | % Abstract 20 | 21 | % TODO The abstract should be printed on its own page of the `titlepage' 22 | % option was specified. 23 | \renewenvironment{abstract} 24 | {\begin{quotation}\if@tufte@sfsidenotes\begin{sffamily}\fi} 25 | {\if@tufte@sfsidenotes\end{sffamily}\fi\end{quotation}} 26 | 27 | 28 | %% 29 | % If there is a `tufte-handout-local.tex' file, load it. 30 | 31 | \IfFileExists{tufte-handout-local.tex} 32 | {\input{tufte-handout-local} 33 | \TufteInfoNL{Loading tufte-handout-local.tex}} 34 | {} 35 | 36 | 37 | %% 38 | % End of file 39 | \endinput 40 | -------------------------------------------------------------------------------- /2021/solution/hw5-relation-solution/tufte-preamble.tex: -------------------------------------------------------------------------------- 1 | % \geometry{showframe}% for debugging purposes -- displays the margins 2 | 3 | % Set up the images/graphics package 4 | \usepackage{graphicx} 5 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} 6 | % \graphicspath{{figs/}} 7 | 8 | % The following package makes prettier tables. We're all about the bling! 9 | \usepackage{booktabs} 10 | 11 | % The units package provides nice, non-stacked fractions and better spacing for units. 12 | \usepackage{units} 13 | 14 | % Small sections of multiple columns 15 | \usepackage{multicol} 16 | 17 | % Provides paragraphs of dummy text 18 | \usepackage{lipsum} 19 | 20 | % These commands are used to pretty-print LaTeX commands 21 | \newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically 22 | \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument 23 | \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument 24 | \newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment 25 | \newcommand{\docenv}[1]{\textsf{#1}}% environment name 26 | \newcommand{\docpkg}[1]{\texttt{#1}}% package name 27 | \newcommand{\doccls}[1]{\texttt{#1}}% document class name 28 | \newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name 29 | -------------------------------------------------------------------------------- /2021/solution/hw6-function-solution/README.md: -------------------------------------------------------------------------------- 1 | # README.md -------------------------------------------------------------------------------- /2021/solution/hw6-function-solution/hw6-function-solution.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw6-function-solution/hw6-function-solution.pdf -------------------------------------------------------------------------------- /2021/solution/hw6-function-solution/tufte-book.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-book}[2009/12/11 v3.5.0 Tufte-book class] 4 | 5 | %% 6 | % Declare we're tufte-book 7 | \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any book-specific stuff now 17 | 18 | %% 19 | % The front matter in Tufte's /Beautiful Evidence/ contains everything up 20 | % to the opening page of Chapter 1. The running heads, when they appear, 21 | % contain only the (arabic) page number in the outside corner. 22 | %\newif\if@mainmatter \@mainmattertrue 23 | \renewcommand\frontmatter{% 24 | \cleardoublepage% 25 | \@mainmatterfalse% 26 | \pagenumbering{arabic}% 27 | %\pagestyle{plain}% 28 | \fancyhf{}% 29 | \ifthenelse{\boolean{@tufte@twoside}}% 30 | {\fancyhead[LE,RO]{\thepage}}% 31 | {\fancyhead[RE,RO]{\thepage}}% 32 | } 33 | 34 | 35 | %% 36 | % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page 37 | % numbering---it continues where it left off in the front matter. 38 | \renewcommand\mainmatter{% 39 | \cleardoublepage% 40 | \@mainmattertrue% 41 | \fancyhf{}% 42 | \ifthenelse{\boolean{@tufte@twoside}}% 43 | {% two-side 44 | \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% 45 | \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title 46 | \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title 47 | }% 48 | {% one-side 49 | \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title 50 | }% 51 | } 52 | 53 | 54 | %% 55 | % The back matter contains appendices, indices, glossaries, endnotes, 56 | % biliographies, list of contributors, illustration credits, etc. 57 | \renewcommand\backmatter{% 58 | \if@openright% 59 | \cleardoublepage% 60 | \else% 61 | \clearpage% 62 | \fi% 63 | \@mainmatterfalse% 64 | } 65 | 66 | %% 67 | % Only show the chapter titles in the table of contents 68 | \setcounter{tocdepth}{0} 69 | 70 | %% 71 | % If there is a `tufte-book-local.sty' file, load it. 72 | 73 | \IfFileExists{tufte-book-local.tex} 74 | {\input{tufte-book-local} 75 | \TufteInfoNL{Loading tufte-book-local.tex}} 76 | {} 77 | 78 | %% 79 | % End of file 80 | \endinput 81 | -------------------------------------------------------------------------------- /2021/solution/hw6-function-solution/tufte-handout.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-handout}[2009/12/11 v3.5.0 Tufte-handout class] 4 | 5 | %% 6 | % Declare we're tufte-handout 7 | \newcommand{\@tufte@class}{article}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-handout}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any handout-specific stuff now 17 | 18 | %% 19 | % Abstract 20 | 21 | % TODO The abstract should be printed on its own page of the `titlepage' 22 | % option was specified. 23 | \renewenvironment{abstract} 24 | {\begin{quotation}\if@tufte@sfsidenotes\begin{sffamily}\fi} 25 | {\if@tufte@sfsidenotes\end{sffamily}\fi\end{quotation}} 26 | 27 | 28 | %% 29 | % If there is a `tufte-handout-local.tex' file, load it. 30 | 31 | \IfFileExists{tufte-handout-local.tex} 32 | {\input{tufte-handout-local} 33 | \TufteInfoNL{Loading tufte-handout-local.tex}} 34 | {} 35 | 36 | 37 | %% 38 | % End of file 39 | \endinput 40 | -------------------------------------------------------------------------------- /2021/solution/hw6-function-solution/tufte-preamble.tex: -------------------------------------------------------------------------------- 1 | % \geometry{showframe}% for debugging purposes -- displays the margins 2 | 3 | % Set up the images/graphics package 4 | \usepackage{graphicx} 5 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} 6 | % \graphicspath{{figs/}} 7 | 8 | % The following package makes prettier tables. We're all about the bling! 9 | \usepackage{booktabs} 10 | 11 | % The units package provides nice, non-stacked fractions and better spacing for units. 12 | \usepackage{units} 13 | 14 | % Small sections of multiple columns 15 | \usepackage{multicol} 16 | 17 | % Provides paragraphs of dummy text 18 | \usepackage{lipsum} 19 | 20 | % These commands are used to pretty-print LaTeX commands 21 | \newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically 22 | \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument 23 | \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument 24 | \newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment 25 | \newcommand{\docenv}[1]{\textsf{#1}}% environment name 26 | \newcommand{\docpkg}[1]{\texttt{#1}}% package name 27 | \newcommand{\doccls}[1]{\texttt{#1}}% document class name 28 | \newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name 29 | -------------------------------------------------------------------------------- /2021/solution/hw7-function-ordering-solution/README.md: -------------------------------------------------------------------------------- 1 | # README.md -------------------------------------------------------------------------------- /2021/solution/hw7-function-ordering-solution/hw7-function-ordering-solution.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw7-function-ordering-solution/hw7-function-ordering-solution.pdf -------------------------------------------------------------------------------- /2021/solution/hw7-function-ordering-solution/tufte-book.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-book}[2009/12/11 v3.5.0 Tufte-book class] 4 | 5 | %% 6 | % Declare we're tufte-book 7 | \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any book-specific stuff now 17 | 18 | %% 19 | % The front matter in Tufte's /Beautiful Evidence/ contains everything up 20 | % to the opening page of Chapter 1. The running heads, when they appear, 21 | % contain only the (arabic) page number in the outside corner. 22 | %\newif\if@mainmatter \@mainmattertrue 23 | \renewcommand\frontmatter{% 24 | \cleardoublepage% 25 | \@mainmatterfalse% 26 | \pagenumbering{arabic}% 27 | %\pagestyle{plain}% 28 | \fancyhf{}% 29 | \ifthenelse{\boolean{@tufte@twoside}}% 30 | {\fancyhead[LE,RO]{\thepage}}% 31 | {\fancyhead[RE,RO]{\thepage}}% 32 | } 33 | 34 | 35 | %% 36 | % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page 37 | % numbering---it continues where it left off in the front matter. 38 | \renewcommand\mainmatter{% 39 | \cleardoublepage% 40 | \@mainmattertrue% 41 | \fancyhf{}% 42 | \ifthenelse{\boolean{@tufte@twoside}}% 43 | {% two-side 44 | \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% 45 | \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title 46 | \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title 47 | }% 48 | {% one-side 49 | \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title 50 | }% 51 | } 52 | 53 | 54 | %% 55 | % The back matter contains appendices, indices, glossaries, endnotes, 56 | % biliographies, list of contributors, illustration credits, etc. 57 | \renewcommand\backmatter{% 58 | \if@openright% 59 | \cleardoublepage% 60 | \else% 61 | \clearpage% 62 | \fi% 63 | \@mainmatterfalse% 64 | } 65 | 66 | %% 67 | % Only show the chapter titles in the table of contents 68 | \setcounter{tocdepth}{0} 69 | 70 | %% 71 | % If there is a `tufte-book-local.sty' file, load it. 72 | 73 | \IfFileExists{tufte-book-local.tex} 74 | {\input{tufte-book-local} 75 | \TufteInfoNL{Loading tufte-book-local.tex}} 76 | {} 77 | 78 | %% 79 | % End of file 80 | \endinput 81 | -------------------------------------------------------------------------------- /2021/solution/hw7-function-ordering-solution/tufte-handout.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-handout}[2009/12/11 v3.5.0 Tufte-handout class] 4 | 5 | %% 6 | % Declare we're tufte-handout 7 | \newcommand{\@tufte@class}{article}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-handout}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any handout-specific stuff now 17 | 18 | %% 19 | % Abstract 20 | 21 | % TODO The abstract should be printed on its own page of the `titlepage' 22 | % option was specified. 23 | \renewenvironment{abstract} 24 | {\begin{quotation}\if@tufte@sfsidenotes\begin{sffamily}\fi} 25 | {\if@tufte@sfsidenotes\end{sffamily}\fi\end{quotation}} 26 | 27 | 28 | %% 29 | % If there is a `tufte-handout-local.tex' file, load it. 30 | 31 | \IfFileExists{tufte-handout-local.tex} 32 | {\input{tufte-handout-local} 33 | \TufteInfoNL{Loading tufte-handout-local.tex}} 34 | {} 35 | 36 | 37 | %% 38 | % End of file 39 | \endinput 40 | -------------------------------------------------------------------------------- /2021/solution/hw7-function-ordering-solution/tufte-preamble.tex: -------------------------------------------------------------------------------- 1 | % \geometry{showframe}% for debugging purposes -- displays the margins 2 | 3 | % Set up the images/graphics package 4 | \usepackage{graphicx} 5 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} 6 | % \graphicspath{{figs/}} 7 | 8 | % The following package makes prettier tables. We're all about the bling! 9 | \usepackage{booktabs} 10 | 11 | % The units package provides nice, non-stacked fractions and better spacing for units. 12 | \usepackage{units} 13 | 14 | % Small sections of multiple columns 15 | \usepackage{multicol} 16 | 17 | % Provides paragraphs of dummy text 18 | \usepackage{lipsum} 19 | 20 | % These commands are used to pretty-print LaTeX commands 21 | \newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically 22 | \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument 23 | \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument 24 | \newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment 25 | \newcommand{\docenv}[1]{\textsf{#1}}% environment name 26 | \newcommand{\docpkg}[1]{\texttt{#1}}% package name 27 | \newcommand{\doccls}[1]{\texttt{#1}}% document class name 28 | \newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name 29 | -------------------------------------------------------------------------------- /2021/solution/hw8-infinity-solution/README.md: -------------------------------------------------------------------------------- 1 | # README.md -------------------------------------------------------------------------------- /2021/solution/hw8-infinity-solution/Schroder-Bernstein-theorem (wiki).pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw8-infinity-solution/Schroder-Bernstein-theorem (wiki).pdf -------------------------------------------------------------------------------- /2021/solution/hw8-infinity-solution/hw8-infinity-solution.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw8-infinity-solution/hw8-infinity-solution.pdf -------------------------------------------------------------------------------- /2021/solution/hw8-infinity-solution/hw8-infinity-solution.tex: -------------------------------------------------------------------------------- 1 | % hw8-infinity-solution.tex 2 | 3 | % !TEX program = xelatex 4 | %%%%%%%%%%%%%%%%%%%% 5 | % see http://mirrors.concertpass.com/tex-archive/macros/latex/contrib/tufte-latex/sample-handout.pdf 6 | % for how to use tufte-handout 7 | \documentclass[a4paper, justified]{tufte-handout} 8 | 9 | \input{hw-preamble} % feel free to modify this file if you understand LaTeX well 10 | %%%%%%%%%%%%%%%%%%%% 11 | \title{8. 集合: 无穷 (8-infinity)} 12 | \me{魏恒峰}{hfwei@nju.edu.cn}{}{} 13 | \date{2021年04月29日 发布作业 \\ 2021年06月06日 发布答案} 14 | %%%%%%%%%%%%%%%%%%%% 15 | \begin{document} 16 | \maketitle 17 | %%%%%%%%%%%%%%%%%%%% 18 | \noplagiarism % PLEASE DON'T DELETE THIS LINE! 19 | %%%%%%%%%%%%%%%%%%%% 20 | \begin{abstract} 21 | % \mfigcap{width = 0.85\textwidth}{figs/George-Boole}{George Boole} 22 | % \begin{center}{\fcolorbox{blue}{yellow!60}{\parbox{0.65\textwidth}{\large 23 | % \begin{itemize} 24 | % \item 25 | % \end{itemize}}}} 26 | % \end{center} 27 | \end{abstract} 28 | %%%%%%%%%%%%%%%%%%%% 29 | \beginrequired 30 | %%%%%%%%%%%%%%% 31 | 32 | %%%%%%%%%%%%%%% 33 | \begin{problem}[\score{3} $\star\star\star$] 34 | 考虑由所有$0$, $1$串构成的集合 ($\set{0, 1, 111, 01010101010, 101010101, \dots}$)。 35 | 请问, 该集合是否是可数集合, 请给出理由。 36 | \end{problem} 37 | 38 | \begin{proof} 39 | 由 Cantor 的对角线论证法易知该集合是不可数的~\footnote{有同学认为该集合是可数的, 40 | 理由是可以将$0$,$1$串解释为二进制表示的自然数。 41 | 这种映射的问题在于, 有的$0$,$1$串, 比如 $11111\dots$, 是发散的, 42 | 对应于 $\infty$, 而 $\infty$ 不是自然数。}。 43 | \end{proof} 44 | %%%%%%%%%%%%%%% 45 | 46 | %%%%%%%%%%%%%%% 47 | \begin{problem}[\score{4} $\star\star\star$] 48 | 考虑如下命题: 49 | 50 | ``存在可数无穷多个两两不相交的非空集合, 它们的并是有穷集合。'' 51 | 52 | \noindent 请问, 该命题是否正确。如果正确, 请给出例子。如果不正确, 请给出(反面的)证明。 53 | \end{problem} 54 | 55 | \begin{proof} 56 | 该命题不正确。反设它们的并是有穷集合, 记为 $A$。 57 | 设 $|A| = n$, 则 $|\ps{A}| = 2^{n}$。 58 | 因此不可能存在 $A$ 的可数无穷多个两两不相交的非空集合。矛盾。 59 | \end{proof} 60 | %%%%%%%%%%%%%%% 61 | 62 | %%%%%%%%%%%%%%% 63 | \begin{problem}[\score{3} $\star\star\star\star$] 64 | 请自行查找并阅读 Cantor-Schr\"{o}der–Bernstein 定理的某个证明, 65 | 理解它, 放下你手头的资料~\footnote{不要偷看哦}, 然后尝试自己写出这个证明~\footnote{ 66 | 是不是又偷看了 (为什么明明懂了, 但就是表达不出来?)}。 67 | 68 | \vspace{1em} 69 | \noindent 以下证明供参考~\footnote{pdf 版本见``\textsl{8-infinity.zip}''压缩包}: 70 | {\href{https://en.wikipedia.org/wiki/Schr\%C3\%B6der\%E2\%80\%93Bernstein\_theorem}{\teal{\footnotesize Schr\"{o}der–Bernstein theorem @ wiki}}} 71 | \end{problem} 72 | 73 | \begin{proof} 74 | 略。 75 | \end{proof} 76 | %%%%%%%%%%%%%%% 77 | %%%%%%%%%%%%%%%%%%%% 78 | % 如果没有需要订正的题目,可以把这部分删掉 79 | 80 | \begincorrection 81 | %%%%%%%%%%%%%%%%%%%% 82 | 83 | %%%%%%%%%%%%%%%%%%%% 84 | % 如果没有反馈,可以把这部分删掉 85 | \beginfb 86 | 87 | 你可以写 (也可以发邮件或者使用``教学立方'') 88 | \begin{itemize} 89 | \item 对课程及教师的建议与意见 90 | \item 教材中不理解的内容 91 | \item 希望深入了解的内容 92 | \item $\cdots$ 93 | \end{itemize} 94 | %%%%%%%%%%%%%%%%%%%% 95 | \end{document} -------------------------------------------------------------------------------- /2021/solution/hw8-infinity-solution/tufte-book.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-book}[2009/12/11 v3.5.0 Tufte-book class] 4 | 5 | %% 6 | % Declare we're tufte-book 7 | \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any book-specific stuff now 17 | 18 | %% 19 | % The front matter in Tufte's /Beautiful Evidence/ contains everything up 20 | % to the opening page of Chapter 1. The running heads, when they appear, 21 | % contain only the (arabic) page number in the outside corner. 22 | %\newif\if@mainmatter \@mainmattertrue 23 | \renewcommand\frontmatter{% 24 | \cleardoublepage% 25 | \@mainmatterfalse% 26 | \pagenumbering{arabic}% 27 | %\pagestyle{plain}% 28 | \fancyhf{}% 29 | \ifthenelse{\boolean{@tufte@twoside}}% 30 | {\fancyhead[LE,RO]{\thepage}}% 31 | {\fancyhead[RE,RO]{\thepage}}% 32 | } 33 | 34 | 35 | %% 36 | % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page 37 | % numbering---it continues where it left off in the front matter. 38 | \renewcommand\mainmatter{% 39 | \cleardoublepage% 40 | \@mainmattertrue% 41 | \fancyhf{}% 42 | \ifthenelse{\boolean{@tufte@twoside}}% 43 | {% two-side 44 | \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% 45 | \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title 46 | \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title 47 | }% 48 | {% one-side 49 | \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title 50 | }% 51 | } 52 | 53 | 54 | %% 55 | % The back matter contains appendices, indices, glossaries, endnotes, 56 | % biliographies, list of contributors, illustration credits, etc. 57 | \renewcommand\backmatter{% 58 | \if@openright% 59 | \cleardoublepage% 60 | \else% 61 | \clearpage% 62 | \fi% 63 | \@mainmatterfalse% 64 | } 65 | 66 | %% 67 | % Only show the chapter titles in the table of contents 68 | \setcounter{tocdepth}{0} 69 | 70 | %% 71 | % If there is a `tufte-book-local.sty' file, load it. 72 | 73 | \IfFileExists{tufte-book-local.tex} 74 | {\input{tufte-book-local} 75 | \TufteInfoNL{Loading tufte-book-local.tex}} 76 | {} 77 | 78 | %% 79 | % End of file 80 | \endinput 81 | -------------------------------------------------------------------------------- /2021/solution/hw8-infinity-solution/tufte-handout.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-handout}[2009/12/11 v3.5.0 Tufte-handout class] 4 | 5 | %% 6 | % Declare we're tufte-handout 7 | \newcommand{\@tufte@class}{article}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-handout}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any handout-specific stuff now 17 | 18 | %% 19 | % Abstract 20 | 21 | % TODO The abstract should be printed on its own page of the `titlepage' 22 | % option was specified. 23 | \renewenvironment{abstract} 24 | {\begin{quotation}\if@tufte@sfsidenotes\begin{sffamily}\fi} 25 | {\if@tufte@sfsidenotes\end{sffamily}\fi\end{quotation}} 26 | 27 | 28 | %% 29 | % If there is a `tufte-handout-local.tex' file, load it. 30 | 31 | \IfFileExists{tufte-handout-local.tex} 32 | {\input{tufte-handout-local} 33 | \TufteInfoNL{Loading tufte-handout-local.tex}} 34 | {} 35 | 36 | 37 | %% 38 | % End of file 39 | \endinput 40 | -------------------------------------------------------------------------------- /2021/solution/hw8-infinity-solution/tufte-preamble.tex: -------------------------------------------------------------------------------- 1 | % \geometry{showframe}% for debugging purposes -- displays the margins 2 | 3 | % Set up the images/graphics package 4 | \usepackage{graphicx} 5 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} 6 | % \graphicspath{{figs/}} 7 | 8 | % The following package makes prettier tables. We're all about the bling! 9 | \usepackage{booktabs} 10 | 11 | % The units package provides nice, non-stacked fractions and better spacing for units. 12 | \usepackage{units} 13 | 14 | % Small sections of multiple columns 15 | \usepackage{multicol} 16 | 17 | % Provides paragraphs of dummy text 18 | \usepackage{lipsum} 19 | 20 | % These commands are used to pretty-print LaTeX commands 21 | \newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically 22 | \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument 23 | \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument 24 | \newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment 25 | \newcommand{\docenv}[1]{\textsf{#1}}% environment name 26 | \newcommand{\docpkg}[1]{\texttt{#1}}% package name 27 | \newcommand{\doccls}[1]{\texttt{#1}}% document class name 28 | \newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name 29 | -------------------------------------------------------------------------------- /2021/solution/hw9-paths-cycles-solution/README.md: -------------------------------------------------------------------------------- 1 | # README.md -------------------------------------------------------------------------------- /2021/solution/hw9-paths-cycles-solution/figs/5-room.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw9-paths-cycles-solution/figs/5-room.png -------------------------------------------------------------------------------- /2021/solution/hw9-paths-cycles-solution/figs/Euler-graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw9-paths-cycles-solution/figs/Euler-graph.png -------------------------------------------------------------------------------- /2021/solution/hw9-paths-cycles-solution/figs/chessboard-4-n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw9-paths-cycles-solution/figs/chessboard-4-n.png -------------------------------------------------------------------------------- /2021/solution/hw9-paths-cycles-solution/hw9-paths-cycles-solution.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw9-paths-cycles-solution/hw9-paths-cycles-solution.pdf -------------------------------------------------------------------------------- /2021/solution/hw9-paths-cycles-solution/hw9-paths-cycles-solution.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/solution/hw9-paths-cycles-solution/hw9-paths-cycles-solution.zip -------------------------------------------------------------------------------- /2021/solution/hw9-paths-cycles-solution/tufte-book.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-book}[2009/12/11 v3.5.0 Tufte-book class] 4 | 5 | %% 6 | % Declare we're tufte-book 7 | \newcommand{\@tufte@class}{book}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-book}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any book-specific stuff now 17 | 18 | %% 19 | % The front matter in Tufte's /Beautiful Evidence/ contains everything up 20 | % to the opening page of Chapter 1. The running heads, when they appear, 21 | % contain only the (arabic) page number in the outside corner. 22 | %\newif\if@mainmatter \@mainmattertrue 23 | \renewcommand\frontmatter{% 24 | \cleardoublepage% 25 | \@mainmatterfalse% 26 | \pagenumbering{arabic}% 27 | %\pagestyle{plain}% 28 | \fancyhf{}% 29 | \ifthenelse{\boolean{@tufte@twoside}}% 30 | {\fancyhead[LE,RO]{\thepage}}% 31 | {\fancyhead[RE,RO]{\thepage}}% 32 | } 33 | 34 | 35 | %% 36 | % The main matter in Tufte's /Beautiful Evidence/ doesn't restart the page 37 | % numbering---it continues where it left off in the front matter. 38 | \renewcommand\mainmatter{% 39 | \cleardoublepage% 40 | \@mainmattertrue% 41 | \fancyhf{}% 42 | \ifthenelse{\boolean{@tufte@twoside}}% 43 | {% two-side 44 | \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% 45 | \fancyhead[LE]{\thepage\quad\smallcaps{\newlinetospace{\plaintitle}}}% book title 46 | \fancyhead[RO]{\smallcaps{\newlinetospace{\leftmark}}\quad\thepage}% chapter title 47 | }% 48 | {% one-side 49 | \fancyhead[RE,RO]{\smallcaps{\newlinetospace{\plaintitle}}\quad\thepage}% book title 50 | }% 51 | } 52 | 53 | 54 | %% 55 | % The back matter contains appendices, indices, glossaries, endnotes, 56 | % biliographies, list of contributors, illustration credits, etc. 57 | \renewcommand\backmatter{% 58 | \if@openright% 59 | \cleardoublepage% 60 | \else% 61 | \clearpage% 62 | \fi% 63 | \@mainmatterfalse% 64 | } 65 | 66 | %% 67 | % Only show the chapter titles in the table of contents 68 | \setcounter{tocdepth}{0} 69 | 70 | %% 71 | % If there is a `tufte-book-local.sty' file, load it. 72 | 73 | \IfFileExists{tufte-book-local.tex} 74 | {\input{tufte-book-local} 75 | \TufteInfoNL{Loading tufte-book-local.tex}} 76 | {} 77 | 78 | %% 79 | % End of file 80 | \endinput 81 | -------------------------------------------------------------------------------- /2021/solution/hw9-paths-cycles-solution/tufte-handout.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 2 | 3 | \ProvidesClass{tufte-handout}[2009/12/11 v3.5.0 Tufte-handout class] 4 | 5 | %% 6 | % Declare we're tufte-handout 7 | \newcommand{\@tufte@class}{article}% the base LaTeX class (defaults to the article/handout style) 8 | \newcommand{\@tufte@pkgname}{tufte-handout}% the name of the package (defaults to tufte-handout) 9 | 10 | %% 11 | % Load the common style elements 12 | \input{tufte-common.def} 13 | 14 | 15 | %% 16 | % Set up any handout-specific stuff now 17 | 18 | %% 19 | % Abstract 20 | 21 | % TODO The abstract should be printed on its own page of the `titlepage' 22 | % option was specified. 23 | \renewenvironment{abstract} 24 | {\begin{quotation}\if@tufte@sfsidenotes\begin{sffamily}\fi} 25 | {\if@tufte@sfsidenotes\end{sffamily}\fi\end{quotation}} 26 | 27 | 28 | %% 29 | % If there is a `tufte-handout-local.tex' file, load it. 30 | 31 | \IfFileExists{tufte-handout-local.tex} 32 | {\input{tufte-handout-local} 33 | \TufteInfoNL{Loading tufte-handout-local.tex}} 34 | {} 35 | 36 | 37 | %% 38 | % End of file 39 | \endinput 40 | -------------------------------------------------------------------------------- /2021/solution/hw9-paths-cycles-solution/tufte-preamble.tex: -------------------------------------------------------------------------------- 1 | % \geometry{showframe}% for debugging purposes -- displays the margins 2 | 3 | % Set up the images/graphics package 4 | \usepackage{graphicx} 5 | \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} 6 | % \graphicspath{{figs/}} 7 | 8 | % The following package makes prettier tables. We're all about the bling! 9 | \usepackage{booktabs} 10 | 11 | % The units package provides nice, non-stacked fractions and better spacing for units. 12 | \usepackage{units} 13 | 14 | % Small sections of multiple columns 15 | \usepackage{multicol} 16 | 17 | % Provides paragraphs of dummy text 18 | \usepackage{lipsum} 19 | 20 | % These commands are used to pretty-print LaTeX commands 21 | \newcommand{\doccmd}[1]{\texttt{\textbackslash#1}}% command name -- adds backslash automatically 22 | \newcommand{\docopt}[1]{\ensuremath{\langle}\textrm{\textit{#1}}\ensuremath{\rangle}}% optional command argument 23 | \newcommand{\docarg}[1]{\textrm{\textit{#1}}}% (required) command argument 24 | \newenvironment{docspec}{\begin{quote}\noindent}{\end{quote}}% command specification environment 25 | \newcommand{\docenv}[1]{\textsf{#1}}% environment name 26 | \newcommand{\docpkg}[1]{\texttt{#1}}% package name 27 | \newcommand{\doccls}[1]{\texttt{#1}}% document class name 28 | \newcommand{\docclsopt}[1]{\texttt{#1}}% document class option name 29 | -------------------------------------------------------------------------------- /2021/zip/problems/hw0-overview.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/zip/problems/hw0-overview.zip -------------------------------------------------------------------------------- /2021/zip/problems/hw1-prop-logic.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/zip/problems/hw1-prop-logic.zip -------------------------------------------------------------------------------- /2021/zip/problems/hw10-trees.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/zip/problems/hw10-trees.zip -------------------------------------------------------------------------------- /2021/zip/problems/hw11-planarity-coloring.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/zip/problems/hw11-planarity-coloring.zip -------------------------------------------------------------------------------- /2021/zip/problems/hw12-matching-flow.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/zip/problems/hw12-matching-flow.zip -------------------------------------------------------------------------------- /2021/zip/problems/hw13-group.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/zip/problems/hw13-group.zip -------------------------------------------------------------------------------- /2021/zip/problems/hw14-subgroup.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/zip/problems/hw14-subgroup.zip -------------------------------------------------------------------------------- /2021/zip/problems/hw2-predicate-logic.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/zip/problems/hw2-predicate-logic.zip -------------------------------------------------------------------------------- /2021/zip/problems/hw3-induction.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/zip/problems/hw3-induction.zip -------------------------------------------------------------------------------- /2021/zip/problems/hw4-set.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/zip/problems/hw4-set.zip -------------------------------------------------------------------------------- /2021/zip/problems/hw5-relation.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/zip/problems/hw5-relation.zip -------------------------------------------------------------------------------- /2021/zip/problems/hw6-function.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/zip/problems/hw6-function.zip -------------------------------------------------------------------------------- /2021/zip/problems/hw7-function-partial-order.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/zip/problems/hw7-function-partial-order.zip -------------------------------------------------------------------------------- /2021/zip/problems/hw8-infinity.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/zip/problems/hw8-infinity.zip -------------------------------------------------------------------------------- /2021/zip/problems/hw9-paths-cycles.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/zip/problems/hw9-paths-cycles.zip -------------------------------------------------------------------------------- /2021/zip/solutions/hw0-overview-solution.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/zip/solutions/hw0-overview-solution.zip -------------------------------------------------------------------------------- /2021/zip/solutions/hw1-prop-logic-solution.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/zip/solutions/hw1-prop-logic-solution.zip -------------------------------------------------------------------------------- /2021/zip/solutions/hw10-trees-solution.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/zip/solutions/hw10-trees-solution.zip -------------------------------------------------------------------------------- /2021/zip/solutions/hw11-planarity-coloring-solution.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/zip/solutions/hw11-planarity-coloring-solution.zip -------------------------------------------------------------------------------- /2021/zip/solutions/hw12-matching-flow-solution.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/zip/solutions/hw12-matching-flow-solution.zip -------------------------------------------------------------------------------- /2021/zip/solutions/hw13-group-solution.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/zip/solutions/hw13-group-solution.zip -------------------------------------------------------------------------------- /2021/zip/solutions/hw14-subgroup-solution.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/zip/solutions/hw14-subgroup-solution.zip -------------------------------------------------------------------------------- /2021/zip/solutions/hw2-predicate-logic-solution.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/zip/solutions/hw2-predicate-logic-solution.zip -------------------------------------------------------------------------------- /2021/zip/solutions/hw3-induction-solution.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/zip/solutions/hw3-induction-solution.zip -------------------------------------------------------------------------------- /2021/zip/solutions/hw4-set-solution.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/zip/solutions/hw4-set-solution.zip -------------------------------------------------------------------------------- /2021/zip/solutions/hw5-relation-solution.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/zip/solutions/hw5-relation-solution.zip -------------------------------------------------------------------------------- /2021/zip/solutions/hw6-function-solution.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/zip/solutions/hw6-function-solution.zip -------------------------------------------------------------------------------- /2021/zip/solutions/hw7-function-ordering-solution.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/zip/solutions/hw7-function-ordering-solution.zip -------------------------------------------------------------------------------- /2021/zip/solutions/hw8-infinity-solution.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/zip/solutions/hw8-infinity-solution.zip -------------------------------------------------------------------------------- /2021/zip/solutions/hw9-paths-cycles-solution.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/courses-at-nju-by-hfwei/discrete-math-problem-sets/515d63f5640eb8b570cff9094963787cc935a4aa/2021/zip/solutions/hw9-paths-cycles-solution.zip -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 courses-at-nju-by-hfwei 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # discrete-math-problem-sets 2 | Problem Sets for Discrete Mathematics @ software.nju.edu.cn 3 | --------------------------------------------------------------------------------