next up previous
Next: Naive Algorithm Up: CS101 Lecture 5 Previous: CS101 Lecture 5

235 problem

Definition: A number $n$ is a 235-number iff $n = 2^i * 3^j * 5^k$ for some $i,j,k \geq 0$.

Example 235-numbers: 1, 2, ..., 15, ... 48, ... 120, ...

Problem: Find the 2035th number (in general n-th number) of this form.

How to solve this?

Design your Algorithm

Key idea: Break problem into tractable pieces and glue these pieces together appropriately



G. Sivakumar 2000-08-06