• :00Days
  • :00Hours
  • :00Mins
  • 00Seconds
A new era for learning is coming soonSign up for free
Log In Start studying!

Select your language

Suggested languages for you:
Answers without the blur. Sign up and see all textbooks for free! Illustration

Q29E

Expert-verified
Discrete Mathematics and its Applications
Found in: Page 255
Discrete Mathematics and its Applications

Discrete Mathematics and its Applications

Book edition 7th
Author(s) Kenneth H. Rosen
Pages 808 pages
ISBN 9780073383095

Answers without the blur.

Just sign up for free and you're in.

Illustration

Short Answer

Show that every positive integer can be represented uniquely as the sum of distinct powers of 2 . [Hint: Consider binary expansions of integers.]

Every positive integer can be represented uniquely as the sum of distinct powers

Of 2.

See the step by step solution

Step by Step Solution

Step 1

Let b be an integer greater than 1.

By theorem 1, every integer n can then be expressed uniquely in the form :

n=anbk+ak1bk1++a1b+a0

In this case , we have base 2. Thus there then exist unique values

such that :

n=ak2k+ak12k1++a12+a0

This then means that every positive integer n can be represented uniquely as the

sum of distinct powers of 2. Moreover, the coefficient ak,ak1,,a0 are given by the

binary representation of n .

Step 2

When ai=1 then x is first multiplied by the power and reduced modulo 645

Then on each iteration the power is multiplied by itself and reduced modulo 645.

i=0 since a0=0

x = 1

power =72mod645=49mod645=49

i=1 Sincea 1=0:

x = 1

power =492mod645=2401mod645=466

i=2Sincea2=1

x=1.466=466

power =4662mod645=217156mod645=436

i=3Sincea3=0

x=466

role="math" localid="1668514191719" power =4362mod645=190096mod645=466

i=5 Sincea 5=0

x=466 power =4362mod645=190096mod645=466i=6 Sincea 6=0x=466 power =4662mod645=217156mod645=436

Step 3

i=7 Since 7=1:x=466436mod645=203176mod645=1 power =4362mod645=190096mod645=466i=8 Sincea 8=0:x=1 power =4662mod645=217156mod645=436i=9sincea9=1:x=1.436mod645=436mod645=436 power =4362mod645=190096mod645=466 return x=436

Recommended explanations on Math Textbooks

94% of StudySmarter users get better grades.

Sign up for free
94% of StudySmarter users get better grades.