登录
首页 » 算法 » 2^k进制数

2^k进制数

于 2023-04-14 发布 文件大小:547.00 B
0 237
下载积分: 2 下载次数: 1

代码说明:

设r是个2^k 进制数,并满足以下条件: (1)r至少是个2位的2^k 进制数。 (2)作为2^k进制数,除最后一位外,r的每一位严格小于它右边相邻的那一位。 (3)将r转换为2进制数q后,则q的总位数不超过w。 在这里,正整数k(1≤k≤9)和w(k<W≤30000)是事先给定的。 问:满足上述条件的不同的r共有多少个? 我们再从另一角度作些解释:设S是长度为w 的01字符串(即字符串S由w个“0”或“1”m组成),S对应于上述条件(3)中的q。将S从右起划分为若干个长度为k 的段,每段对应一位2k进制的数,如果S至少可分成2段,则S所对应的二进制数又可以转换为上述的2k 进制数r。 例:设k=3,w=7。则r是个八进制数(23=8)。由于w=7,长度为7的01字符串按3位一段分,可分为3段(即1,3,3,左边第一段只有一个二进制位),则满足条件的八进制数有: 2位数:高位为1:6个(即12,13,14,15,16,17),高位为2:5个,…,高位为6:1个(即67)。共6+5+…+1=21个。 3位数:高位只能是1,第2位为2:5个(即123,124,125,126,127),第2位为3:4个,…,第2位为6:1个(即167)。共5+4+…+1=15个。 所以,满足要求的r共有36个。

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 一个乘表的简单示例
    一个乘法表的简单示例-a simple multiplication table Example
    2022-03-18 04:09:36下载
    积分:1
  • 数据结构的课程设计,本是用vc++编写的,运行结果很好,大数加...
    数据结构的课程设计,本算法是用vc++编写的,运行结果很好,大数加法-data structure of the curriculum design, the algorithm is prepared by the vc, good operating results, large numbers Adder! !
    2022-04-30 14:47:05下载
    积分:1
  • 第一次来第一次为服务 (FCFS)
    其简单的一个文件代码在 C 语言中显示的第一次来第一次服务的算法 (FCFS) 的模拟。 需要投入作为终端应用程序: 进程数。 每个进程 (名称、 服务和抵达时间) 的属性。 最后显示进程的关系图。
    2022-08-09 20:07:00下载
    积分:1
  • counting procedures arbitrary point FFT and Wavelet Transform, and the choice of...
    程序算任意点FFT和小波变换,以及可选择多种小波及小波变换后的单频带重够,另算信号的Lipschitz指数,高级数字信号处理!-counting procedures arbitrary point FFT and Wavelet Transform, and the choice of multiple wavelet and the wavelet transform of a single-band heavy enough, and another count signal Lipschitz index advanced digital signal processing!
    2022-01-26 06:55:11下载
    积分:1
  • 汉字点阵数据读取(含汉字库)
    读取中文点阵字库,形成点阵数组,可用于LED显示或喷印点阵字体,包括了12*12 16*16 24*24 48*48。也可以读取单色的BMP位图信息。资料在网上很难找的,特别是字库文件,都是在DOS系统里面找来的,希望对大家有帮助
    2022-01-25 21:32:54下载
    积分:1
  • traveling salesman problem source code traveling salesman problem
    货郎担问题源代码 货郎担问题源代码-traveling salesman problem source code traveling salesman problem
    2023-01-27 20:10:03下载
    积分:1
  • 样条曲线绘制
    采用C#语言编写的的三次样条曲线算法,实现曲线光滑绘制,运行速度快,适合初学者
    2022-03-23 11:22:58下载
    积分:1
  • 求函数最优解经典方的C语言源程序,对编程有很大帮助
    求函数最优解经典方法的C语言源程序,对编程有很大帮助-optimal solution for the classical function of the C language source of programming will be of great help
    2022-01-26 17:35:29下载
    积分:1
  • 牛顿差商求数值拟合。包文件中包含一个例子结果文件,包括输入和输出的结果。...
    牛顿差商法求数值拟合。包文件中包含一个例子结果文件,包括输入和输出的结果。-poor numerical fitting. Packet document contains an example of the outcome document, including input and output results.
    2023-03-26 15:35:03下载
    积分:1
  • Least Soft-thresold Squares Tracking
    we propose a generative tracking method based on a novel robust linear regression algorithm. In con- trast to existing methods, the proposed Least Soft-thresold Squares (LSS) algorithm models the error term with the Gaussian-Laplacian distribution, which can be solved ef- ficiently. Based on maximum joint likelihood of parameters, we derive a LSS distance to measure the difference between an observation sample and the dictionary. Compared with the distance derived from ordinary least squares methods, the proposed metric is more effective
    2022-03-22 17:30:20下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载