sjshyu

@sjshyu

Joined on Jun 10, 2022

  • ![](https://i.imgur.com/XhOgjPI.jpg =240x) ==About me== Professor Department of Computer Science and Information Engineering Ming Chuan University 5 De Ming Rd., Gui Shan, Taoyuan 333, Taiwan :email: sjshyu@mail.mcu.edu.tw, sjshyu@gmail.com
     Like  Bookmark
  • ==Please explain each term in your solution precisely.== ==請精準解釋解題過程中的每一算式/項== (有多項時可善用 $1, 2, ... , n$ 的表示法:解釋第1項, 解釋第2項, ... , 解釋第$n$項) ==所附解答並未各項解釋,凡需要時,請自行完成之==。 Chapter 1. Fundamental Principles of Couting (計數的基本原理) [作業一] 1. ($\S 1.1\ \sharp 3$) $Buick\ automobiles\ come\ in\ four\ models,\ 12\ colors,\ three\ engine\ sizes,\ and\ two\ transmission\ types.$ $(a)How\ many\ distinct\ Buicks\ can\ be\ manufactured?$ $(b)\ If\ one\ of\ the\ available\ colors\ is\ blue,\ how\ many\ different\ blue\ Buicks\ can\ be\ manufactured?$ :::spoiler 中文 $Buick\ (別克)汽車有4個型號、12種顏色、3種引擎尺寸和2種變速器類型。$
     Like  Bookmark
  • 徐熊健 <br> 上次更新日期:Nov. 2024, Aug. 2024, July 2024, Feb. 2024, <br>Sep. 2023; 2023, 7, 22/ <br> 2023, 2, 19/2023, 2, 9, (2023/1/26 前者已更正) <br><br> 若有其他發現,請利用留言功能(頁面右上角圖示) 留下更正或建議,謝謝! image $頁數$ 行數/區段 錯誤 更正 1-33 頁末最後<br>一段落
     Like  Bookmark
  • Permutations/Combinations of size $r$ from $n$ distinct objects Order Relevant Repetition Number of Distributions Interpretation yes no $P(n, r)$ # Arrangements with repetition of size $r$ from $n$ distinct objects
     Like  Bookmark
  • An $L_1$-block is a fundamental block structure composed of three 1×1 tiles arranged in an 'L' shape. There are four possible orientations for an $L_1$-block, each corresponding to a different rotation of the 'L' shape as shown in Fig. 1. $$\text{Fig. 1 Four types of } L_1\text{-blocks}$$ In fact, we can describe an $L_1$-block as a $2\times 2$ square containing three tiles and one empty cell. Let $L_1(x,y)$ denote the $L_1$-block with its empty cell positioned at $(x, y)$ for $0\le x,\ y\le 1$. Specifically, the above four $L_1$-blocks are designated as $L_1(0,0)$, $L_1(0,1)$, $L_1(1,0)$ and $L_1(1,1)$, respectively. We define an $L_n$-block as a $2^n\times 2^n$ square composed of $2^n\times 2^n-1$ tiles and a single empty cell, which can be specifically denoted as $L_n(x,y)$ with its empty cell positioned at $(x, y)$ for $0\le x,\ y\le 2^n-1$. Then, the following theorem holds. :::info
     Like  Bookmark
  • Building Generating Functions In some circustances, we utilize a function to encode an infinite sequence. Specifically, we look at a function whose power series “displays” the terms of the sequence. For example, we would look at the power series $1+x+2x^2+3x^3+5x^4+8x^5+\cdots$ which displays the sequence $1, 1, 2, 3, 5, 8, \cdots$ as coefficients. Since an infinite power series is simply an infinite sum of terms of the form $c_nx^n$ where $c_n$ is some constant, we might write a power series as: $\qquad\qquad\qquad\sum_{k=0}^{\infty}c_kx^k$, or expand it as $\qquad\qquad\qquad c_0+c_1x+c_2x^2+c_3x^3+c_4x^4+\cdots$. In the context of generating functions, we call such a power series a $generating\ series$. The generating series generates the sequence $\qquad\qquad\qquad c_0,\ c_1x,\ c_2x^2,\ c_3x^3,\ c_4x^4,\ \cdots$ . In other words, the sequence generated by a generating series is simply the sequence of coefficients of the infinite polynomial.
     Like  Bookmark
  • for i1 = 1 to n do for i2 = 1 to min(i1,n-1) do for i3 = 1 to min(i2,n-2) do ... for in_1 = 1 to min(in-2,2) do for in = 1 to 1 do print i1,i2,i3,...,in Show that print statement is executed $C_n$ times,where $C_n$ denotes the $n$th Catalan number. :::info
     Like  Bookmark
  • :::info $Visual\ cryptography$ was first introduced by Naor and Shamir at Eurocrypt’94. ![](https://hackmd.io/_uploads/ryUYm5KgT.png =20%x) $\quad$ ![](https://hackmd.io/_uploads/HJaLmcYl6.png =20%x) Moni Naor $\qquad\qquad$ Adi Shamir ![](https://hackmd.io/_uploads/r1x59qFgT.png =80%x) :::
     Like 1 Bookmark
  • 高立圖書:512326 即時更新請見:https://hackmd.io/@sjshyu/DS_Exercises_Ch5-7 第五章 樹 1. 針對程式 5-1 一般化串列鏈結節點的宣告,設計樹的輸入,寫出必要的程序,使能完成樹的一般化鏈結串列的建構。 :::spoiler Add (struct TreeNode *p, struct TreeNode *subtree) { struct TreeNode *s; s->tag = 1; s->link = p->link;
     Like  Bookmark
  • Test_0510 1. Ex. 9.1 Mildred buys 12 oranges for her children, Grace, Mary, and Frank. In how many ways can she distribute the oranges so that Grace gets at least four, and Mary and Frank get at least two, but Frank gets no more than five? image 2. Combinations with repetition of 3 distinct objects In how many ways can we select distinct objects $a, b, c$ such that at most $3, 2, 1$ times, respectively?
     Like  Bookmark
  • 總審中_2012_1019_small 南寮_機車_1_compressed_no date (1) 天母吉普車 mouse_2024 mouse_2024 mouse_2024
     Like  Bookmark
  • 高立圖書:512326 即時更新請見:https://hackmd.io/@sjshyu/DS_Exercises_Ch1-4 第一章 基本概念 1. 寫一個程序,將傳入的整數參數 $x$、$y$ 和 $z$ 由小到大印出。此程序的計算時間為多少? :::spoiler 可利用 bubble sort 的概念: # include <stdio.h> # include <iostream> using namespace std; void print_nondecreasingly(int x, int y, int z)
     Like 3 Bookmark
  • 純粹看電影 只有感動 The Godfather (1972) :::spoiler 謝謝教父讓我認識電影的魔力;大一的某個週六在中正堂見識到了... "The Godfather" is a 1972 American crime film D: Francis Ford Coppola, based on the novel of the same name by Mario Puzo. A: Marlon Brando, Al Pacino, Academy Award for Best Picture and Best Adapted Screenplay for Mario Puzo and Francis Ford Coppola. "The Godfather Part II" (1974)
     Like 1 Bookmark
  • 離散數學 Q&A [sjshyu@DiscreteMath ] p.10 EXAMPLE 1.15 If $n$ and $k$ are positive integers with $n=2^k$, then $n!/2^k$ is an integer. 若 $n = 3k$,則 $\displaystyle\frac{n!}{3^k}$ 必為整數,其中 $k$ 為正整數。 証明:考慮 $x_1, x_1, x_1, x_2, x_2, x_2, ... , x_k, x_k, x_k$ 為 $k$ 組相異物件,每組重複三個,總個數為 $n$;<br> 這 $n$ 個(含重複)物件的排列個數為:$\alpha =\displaystyle\frac{n!}{(3!)(3!)...(3!)} = \frac{n!}{(3!)^k} = \frac{n!}{(3\times 2\times 1)^k}= \frac{n!}{3^k2^k}$ <br> 因其為排列的個數,故 $\alpha$ 必為整數! $\displaystyle\frac{n!}{3^k} = 2^k\times\frac{n!}{3^k2^k} = 2^k\times\alpha$ 亦為整數 (因 $\alpha$ 為整數,以 $2^k$ 乘之依然為整數);原題得証。 此題可沿伸:若 $n = 3k$,則 $\displaystyle\frac{n!}{3^k2^k}$、$\displaystyle\frac{n!}{3^k}$、$\displaystyle\frac{n!}{2^k}$ 皆為整數。 再沿伸:若 $n = \beta k$,則 $\displaystyle\frac{n!}{(\beta!)^k}$、$\displaystyle\frac{n!}{\beta^k}$、$\displaystyle\frac{n!}{(\beta-1)^k}$、$...、$ $\displaystyle\frac{n!}{2^k}$、$n!$ 皆為整數。
     Like 1 Bookmark
  • Given a number $x$, $clz(x)$ returns the number of leading zeros in the binary representation of $x$. Below show some examples where the word size storing $x$ is 8: Table 1. Examples of $x$ and $clz(x)$ of word-size 8 $x$ $(x)_2$ $clz(x)$ 2 00000010
     Like  Bookmark
  • 第五章 樹 1. 針對程式 5-1 一般化串列鏈結節點的宣告,設計樹的輸入,寫出必要的程序,使能完成樹的一般化鏈結串列的建構。 :::spoiler Add (struct TreeNode *p, struct TreeNode *subtree) { struct TreeNode *s; s->tag = 1; s->link = p->link; p->link = s; s->node = subtree;
     Like  Bookmark
  • 第一章 基本概念 1. 寫一個程序,將傳入的整數參數 x、y 和 z 由小到大印出。此程序的計算時間為多少? :::spoiler 可利用 bubble sort 的概念: # include <stdio.h> # include <iostream> using namespace std; void print_nondecreasingly(int x, int y, int z) { int t;
     Like 2 Bookmark