an application that finds the smallest of several integers. Assume that the first value read specifies the number of values to input from the user
標簽: that application the smallest
上傳時間: 2016-05-05
上傳用戶:yiwen213
vhdl編寫,8b—10b 編解碼器設計 Encoder: 8b/10b Encoder (file: 8b10b_enc.vhd) Synchronous clocked inputs (latched on each clock rising edge) 8-bit parallel unencoded data input KI input selects data or control encoding Asynchronous active high reset initializes all logic Encoded data output 10-bit parallel encoded output valid 1 clock later Decoder: 8b/10b Decoder (file: 8b10b_dec.vhd) Synchronous clocked inputs (latched on each clock rising edge) 10-bit parallel encoded data input Asynchronous active high reset initializes all logic Decoded data, disparity and KO outputs 8-bit parallel unencoded output valid 1 clock later
上傳時間: 2016-05-05
上傳用戶:gundamwzc
Data_Structures_and_Algorithms - These notes accompany Data Structures and Algorithms II. The course, to a large extent, follows on from Data Structures and Algorithms I. However, while DS&A I focused on fundamental datastructures, DS&A II will focus on practical algorithms, applicable to a wide range of tasks. The approach will be somewhat less formal, with a little more focus on applications.
標簽: Data_Structures_and_Algorithms Algorithms Structures accompany
上傳時間: 2016-05-08
上傳用戶:阿四AIR
v1.3.0 更新內容: + [調整] 安裝文件的人性化!HOT! + [調整] 模板全面調整!HOT! + [修復] 發(fā)帖 editblog.php 的時間部分做了調整,增加了日歷直接選定。 + [修復] 通過ID直接查找文章的 input框 原本回車進入空白頁面,現解決 + [修復] 評論管理功能 + [修復] RSS2.0的修復
上傳時間: 2016-05-09
上傳用戶:風之驕子
This example demonstrates the use of the ADC block and PWM blocks. The generated DSP code produces the pulse waveform whose duty cycle is changing as the voltage applied to ADC input changes. The waveform period is kept constant.
標簽: demonstrates the generated produces
上傳時間: 2016-05-17
上傳用戶:sjyy1001
算法實現題1-2 連續(xù)和問題 « 問題描述: 給定一個正整數n,計算有多少個不同的連續(xù)自然數段,其和恰為n。例如,當n=27 時,有4 個不同的連續(xù)自然數段的和恰為27:2+3+4+5+6+7;8+9+10;13+14;27。 « 編程任務: 給定一個正整數n,試設計一個O(n)時間算法,計算有多少個不同的連續(xù)自然數段的 和恰為n。 « 數據輸入: 由文件input.txt提供輸入數據。文件的第1 行是正整數n。 « 結果輸出: 程序運行結束時,將計算出的和恰為n的連續(xù)自然數段的個數輸出到output.txt中。 輸入文件示例 輸出文件示例 input.txt 27 output.txt 4
上傳時間: 2016-05-28
上傳用戶:yulg
Ex3-23 親兄弟問題 « 問題描述: 給定n 個整數0 1 1 , , , n- a a a 組成的序列。序列中元素i a 的親兄弟元素k a 定義為: min{ | } k i j n j j i a = a a ³ a < < 。 親兄弟問題要求給定序列中每個元素的親兄弟元素的位置。元素i a 的親兄弟元素為k a 時,稱k 為元素i a 的親兄弟元素的位置。當元素i a 沒有親兄弟元素時,約定其親兄弟元素 的位置為-1。 例如,當n=10,整數序列為6,1,4,3,6,2,4,7,3,5 時,相應的親兄弟元素位 置序列為:4,2,4,4,7,6,7,-1,9,-1。 « 編程任務: 對于給定的n個整數0 1 1 , , , n- a a a 組成的序列,試用抽象數據類型棧,設計一個O(n) 時間算法,計算相應的親兄弟元素位置序列。 « 數據輸入: 由文件input.txt提供輸入數據。文件的第1 行有1 個正整數n,表示給定給n個整數。 第2 行是0 1 1 , , , n- a a a 。 « 結果輸出: 程序運行結束時,將計算出的與給定序列相應的親兄弟元素位置序列輸出到output.txt 中。 輸入文件示例 輸出文件示例 input.txt 10 4 2 4 4 7 6 7 -1 9 -1 output.txt 6 1 4 3 6 2 4 7 3 5
上傳時間: 2013-12-17
上傳用戶:shizhanincc
Ex8-4 匯點問題 « 問題描述: 采用鄰接矩陣表示一個具有n 個頂點的圖時,大多數關于圖的算法時間復雜性為 O(n2 ),但也有例外。例如,即使采用鄰接矩陣表示一個有向圖G,確定G 是否含有一個 匯(即入度為n-1,出度為0 的頂點),只需要O(n)計算時間。試寫出其算法。 « 編程任務: 對于給定的有n個頂點的圖G 的鄰接矩陣,各頂點依次編號為1,2,…,n。試設計一 個O(n)時間算法,計算圖G 的匯點。 « 數據輸入: 由文件input.txt提供輸入數據。文件的第1 行有1 個正整數n,表示圖G 中頂點個數。 第2 行起每行n個數,共n行,給出圖G 的鄰接矩陣。 « 結果輸出: 程序運行結束時,將計算出的匯點編號輸出到output.txt中。當圖G 沒有匯點時輸出0。 輸入文件示例 輸出文件示例 input.txt 5 0 0 1 1 1 1 0 1 1 1 0 0 0 0 0 1 0 1 1 1 0 1 1 0 0 output.txt 3
上傳時間: 2013-12-25
上傳用戶:yyyyyyyyyy
算法實現題1-5 最大間隙問題 « 問題描述: 最大間隙問題:給定n 個實數x , , xn 1 2 ,求這n 個數在實軸上相鄰2 個數之間的最 大差值。假設對任何實數的下取整函數耗時O(1),設計解最大間隙問題的線性時間算法。 « 編程任務: 對于給定的n 個實數n x , x , , x 1 2 ,編程計算它們的最大間隙。 « 數據輸入: 輸入數據由文件名為input.txt的文本文件提供。文件的第1 行有1 個正整數n。接下來 的1 行中有n個實數n x , x , , x 1 2 。 « 結果輸出: 程序運行結束時,將找到的最大間隙輸出到文件output.txt中。 輸入文件示例 輸出文件示例 input.txt 5 2.3 3.1 7.5 1.5 6.3 output.txt 3.2
上傳時間: 2016-05-28
上傳用戶:咔樂塢
Ex4-22 單射函數問題 « 問題描述: 設函數f將點集S = {0,1, , n -1}映射為f (S) = { f (i) | iÎ S} Í S 。單射函數問題要 從S中選取最大子集X Í S 使f (X )是單射函數。 例如,當n=7, f (S) = {1,0,0,2,2,3,6} Í S 時, X = {0,1,6} Í S 是所求的最大子集。 « 編程任務: 對于給定的點集S = {0,1, , n -1}上函數f,試用抽象數據類型隊列,設計一個O(n)時 間算法,計算f的最大單射子集。 « 數據輸入: 由文件input.txt 提供輸入數據。文件的第1 行有1 個正整數n,表示給定的點集 S = {0,1, , n -1}。第2 行是f (i)的值,0 £ i < n。 « 結果輸出: 程序運行結束時,將計算出的f的最大單射子集的大小輸出到output.txt中。 輸入文件示例 輸出文件示例 input.txt 7 1 0 0 2 2 3 6 output.txt 3
上傳時間: 2016-05-28
上傳用戶:tyler