返回题库

HMMT 二月 2004 · GEN2 赛 · 第 6 题

HMMT February 2004 — GEN2 Round — Problem 6

专题
Discrete Math / 离散数学
难度
L3
来源
HMMT

题目详情

  1. a and b are positive integers. When written in binary, a has 2004 1’s, and b has 2005 1’s (not necessarily consecutive). What is the smallest number of 1’s a + b could possibly have?
解析
  1. a and b are positive integers. When written in binary, a has 2004 1’s, and b has 2005 1’s (not necessarily consecutive). What is the smallest number of 1’s a + b could possibly have? Solution: 1 Consider the following addition: 111 · · · 100 · · · 01
  • 11 · · · 11 = 1000 · · · · · · · · · 00 2 By making the blocks of 1’s and 0’s appropriately long, we can ensure that the addends 4008 2005 respectively contain 2004 and 2005 1’s. (To be precise, we get a = 2 − 2 + 1 and 2005 b = 2 − 1.) Then the sum has only one 1. And clearly it is not possible to get any less than one 1.