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

2^k进制数

于 2023-04-14 发布 文件大小:547.00 B
0 37
下载积分: 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 个回复

  • with C++ Builder bankers algorithm can process arbitrary importation of all type...
    用C++Builder实现的银行家算法可以任意 输入进程个数各类资源的个数输出安全序列-with C++ Builder bankers algorithm can process arbitrary importation of all types of resources the number of security Sequence Number output
    2022-07-08 07:47:37下载
    积分:1
  • 这是一篇讲述聚类在文本挖掘中的应用的博士论文,个人认为讲述的还是比较细的.
    这是一篇讲述聚类在文本挖掘中的应用的博士论文,个人认为讲述的还是比较细的.-This is a talk about clustering in text mining applications in the doctoral thesis, individuals think about the still relatively small.
    2023-01-26 00:05:04下载
    积分:1
  • 这是一个分治应用的又一个例子,利用分治技术,做大整数乘,尤其是几百位数以上的乘,比一般的方快很多,仅次于快速傅立叶变换....
    这是一个分治法应用的又一个例子,利用分治技术,做大整数乘法,尤其是几百位数以上的乘法,比一般的方法快很多,仅次于快速傅立叶变换.-This is a partition of the application also an example of the use of the partition, bigger integer multiplication, especially above the median of hundreds of multiplication, than the much faster after the Fast Fourier Transform.
    2022-02-01 00:49:28下载
    积分:1
  • 一个高效的自回避行走路径枚举程序。运用了多线程分配分支任务,可以port到多核cpu上加速运。...
    一个高效的自回避行走路径枚举程序。运用了多线程分配分支任务,可以port到多核cpu上加速运算。-An efficient path of self-avoiding walk enumeration procedures. Use of multi-threaded allocation branch mission, you can port to multi-core cpu on accelerated computing.
    2023-06-28 09:00:04下载
    积分:1
  • Sicily 1009梅森素数
    One of the world-wide cooperative computing tasks is the "Grand Internet Mersenne Prime Search" -- GIMPS -- striving to find ever-larger prime numbers by examining a particular category of such numbers. A Mersenne number is defined as a number of the form (2p–1), where p is a prime number -- a number divisible only by one and itself. (A number that can be divided by numbers other than itself and one are called "composite" numbers, and each of these can be uniquely represented by the prime numbers that can be multiplied together to generate the composite number — referred to as its prime factors.) Initially it looks as though the Mersenne numbers are all primes. Prime Corresponding Mersenne Number 2 4–1 = 3 -- prime 3 8–1 = 7
    2022-03-17 05:46:40下载
    积分:1
  • 人工势场视觉
    应用背景的人工& nbsp;势场 ;方法是广泛使用的移动机器人路径规划,由于它的简单性和数学分析,然而,大多数研究都集中在解决路径规划的目标和障碍是固定在一个固定的环境。关键技术一种方法是将机器人的配置作为一个点在一个潜在的领域,结合了吸引力的目标,和排斥的障碍。由此产生的轨迹是输出的路径。这种方法具有的优点,在该轨迹是产生小的计算。然而,他们可以成为被困在和,局部极小和潜在的领域,并没有找到一个路径。
    2023-02-24 20:55:04下载
    积分:1
  • 雷达数据处理
    对雷达数据处理的单目标,多传感器的matlab源程序,简单的卡尔曼滤波算法,初学的朋友们可以看看
    2022-02-19 23:24:19下载
    积分:1
  • VB编写的赫斯特指数计程序
    利用Visual Basic语言编写的赫斯特指数计算程序,请多多指教!
    2022-01-26 08:30:26下载
    积分:1
  • 生成球体表面均匀分布的点的程序
    生成球体表面均匀分布的点的程序- Production spheroid surface even distribution spot procedure
    2022-09-05 15:45:02下载
    积分:1
  • Hanoi非递归源码
    Hanoi非递归源码-Hanoi non- recursive FOSS
    2022-03-14 21:25:26下载
    积分:1
  • 696519资源总数
  • 104213会员总数
  • 20今日下载