Problem with nested for-loops
- From: un.student@xxxxxxxxx
- Date: 10 Mar 2007 01:16:49 -0800
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?
.
- Follow-Ups:
- Re: Problem with nested for-loops
- From: Jussi Piitulainen
- Re: Problem with nested for-loops
- Prev by Date: Re: Regular expression problem
- Next by Date: Re: Problem with nested for-loops
- Previous by thread: automatic bubble sort into quick sort?
- Next by thread: Re: Problem with nested for-loops
- Index(es):