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

2^k进制数

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

  • For solving a number of matrix even by the best algorithm that can optimize the...
    对于求解多个矩阵连乘的最好的算法,能最优化的最短时间能求出值-For solving a number of matrix even by the best algorithm that can optimize the shortest time that can derive value
    2023-03-03 19:10:03下载
    积分:1
  • 卡尔曼滤波是一种递推估计,估计的随机状态。
    A Kalman filter is a stochastic , recursive estimator , which estimates the state of a system based on the knowledge of the system input, the measurement of the system output, and a model of the relation between input and output.
    2023-04-16 16:00:03下载
    积分:1
  • 哥德巴赫猜想:哥德巴赫(哥德巴赫)曾提出这样一个猜想:2000以内…
    Goldbach s conjecture: Goldbach(哥德巴赫)曾经提出了一个这样的猜想: 对于2000 以内的正偶数都能够分解为两个素数之和。 要求: 该题是一个猜想,我们不去证明它,而是通过编程序来验证 该猜想是否正确。 输入: 用户从键盘任意输入一个自然数。 输出: 给出满足猜想的两个自然数。-Goldbach conjecture : Goldbach (Goldbach) had raised such a guess : 2000 within the can is even divided into two prime numbers and. Requirements : The title is a guess, we do not prove it, but through programmed to verify the guess is correct. Input : arbitrary user input from the keyboard to a natural number. Output : meet guess is the natural number two.
    2023-05-19 07:45:03下载
    积分:1
  • MIMO系统空时编码
    mdjkslDVBSALFURUGFHDNAzaZwkdsax m>;ZJSDKSALM,zlshgkflfouyqoqlidndsafhdkjdcasgchjac jksafddf公司
    2022-06-13 23:38:09下载
    积分:1
  • B树的相关。源程序,C文件压缩。包括建立,插入等等相关的操作。...
    B树的相关算法。源程序,C文件压缩。包括建立,插入等等相关的操作。-B-tree algorithms. The source, C compression. Including, insert, etc. related to the operation.
    2022-02-21 21:26:34下载
    积分:1
  • a algorithm for short time fourier transform
    一种短时傅立叶变换的算法.并利用短时傅立叶变换画图-a algorithm for short time fourier transform
    2022-04-26 17:11:05下载
    积分:1
  • WINCE API函数简介
    1. API之网络函数; 2. API之消息函数; 3. API之文件处理函数; 4.API之打印函数; 5. API之文本和字体函数;  6. API之菜单函数;   7. API之位图、图标和光栅运算函数;8. API之绘图函数;  9. API之设备场景函数;   10. API之硬件与系统
    2022-08-05 21:53:56下载
    积分:1
  • 支持向量机的MATLAB工具箱
    支持向量机的MATLAB工具箱-SVM MATLAB Toolbox
    2023-06-06 22:25:03下载
    积分:1
  • Newton down France
    Newton下山法-Newton down France
    2022-05-08 08:21:53下载
    积分:1
  • 代码是用matlab写的,主要用于求解线性规划问题
    该代码是在matlab编写的,主要用于求解线性规划问题-The code is written in matlab, mainly for solving linear programming problems
    2022-10-13 10:40:03下载
    积分:1
  • 696518资源总数
  • 106265会员总数
  • 10今日下载