Re: Problem with nested for-loops
- From: Jussi Piitulainen <jpiitula@xxxxxxxxxxxxxxxx>
- Date: 10 Mar 2007 12:24:25 +0200
un.student@xxxxxxxxx writes:
Yesterday I came up with an interesting problem to which I'm unable to
provide any path for possible solutions.
Take n-tuple (a_1, ..., a_n) integers and create nested for loops as
int i = 0;
for b_1 from 1 to a_1
for b_2 from 1 to a_2
....
for b_n from 1 to a_n
i := i + 1
With given n-tuple this will produce some integer i. But if we are
given n and resulting i how would one find the n-tuple providing it?
Any ideas? Is this some known problem?
Study a few such tuples (a_1, ..., a_n) together with the product of
the a_k. Consider the uniqueness of a tuple that gives i.
.
- Follow-Ups:
- Re: Problem with nested for-loops
- From: un . student
- Re: Problem with nested for-loops
- References:
- Problem with nested for-loops
- From: un . student
- Problem with nested for-loops
- Prev by Date: Problem with nested for-loops
- Next by Date: Re: Problem with nested for-loops
- Previous by thread: Problem with nested for-loops
- Next by thread: Re: Problem with nested for-loops
- Index(es):
Relevant Pages
|