Description: 描述:设编号为1,2,…,n(n>0)个人按顺时针方向围坐一圈,每人持有一个正整数密码。开始时任意给出一个报数上限值m,从第一个人开始顺时针方向自1起顺序报数,报到m时停止报数,抱m的人出列,从他在顺时针方向上的下一个人起重新自1起顺序报数;如此下去,直到所有人全部出列为止。要求设计一个程序模拟此过程,并给出出列人的编号序列。
.算法思想:
Jeseph函数是实现问题要求的主要函数,其算法思想是:从1至m对带头结点的单循环链表循环计数,到m时,输出该结点的编号值,,再从该结点的下一个结点起重新自1起循环计数;如此下去,直到单循环链表空时循环过程结束。
-Description : Let numbered 1, 2, ..., n (NGT; 0) clockwise direction by individuals sitting around a circle, each holding a positive integer code. At the beginning of a given arbitrary reported few limits on m, started from the first clockwise direction from the starting sequence reported a few, when they report back m reported few, hold out the m out from the clockwise direction in the next personal re-order starting from a newspaper; This situation continues until all people so far shown up. Asked to design a simulation of this process, and give out the number of people out sequence. . Algorithm thinking : Jeseph function is to seek to achieve the main function of the algorithm is thinking : m from a right to take the lead in the 19th nodes Listless cycle count, m, the output node number Platform: |
Size: 21028 |
Author:王俊 |
Hits:
Description: 公民身份号码是特征组合码18位:由十七位数字本体码和一位数字校验码组成。排列顺序从左至右依次为:六位数字地址码,八位数字出生日期码,三位数字顺序码和一位数字校验码。 -citizenship number is the combination code 18 : 17 figures Ontology yards and a digital-correcting code components. Sequencing from left to right were : six figures addresses code, date of birth eight digital code, a three-digit number sequence and a digital code correcting code. Platform: |
Size: 20112 |
Author:赵长华 |
Hits:
Description: 设计8位开关输入电路、8位发光二极管显示电路、扬声器发声控制电路。
2.设计控制程序,运行程序时,可根据8位开关信号选择播放不同音阶及不同拍节的声音序列,在播放某一声音时,同时在8位发光二极管上显示出相应声音序号
-design input circuit switches, eight LEDs show circuit, speakers audible control circuit. 2. The design control procedures, operating procedures, under the eight players switch signal choose different scale and different voices shoot festival sequence, in a broadcast voice, in eight LEDs display the serial number corresponding voice Platform: |
Size: 1789 |
Author:fdf |
Hits:
Description: 最优合并问题
给定K个排好序的序列s1,s2,...,sk,用2 路合并算法将这k个序列合并成一个序列。
假设所采用的2路合并算法合并2个长度分另为m 和n的序列需要m+n-1次比较。试设计一个算法确定合并这个序列的最优合并顺序,使所需的总比较次数最少。-optimal merging given K platoons good sequence of sequence s1, s2 ,..., sk. using 2-way merger of this algorithm k sequence into a series. Assumptions used by the two merging algorithm along with two others for the length m and n the sequence needs m n-1 comparisons. Algorithm design a test to determine the sequence of the merger combined the optimal sequence, and allows comparison of the total number at least. Platform: |
Size: 2052 |
Author:卢起雪 |
Hits:
Description: RLE的基本思路是,把数据分两种情况对待:
A1.一些连续的重复字节
A2.一些连续的,不相重复的字节
RLE压缩最常见的一种算法思路:
将全部的数据分成很多块,这些块的长度各不一样:
all data = [block] + [block] + ... + [block]
每一块由两部分顺序组成:
a block = [header] + [data]
其中header部分占2字节16位,这16位中的最高位,标志了这个block的属性,是属于上面的A1还是A2。对应于A1和A2,剩下的15位以及后面的Data部分的意义又分为两种:
A1: block的剩下15位记录重复的次数,取值范围[0,32767];data段仅含一个字节,即重复的那个字节
A2: block的剩下15位记录data段有多少个字节;data段则是一系列不相重复的字节。
-RLE the basic idea is that the two data points of the deal : A1. number of consecutive repeat byte A2. some continuous, do not duplicate byte RLE compression one of the most common algorithm : all of the data into many pieces, the length of these pieces not the same : all data = [block] [block] ... [block] for every part of a two-shun sequence components : a block = [header] [data] header which accounted for some two-byte 16, This 16-the highest mark of the attributes of the block, is above the A1 or A2. Corresponding to the A1 and A2, and the remaining 15 and the back part of the Data significance will be divided into two : A1 : block the remaining 15 the number of duplicate records, the value in the range [0,32767]; with only one of the data byte, which repeat the byte A2 : block the rem Platform: |
Size: 14893 |
Author:tangxin |
Hits:
Description: HMM(Hidden Markov Model),狀態數目N=3,觀察符號數目M=2,時間長度T=3。
(a) Probability Evaluation: 給定狀態轉換機率A、狀態符號觀察機率B、和起始機率 ,求觀察序列 出現的機率。
(b) Optimal State Sequence: 給定狀態轉換機率A、狀態符號觀察機率B、起始機率 、和觀察序列 ,求一個狀態序列 使得O出現的機率最大。
(c) Parameter Estimation: 給定狀態轉換機率A、狀態符號觀察機率B、起始機率 、和觀察序列 ,求新的A、B、 ,使得O出現的機率最大。
-HMM (Hidden Markov Model), state the number of N = 3, Observation number of symbols M = 2, T = length of three. (A) Probability Evaluation : given state transition probability A, Observer status symbol probability of B, and initial probability for observation sequence in the octave. (B) Optimal State Sequence : given state transition probability A, Observer status symbol probability of B, the initial probability, and observation sequence, for a state sequence of O makes the greatest risk. (C) Parameter Estimation : given state transition probability A, Observer status symbol probability of B, the initial probability, and observation sequence, the way the A, B, and O makes the greatest risk. Platform: |
Size: 146567 |
Author:章勝鈞 |
Hits:
Description: This section contains a brief introduction to the C language. It is intended as a tutorial on the language, and aims at getting a reader new to C started as quickly as possible. It is certainly not intended as a substitute for any of the numerous textbooks on C. 2. write a recursive function FIB (n) to find out the nth element in theFibanocci sequence number which is 1,1,2,3,5,8,13,21,34,55,…3. write the prefix and postfix form of the following infix expressiona + b – c / d + e * f – g * h / i ^ j4. write a function to count the number of nodes in a binary tr-This section contains a brief introductio n to the C language. It is intended as a tutorial o n the language, and aims at getting a reader new to C started as qu ickly as possible. It is certainly not intended as a substitute for any of the numerous textbook 's on C. 2. write a recursive function FIB (n) to fi nd out the nth element in sequence theFibanocci number which is 1,1,2,3,5,8,13,21,34,55, ... 3. write the prefix and postfix form of the follo wing infix expressiona b-c / d e f * - g * h / i ^ j4. wr ite a function to count the number of nodes in a bi nary tr Platform: |
Size: 22310 |
Author:jim |
Hits:
Description: 文件夹中包括汇编报告和流程图,该程序实现以下功能:从键盘以十进制读入一些数,然后进行排序,最后以十进制形式输出排好序的数.-folder including the compilation report and the flowchart of the process to achieve the following functions : from the keyboard to the metric system some time to a few and then sorting, and the final form of the metric system output arranging the sequence number. Platform: |
Size: 16165 |
Author:zn |
Hits:
Description: 约瑟夫环:编号为1,2,3,…,n的n个人按顺时针方向围坐一圈,每人持有一个密码(正整数)。一开始任选一个正整数作为报数的上限值m,从第一个人开始按顺时针方向自1开始顺序报数,报到m时停止。报m的人出列,将他的密码作为新的m值,从他在顺时针方向上的下一人开始重新从1报数,如此下去,直到所有人全部出列为止。编程打印出列顺序。-Josephus : No. 1, 2, 3, ..., n n clockwise direction by individuals sitting around a circle, each holding a password (positive integers). An optional started as a positive integer reported limits on the number of m, from the first individuals to embark on the clockwise direction since the beginning of a sequence number off, the report m stop. M reported out of the list of his password as a new value m, from a clockwise direction in the next one started from a newspaper a few, like that, until the total of all listed so far. Programming print out the order. Platform: |
Size: 797 |
Author:李然 |
Hits:
Description: (1)输入E条弧<j,k>,建立AOE-网的存储结构 (2)从源点v出发,令ve[0]=0,按拓扑排序求其余各项顶点的最早发生时间ve[i](1<=i<=n-1).如果得到的拓朴有序序列中顶点个数小于网中顶点数n,则说明网中存在环,不能求关键路径,算法终止 否则执行步骤(3)(3)从汇点v出发,令vl[n-1]=ve[n-1],按逆拓朴排序求其余各顶点的最迟发生时间vl[i](n-2>=i>=2). (4)根据各顶点的ve和vl值,求每条弧s的最早发生时间e(s)和最迟开始时间l(s).若某条弧满足条件e(s)=l(s),则为关键活动.-(1) E importation of Arc lt; J, kgt; Establish AOE - network storage structure (2) v starting point source, ve [0] = 0, by topological sorting point for the rest of the earliest timing ve [i] (1LT ; = ilt; = n-1). if the Topography vertex orderly sequence number is less than net n vertices, a statement that net presence in Central, not for Critical Path, algorithm implementation steps to terminate or (3) (3) from the Department of v starting point, Vl [n-1] = ve [n-1], by the inverse order for the remaining topology of the latest occurrence of peak time Vl [i] (n-inversion; = IGT; = 2). (4) According to the apex of ve and Vl value for each s arc of the earliest timing e (s) and the latest starting time of l (s). If any meet the conditions of the arc e (s) = l (s), was critical activities. Platform: |
Size: 1972 |
Author:叶兆源 |
Hits:
Description: 编号为1,2,…,n的n个人按顺时针方向围坐一圈,每人持有一个密码(正整数),一开始人选一个正整数作为报数上限m,从第一个人开始按顺时针方向从自1开始顺序报数,报道m时停止报数。报m的人出列,将他的密码作为新的m值,从他的顺时针方向上的下一个人开始重新从1报数,如此下去,直至所有人全部出列为止,设计一个程序求出出列顺序。采用单向循环链表模拟此过程,按照出列的顺序印出各人的编号测试数据:m的初值为20;n=7,7个人的密码依次为:3,1,7,2,4,8,4,首先m的值为6(正确的出列顺序应为6,1,4,7,2,3,5)-No. 1, 2, ..., n n clockwise direction by individuals sitting around a circle, each holding a password (positive integers), a candidate started as a positive integers m ceiling on the number of reported from the first individuals to embark on the clockwise direction from the start sequence from a few newspaper reports m reportedly stopped a few. M reported out of the list of his password as a new value m, from the clockwise direction on the next re-started from a few reported so on, until all out all out, the design of a procedure sought out the order out. Listless one-cycle simulation process and follow the sequence shown in the numbers printed each test data : m for the initial 20; N = 7,7 personal passwords were : 3,1,7,2,4,8,4, first the value of m 6 (right to be out of order out 6,1,4 Platform: |
Size: 1440 |
Author:弄月 |
Hits:
Description: HMM(Hidden Markov Model),狀態數目N=3,觀察符號數目M=2,時間長度T=3。
(a) Probability Evaluation: 給定狀態轉換機率A、狀態符號觀察機率B、和起始機率 ,求觀察序列 出現的機率。
(b) Optimal State Sequence: 給定狀態轉換機率A、狀態符號觀察機率B、起始機率 、和觀察序列 ,求一個狀態序列 使得O出現的機率最大。
(c) Parameter Estimation: 給定狀態轉換機率A、狀態符號觀察機率B、起始機率 、和觀察序列 ,求新的A、B、 ,使得O出現的機率最大。
-HMM (Hidden Markov Model), state the number of N = 3, Observation number of symbols M = 2, T = length of three. (A) Probability Evaluation : given state transition probability A, Observer status symbol probability of B, and initial probability for observation sequence in the octave. (B) Optimal State Sequence : given state transition probability A, Observer status symbol probability of B, the initial probability, and observation sequence, for a state sequence of O makes the greatest risk. (C) Parameter Estimation : given state transition probability A, Observer status symbol probability of B, the initial probability, and observation sequence, the way the A, B, and O makes the greatest risk. Platform: |
Size: 146432 |
Author:章勝鈞 |
Hits:
Description: TCP序列号和确认号详解,可以帮助学习TCP协议以及排查通讯故障,如通过查看序列号和确认号可以确定数据传输是否乱序。-TCP sequence number and acknowledgment number explain, can help learning TCP protocol as well as the investigation of communication failures, such as by checking the serial number and confirmation number to determine whether the out-of-order data. Platform: |
Size: 232448 |
Author:风帆 |
Hits:
Description: 脉冲编码调制(PCM)实现
编程实现PCM技术的三个过程:采样、量化与编码。
采样:低通连续信号采样,以 x=sin(200*t) m=x./(200*t) m=m.*m 为例说明低通采样定理,绘出信号时、频图形;带通连续信号采样,以x=sin(20*t) m=x./t 为例说明带通采样定理,绘出信号时、频图形。
量化:均匀量化,以幅度 的正弦信号为例实现为64级电平的均匀量化;非均匀量化,输入A律PCM编码器的正弦信号 ,采样序列为 ,将其进行PCM编码,给出编码器的输出码组序列
编码:以上述信号为例,实现A律的13折线近似法及国际标准PCM对数A律量化编码。-Pulse code modulation (PCM) to achieve
PCM technology programming three processes: sampling, quantization and coding.
Sample: low-pass continuous signal sampling to x = sin (200* t) m = x./(200* t) m = m.* m an example low-pass sampling theorem, draw the signal, frequency graphics bandpass sampling continuous signals to x = sin (20* t) m = x./t an example bandpass sampling theorem, draw the signal, frequency graph.
Quantization: uniform quantization, in order to realize the magnitude of sinusoidal signal as an example for the 64 level uniform quantization non-uniform quantization, input A law PCM encoder sine signal, the sampling sequence, to be PCM encoded, the encoder is given The output code sequence
Code: A Case Study of the signal to achieve the 13 A line approximation law and international standards on the number of A law PCM coding quantization. Platform: |
Size: 2048 |
Author:马芳 |
Hits:
Description: 首先开设一个空间比较大的数组,从数组尾部开始。比较最后一个数和最
初设置在数组中的一个最大值,使得最小子序列及最小子序列初始化。记录在当前位置的最小子序列数,接着,继续与在其前面相邻的数进行比较。如果后者大于前者,者比较二者携带记录的最小子序列数的大小,如果后者持有的最小子序列数大于前者,则以后者为基准,最小子序列保持不变。反之,则将后者的子序列数自加一,将其改为前所持有的最小子序列数。继续重复前面的动作,最后得出最长不下降子序列的数目及内容。
-First to open a larger space for the array, starting from the end of the array. Comparison of the last number and the most
Early to set a maximum value in the array, making a minimal sequence and the sequence of a minimal initialization. A minimal sequence number recorded in the current location, and then continue to work with in front of the adjacent number to compare. If the latter than the former, the size of the minimal sequence number of compare the two brought into the record, if the latter holds the minimal sequence number is greater than the former, the latter as a benchmark, a minimal sequence remains unchanged. On the contrary, is the latter sub-sequence number from plus one to change it held before the minimal sequence number. Continue to repeat the previous action, and finally arrive at the number and content of up to drop the sub-sequence. Platform: |
Size: 1024 |
Author:刘善梅 |
Hits:
Description: 使用以下方案为二叉树编码:
空树编码为0
单结点树编码为1
所有m个结点的二叉树编码小于(m+1)个结点的二叉树的编号
若任何m个结点的二叉树,当左右子树为L和R个时的二叉树编号为n,则下列情况下所有m个结点的二叉树,其编号大于n:
左子树的编号大于L
左子树的编号为L,右子树的编号大于R
要求给定一个序数,输出一棵二叉树
-Use the following scheme is binary coded: empty tree coded 0 for single-node tree coding for an all m-node binary coding is less than (m+1) nodes of the binary tree binary number, if any m-node, when about son tree for the L and R when the binary number is a n, then the following cases all m binary tree nodes, which number is greater than n: left subtree of the left subtree number greater than the number of L is L, the number of right subtree R requires more than a given sequence number, a binary output Platform: |
Size: 1620992 |
Author:wangdanyang |
Hits:
Description: 八位数据选择器和序列10010检测器,数据选择器具有数据选择功能,序列检测器是一个自动检测序列功能-Eight data selector 10010 and the sequence detector, a data selector having a data selection function, the sequence detector is a sequence of automatic detection function Platform: |
Size: 3072 |
Author:jasonlcj |
Hits:
Description: 服务器端带数据库的增删改查操作版本VC++产生程序序列号的实例代码-VC++ serial number procedures, code examples, including a simple registration machine program and generate a sequence number, a combination of both a perfect demonstration of how in VC++ to develop the application program to achieve the software registration Platform: |
Size: 8323072 |
Author:章丽 |
Hits: