求救~離散數學作業問題


Recommended Posts

我有幾個離散數學的問題想請教大家

Q1 Two n-digit integers(leading zeros allowed) are considered equivalent if one is a rearrangement of the other.(EX,12033,20331,and 01332 are considered equivalent five-digit integers.)(a)How many five-digit integers are not equivalent?(b)If the digits 1,3,and 7 can appear at most once,how many nonequivalent five-digit integers are there?

Q2 Consider the collections of all strings of length 10 made up from the alphabet 0,1,2,and 3.How many of these strings have weight 3?How many have even weight?

Q3 How many distinct four-digit integers can one make from the digits 1,3,3,7,7,and 8?

有的問題會有兩個問題,麻煩大家幫我解惑,課本沒有解答,和同學討論過也不會,所以請各位幫忙!謝謝!

鏈接文章
分享到其他網站

A1:題目意思是排列不算數 那麼自然是算選法 也就是說

  (a) 小題等於是問:從 0 ~ 9 選出五個數而且可重複 有幾種選法? 所以 答案是 14取5 = 14!/( 9!‧5! )

  (b) 小題等於是問:從 0 ~ 9 選出五個數可重複但 1, 3, 7 最多選一次 有幾種選法?

   做法的話 分類處理

   (i) 沒選到 1, 3, 7 :等於從 0, 2, 4, 5, 6, 8, 9 選出五個數而且可重複 所以有 11取5 = 462 種

   (ii) 選到 1, 3, 7 之中的一個 再從 0, 2, 4, 5, 6, 8, 9 選出個數而且可重複 所以是 3倍的 10取4 = 630 種

   (iii) 選到 1, 3, 7 之中的兩個 再從 0, 2, 4, 5, 6, 8, 9 選出個數而且可重複 所以是 3倍的 9取3 = 252 種

   (iv) 選到 1, 3, 7 之中的三個 再從 0, 2, 4, 5, 6, 8, 9 選出個數而且可重複 所以是 8取2 = 28 種

   全加起來是 1372

鏈接文章
分享到其他網站

A2:先定義 weight: The weight of a string is the sum of all its digits

  For examples, the weight of 2356 is 2+3+5+6=16 the weight of abcde is a+b+c+d+e 

所以 此題跟第一題一樣還是重複選擇的問題

或是說 此題跟問 a+b+c+d+e+f+g+h+i+j=3 有幾種非負整數解一樣

所以 答案是 12取3=12!/( 9!‧3! )

鏈接文章
分享到其他網站

A3:這一題慢慢做就很快了

1 和 8 都沒選 選法1種 考慮排列得 4!/(2!‧2!) = 6

選 1 沒選 8 選法2種 考慮排列得 4!/2! + 4!/2! =24

沒選 1 有選 8 選法2種 考慮排列得 4!/2! + 4!/2! =24

1 和 8 都選 選法3種 考慮排列得 4!+(4!/2!)+(4!/2!)=48

共 6+24+24+48=102

此內容已被編輯, ,由 曾阿牛
鏈接文章
分享到其他網站

請登入後來留意見

在登入之後,您才能留意見



立即登入