Exercises Videos Notes Multiple-choice questions Apps

Related books

Introduction to Algorithms Algorithms Algorithms Algorithm Design Suggest a Book
1

3-2-ary numbers

Prove that every positive integer can be expressed as a sum of numbers of the kind $2^i3^j$, where no term in the summation divides the other.

For example :

1) 14 = 8 + 6 is a valid representation, while 14 = 2 + 4 + 8 is invalid since 2|4 and 2|8.

2) 20 = 12 + 8 is fine, but 20 = 18 + 2 is not valid.

Can you find this representation algorithmically.

Level:
Printable version LaTeX source
delete flag offensive retag edit

updated Jun 06 '12

pushkar gravatar image pushkar
11 2
POST AN EXERCISE POST A VIDEO POST NOTES POST MULTIPLE-CHOICE QUESTION

Stats

Posted: Jun 06 '12

Seen: 35 times

Last updated: Jun 06 '12