May 3rd, 2017, 10:36 AM  #11 
Math Team Joined: Oct 2011 From: Ottawa Ontario, Canada Posts: 9,729 Thanks: 651 
Sorry...no idea what you're talking about; perhaps someone else here will jump in... 
May 3rd, 2017, 02:56 PM  #12 
Newbie Joined: Sep 2014 From: Kiev Posts: 10 Thanks: 0 
I meant what iterative approach can be used? Could my option be applied that is without permutation approach?

May 3rd, 2017, 03:38 PM  #13  
Senior Member Joined: Jun 2014 From: USA Posts: 299 Thanks: 21  Quote:
To find all of the possibilities for your actual question, you need to iterate through $n^n$ sets as opposed to $n!$ permutations. When $n$ is large enough, that's a lot of iterations. I don't see this as being that complex of a problem to program, but you'd need a very fast computer with an awful lot of memory... So, you can make your array, or iterate if you prefer, through $n^n$ different sets in order to find all of the ones that suffice for any given value of $k$. The value of $k$ has no impact on the number of iterations if you intend to go through all of them, noting that as $k$ gets larger, the number of sets meeting the criteria gets smaller. Why $n^n$ iterations, you might ask? Let's consider $n = 3$ implying you are working with the set {1, 2, 3}. You'll then have $3^3 = 27$ possibilities: {1, 1, 1}, {2, 1, 1}, {3, 1, 1} {1, 1, 2}, {2, 1, 2}, {3, 1, 2} {1, 1, 3}, {2, 1, 3}, {3, 1, 3} {1, 2, 1}, {2, 2, 1}, {3, 2, 1} {1, 2, 2}, {2, 2, 2}, {3, 2, 2} {1, 2, 3}, {2, 2, 3}, {3, 2, 3} {1, 3, 1}, {2, 3, 1}, {3, 3, 1} {1, 3, 2}, {2, 3, 2}, {3, 3, 2} {1, 3, 3}, {2, 3, 3}, {3, 3, 3} Iterate through all of them displaying the ones that meet the criteria for your given value of $k$ and you're done. You should see how easy it would be to construct a FOR loop for this, hopefully. Assuming you want a better answer, one that means you don't go through all the possible iterations, then good luck. Perhaps you'll be able to solve the P = NP problem in the process... Last edited by AplanisTophet; May 3rd, 2017 at 03:55 PM.  
May 4th, 2017, 01:43 AM  #14 
Newbie Joined: Sep 2014 From: Kiev Posts: 10 Thanks: 0 
I do understand that I need to use all n^n (even not n^k as in probability handbooks). So maybe such permutation approach is not appropriate. As then there were several task and "n" provisioned to be at such level of as 10^6 or so, I already do not remember so that case. And as I reviewed some permutation examples even bogomolsky recursion examples lead to duplicates, but what to talk about when there are extremely huge variations when n is relative high. So I even cannot find some raw or valid example for n^n permutations.

May 9th, 2017, 07:09 AM  #15 
Newbie Joined: Sep 2014 From: Kiev Posts: 10 Thanks: 0 
I have some unrelating question but I would grateful for answer. In testing when test has 56 options for answer and you can choose more than one (2,3,4) how answer would be rated if you choose not all correct answers. For example 2instead 3, 2 instead 4, 3 instead 4. Should the answer get 0 mark or it would get proportionally to number of correct answers or so? I mean the testing in programming/algorithms?

May 9th, 2017, 08:29 AM  #16 
Math Team Joined: Oct 2011 From: Ottawa Ontario, Canada Posts: 9,729 Thanks: 651 
Well, I don't understand what you're asking... may I suggest you find someone who knows English well, to help you write out your problem. Iterations are simple, being "loops". BUT if you need to do 100 of them, still simple BUT enormous time required. 

Tags 
>, adjacent, difference, find, number, numbers, sequences 
Search tags for this page 
Click on a term to search for related topics.

Thread Tools  
Display Modes  

Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Find the number of divisors of 189,720 that are composite numbers?  DaphneV  Probability and Statistics  2  December 11th, 2016 08:08 PM 
From numbers 1 to 10 find the probability the number chosen  rsoy  Probability and Statistics  3  October 14th, 2013 12:50 AM 
finding a tan function that helps me find the adjacent side  aprilautumn1234  Algebra  2  August 18th, 2013 08:32 PM 
Find two numbers where difference is 20 & the sum is 4  sharp  Elementary Math  7  October 30th, 2010 08:52 AM 
finding a tan function that helps me find the adjacent side  aprilautumn1234  Calculus  1  January 1st, 1970 12:00 AM 