Jump to content
Science Forums

Please Help With: A Mathematical Problem Having To Do With Calculating The Total Number Of Permutations/patterns Of A Specific Number Value


Recommended Posts

Welcome to my post about a challenging mathematical problem.

 

 

I haven't been to these forums in a long time, but here I am again and I'm glad to see there is recent activity on the forum as seen on the posting date information because I need to solve this mathematical problem as soon as possible. I am currently building a website for my Technical Innovation business and unfortunately there is an important section of the site I can't complete the way I think it must be completed due to my uncertainty with solving this relevant and important mathematical problem. Its important I get the website entirely finished and published online very soon because I'm also currently creating a crowdfunding campaign for one of the most important product development projects the business is working on and having the website finished before the campaign launches is the only strategy that will enable the crowdfunding campaign to succeed at reaching its financial goal within the limited time frame the campaign will be available to receive funding contributions. Also, solving this mathematical problem correctly is going to enable me to decide if one of the innovative business projects is going to be a success that is going to be worth spending time, energy, and resources on to develop further. With all that said, hopefully together we can solve this mathematical problem I have and I'm sure we can because I know there is very intelligent and skilled members at this forum.

 

The Mathematical Problem

 

I think I have produced the correct solution among other different answers I have come up with by both searching google and working on the problem myself but because I continuously get different answers I can't be sure which one is correct. So it will be interesting to know if I did have it figured out at one point when the correct solution is posted.

 

Let's begin.

 

I am trying to figure out, what I believe is called in mathematical terms, the permutations of sixteen (16) numbers positioned in a four by four (4x4) grid. Here is an image of what I mean.

 

 




 

Only, the grid should be closed off with an outer edge, but that is the image I was able to find in the time I had to make this post.

 

The main question is: What is the total number of unique arrangements of patterns that the numbers can have their positions changed to? No copies or duplicates allowed.

 

I would like to see the work and formula that turns out to be the correct answer and solution.

 

I've had answers of very high numbers such as: 16 to the power of 4 which equals 65,536. Then I came across the formula that is supposed to answer this which was taking the total number of digits or items that are in the grid and multiplying it by the next least number and so on, which looks like this: 16x15x14x13x12x11x10x9x8x7x6x5x4x3x2x1
However, that formula ends up with an incredibly large number and the last number is 1 which doesn't change anything, so I figured that solution was wrong.

 

Now I leave it up to those of you who have read this topic post. I know someone will show how easily it is solved and hopefully soon. I really want to know how many unique arrangements of the numbers can be made in the 4x4 grid because that number represents the level of security at which a certain technical innovative idea can provide for protecting passwords and accounts of personal, business, and government systems.

 

One other question: Is the number of arrangements (permutations) in a 4x4 grid with sixteen (16) digital items positioned in each of the sixteen (16) tiles, will that calculated total be the same as the number of arrangements (permutations) that are possible for the numbers 1 to 16 in a set of tiles arranged as a row? I think it must be the same right? They each have sixteen (16) positions to change to.

 

Thank you I have to get going now.

 

Link to comment
Share on other sites

Assuming you don't consider rotational or mirror symmetry to be a copy or duplicate then 16 x 15 x 14 ... is indeed the answer.

 

Consider placing the first number in the top left corner, you could place any of 1 to 16 there. So that's 16 choices.

 

Whichever you placed in that first square, you now you have 15 numbers left to choose between for the next square.

 

Keep going like that until you have 1 number left to place in the last empty square.

 

That's where you get the 16 x 15 x 14 x 13 x ... x 2 x 1 from.

 

And it's a large number.

 

---

 

Also, again assuming rotational or mirror symmetry does not count as duplication in your scheme, then the arrangement (grid or line) does not make a difference. (Arrangement does make a difference to how many symmetries might be found - a line will have few than a grid).

 

I'd suggest manually doing "experiments" with the numbers 1 to 4 to prove this to yourself. There are only 4 x 3 x 2 = 24 permutations of 1 to 4, so it's manageable in a few bits of paper to compare a 2 by 2 grid with a 1 by 4 line.

 

---

 

Edited by pzkpfw
Link to comment
Share on other sites

I decided to get a pen and paper (plus a calculator) to have another look at this problem.

First I'll put up a picture of the grid I will be dealing with.

 

Now the work.

We begin by dealing with number [1]. How many unique patterns are available for number [1]? First there is the pattern of its current position (where the numbers are in order of increasing value from left to right arrangement in each row) that current position counts as one pattern. Then, number [1] has fifteen other positions it can move to by swapping positions with the other available numbers. For example: [1] swaps with [2] (that's one pattern). [1] swaps with [3] (that's two patterns). [1] swaps with [4] (that's three patterns). And so on to swapping with [5], [6], [7], [8], [9], [10] , [11], [12], [13], [14], [15], and [16] for a total of fifteen different changes of positions or patterns.

Next, we deal with number [2]. However, there is a change that happens. [2] cannot count its position where it currently is because that pattern has already been counted. Also, [2] cannot swap with [1] because that pattern has also already been counted. That being the case, [2] has fourteen available positions it can move to by swapping positions with the other available numbers. Those numbers that [2] can swap positions with are [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15], [16]. When you count how many position changes that is, it is fourteen, which makes fourteen patterns.

Then on to number [3] (position 3). [3] cannot include its current position as an available pattern. Also, [3] cannot swap with [1] or [2] because those position changes or patterns have already been made and counted. Therefore, [3] has thirteen available positions that it can move to by swapping positions with the other available numbers from [4] to [16].

 

Then as you carry on with dealing with the rest of the numbers [4] to [16] and the available positions that each of those remaining numbers can move to in order to create a new pattern, we get this (and none of them can count their current position). [4] has twelve positions it can move to by swapping with the other available numbers. [5] has eleven positions. [6] has ten. [7] has nine. [8] has eight. [9] has seven. [10] has six. [11] has five. [12] has four. [13] has three. [14] has two. [15] has one. And lastly, [16] has zero positions it can swap with. The total number of unique patterns that are available when dealing with just one number at a time for each of the sixteen available numbers is 16+14+13+12+11+10+9+8+7+6+5+4+3+2+1= 121.


However, it gets a lot more complicated when dealing with two numbers at a time. For example: If we choose [1] and [2] as our two numbers, each time [1] swaps with a number [2] has [15] available positions to choose from. [1] has 15 numbers to go through. So that makes a total 15x15=225. However, then you have to consider that [2] makes the first move and swaps with the fifteen available numbers. Each time [2] swaps with an available number [1] has fifteen available number positions to move to. That is again 15x15=225. So together there should be 225 + 225 = 450 total patterns for [1] and [2]. However, how many pairs of numbers are available to choose from?
There is:
[1] and [2]
[1] and [3]

[1] and [4]
[1] and [5]
[1] and [6]
...........all the way to
[1] and [16]

Then there is other pairs such as:

[2] and [3]
[2] and [4]
......... up to
[2] and [16]

and so one

[3] and [4]....to [3] and [16]

and this continues as

[4] and [5] to [4] and [16]
[5] and [6] to [5] and [16]
[6] and [7] to [6] and [16]
[7] and [8] to [7] and [16]
[8] and [9] to [8] and [16]
[9] and [10] to [9] and [16]
[10] and [11] to [10] and [16]
[11] and [12] to [11] and [16]
[12] and [13] to [12] and [16]
[13] and [14] to [13] and [16]
[14] and [15] to [14] and [16]

and lastly [15] and [16]

So as you can tell, there is quite a large number of pairs of numbers. Each time your dealing with a new pair of numbers there is apparently close to 2(15x15) total number of available options of patterns which is a total 450. How many pairs of numbers are there? There is fifteen pairs for [1]. fourteen pairs for [2]. thirteen pairs for [3] and so on to one pair for [15] and zero pairs for [16] to chose to pair with. That is a total of 120 pairs. And each pair has basically 2(15x15) number of patterns available. So that makes 120 pairs x total number of patterns per pair which is 450. That is 120x450=54,000





So it starts to get really complicated to add up all these numbers and increasing size of groups using this method.

However here is my main point and my main concern.

It looks to me like this method will create a different total than just using 16x15x14x13x12x11x10x9x8x7x6x5x4x3x2x1.

There are fourteen more groups to deal with when adding it up in this way and the larger the groups the greater the number of patterns I do believe. It would take me quite awhile to figure it out this way.

However, you see, this method I am using is getting the right number of unique patterns for the given number changes being made so this method might provide a different answer for the total number of unique patterns possible in the 4 by 4 grid.

Do you think the method I am showing will provide a different total than the formula of 16x15x14.....x1?

I'm not sure that 16x15x14...etc formula is right.

Can you show a way to prove it is right?
 

Edited by arkain101
Link to comment
Share on other sites

 

I'd suggest manually doing "experiments" with the numbers 1 to 4 to prove this to yourself. There are only 4 x 3 x 2 = 24 permutations of 1 to 4, so it's manageable in a few bits of paper to compare a 2 by 2 grid with a 1 by 4 line.

 

Thanks for the early response. I also appreciate the answer you provided, however, I need to see a method of how to prove it is right because there seems to be other factors involved which would reach a different answer for the total unique patterns.

 

What you suggest here is a good idea. ( Master the basics first and foremost before pressing the limits. )

 

In theory, larger grids than 2 by 2 will simply offer a specific ratio of greater numbers of available possibilities of patterns.

 

I think I can solve my counting method, posted just above, using a small grid like this as well.

 

When I do arrive at the correct number for the main solution, I will have to make an estimation of how many patterns will not qualify as meeting the standards of randomization and complexity necessary to make this security product effective and reliable. Making this estimation will be another mathematical problem in itself and I may have to post about it later.

 

 

 

 

 

Link to comment
Share on other sites

 

pzkpfw gave you the correct answer!
ab ba
1*2=2 permutations
abc acb bac bca cab cba
1*2*3=6 permutauins
see the trend?

 

 

Yes, I can agree now that he did give the correct answer/solution.

 

What I did was work with a 2 by 2 grid to simplify the problem and experiment with different methods of counting the total possible unique patterns of number arrangements.

 

I started with filling in the 2 by 2 grid with the numbers 1, 2, 3, and 4 and then started writing down all the possible unique patterns / arrangements of those numbers in the grid in a systematic way, starting with 1 as the first number, then 2 as the first number, then 3 as the first number and then 4 as the first number as can be seen below:

 

1) 1 2 3 4

2) 1 2 4 3

3) 1 3 2 4

4) 1 3 4 2

5) 1 4 3 2

6) 1 4 2 3

7) 2 1 4 3

eight) 2 1 3 4

9) 2 3 1 4

10) 2 3 4 1

11) 2 4 3 1

12) 2 4 1 3

13) 3 1 4 2

14) 3 1 2 4

15) 3 2 4 1

16) 3 2 1 4

17) 3 4 2 1

18) 3 4 1 2

19) 4 3 2 1

20) 4 3 1 2

21) 4 2 3 1

22) 4 2 1 3

23) 4 1 2 3

24) 4 1 3 2

 

The total number of unique patterns of number arrangements came out to be 24. I could see no way to add any more possible unique arrangements of the four numbers.

 

As "Pzk" had mentioned in his reply, there is only 4x3x2x1 possible unique patterns of number arrangements in the 2 by 2 grid, and the same amount of possible unique patterns of number arrangements for a string of number written out in a 1 by 4 row. When I calculated 4x3x2x1 I got the same answer of 24. I was starting to become convinced of the factorial type of formula of starting by multiplying the total number of items/numbers/choices/options involved in a given system/example, by the value/number of the amount of items/numbers remaining to be selected for being placed within a row or grid containing an equal number of positions as there are items/numbers to choose from, and then multiplying by the value/number of items/numbers that remain to choose from after the previous choice for position of a item/number has been made and added to the equally valued grid or row and then is repeated in this manner, multiplying each new value of choices by the previous value of choices, until only one item/number is left, which inevitably has only one available position to choose from when it is placed on the grid. Sorry, I know that was quite the complex written expression of the nature of the factorial type of formula/principle/method. In other words, I started to become convinced that the factorial approach (ie. 5! = 5x4x3x2x1) of counting the total possible unique patterns of item/number arrangements in a grid, was in fact the correct answer regardless if the number of items/numbers to choose from is increased repeatedly.

 

Then I tried a method that counted the total number of options that are available to choose from in the process of selecting one number at a time from a group of four numbers (such as 1, 2, 3, 4) and after the step of a single number has been chosen from the available group of numbers, then the secondary step is placing the chosen number in a likewise chosen available square/option/position, within a 2 by 2 grid. So, in other words, you have a group of 4 numbers and a grid with 4 empty squares/empty positions and you choose the first number from the group (the group which has 4 numbers to begin with) and place it in one of the four available positions within the grid (for the first few steps at the beginning that's 4 options to choose a number + 4 options to choose a square position). Then you choose the next number from the remaining numbers that make up the group (which is now 3 numbers) and place it in one of the now, 3 available positions within the grid (that's 3 options to choose a number + 3 options to place it in an available square/position). You do the same for the 3rd number being chosen from what remains of the group of numbers (which is 2 numbers) and place it in one of the now, 2 available squares/positions remaining within the grid (thats 2 options to choose a number + 2 options to position the chosen number in the remaining available positions of the grid). Lastly, you choose the 4th and final number that is available or which is just the one number that remains of the initial group, and it is placed or if you prefer, you place it in the last available position/square within the grid. However, 1 option, with this type of use of the word option, doesn't necessitate that a choice must be made in respect to how a choice was made with the dealings of the previous 3 numbers that had at first 4 options, then 3 options, and then 2 options. The last remaining number to place in the grid, can be performed without the inclusion of there being an actual option or a choice for that matter. When the last number is ready to be dealt with, it does not necessitate that the same kind of choice must be made as was made with the 3 previous numbers that had a selection of 4+4, 3+3, and 2+2 options. With the last number, there is no more of the same kind of options remaining as with the selection of the previous 3 numbers. Instead, in order to follow the rules of the counting process system, the last remaining number to be dealt with must be placed in the last remaining square position within the 2 by 2 grid. It only requires one dimensional type of reasoning to relocate the number from its original group location to the only available position within the grid. If the circumstances dictate that a singular thing or number must obey the logic within the system of those circumstances then a singular thing or number doesn't have to be chosen because the system is such that the last remaining thing or number must go where it must go with or without opinion, decision, choice, or selection being involved because most importantly it was already previously decided what would happen to the last number prior to the time of dealing with it. In other words, in the case of the last number in the counting of the total options process as seen above, it is equivalent to saying the "option" of the last number is 1 number minus the 1 available position within the grid in respect to completing the the full pattern of numbers within the grid. That is, the last step of the counting process is essentially 1-1=0. That is zero choices or options available for the dealings with the last remaining number in that counting process. The system involved in the counting process already had the decision made for the last number before the dealings with the last number ever occurred. An example is that, its like a ball that ends up being located on a steep smooth sloping surface (on a hill), when it begins to roll and move, there is similarly no choice made or necessary for it to roll, it just rolls because the system it exists within is made that way for it to roll automatically on a steep smooth slope with no obstructions in its way of course, the last number just follows the nature of the system it finds itself within.

 

Back to the finishing of the options counting process. The total number of options involved in the process as it was described to follow is (4+4)+(3+3)+(2+2)+(1-1)= 18. There is 18 logical options involved in this process of creating a unique pattern of arranged numbers within filling a 2 by 2 grid with four numbers, choosing the numbers one by one. This counting method, doesn't get the same answer as the other counting methods of 24. However, that is because this process counts different elements involved with calculating the relationships among the possibilities within a given system of specific values. I think that this total of 18 represents something to do with the variables involved with the purpose of trying to crack a certain pattern within the confinements of the given system and its values.

 

With all that said, I think I fully understand how and why the factorial method (such as 3x2x1) is the correct way to calculate the total number of possibilities of unique patterns for a given set of values and limitations such as a 4 by 4 grid filled with the numbers 1 to 16 within the 16 squares that make up the grid.

 

I'm not certain what that last counting process of counting the total number of options involved in a specific process, is supposed to mean in relevance to the total number of individually unique pattern variations. My theoretical mind is thinking that it has something to do with a factor involved with trying to crack a password for example with particular methods that deal with the total number of options or in other words, possibilities with a certain technique of decision making.

 

As for the last method of counting total options, I was just exploring a mathematical area that I have not really explored before to my knowledge. If someone could help me understand more of what it means in relation to possibilities and permutations that would be much appreciated.

Edited by arkain101
Link to comment
Share on other sites

There are two problems with your method:

 

First is you don't have a good grasp of when to multiply and when to add possibilities.

e.g. your "... and you choose the first number from the group (the group which has 4 numbers to begin with) and place it in one of the four available positions within the grid (for the first few steps at the beginning that's 4 options to choose a number + 4 options to choose ..." giving your "(4+4)".

You should be multiplying, not adding here. Choosing 1 of the 4 numbers, and placing it in 1 of the 4 spaces gives 16 permutations for that first step. Draw them! You'll see 16, not 8.

 

Imagine you and three friends are having dinner at a table with a chair facing each of the compass points. One of you sits down first, how many permutations are there at this point?

By your system, you'd seem to expect 8. Four choices of person to sit first, and four chairs, "(4+4)".

But you should count 16 permutations at that point: you facing North, you facing South, you facing East, you facing West, Alice facing North, Alice facing South, Alice facing East, Alice facing West, Bob facing North, Bob facing South, Bob facing East, Bob facing West, Carol facing North, Carol facing South, Carol facing East, or Carol facing West, 

 

Have a very very good look at why you get 12 permutations (4 x 3) after two choices (in a 2 by 2 grid) in the usual method, and not 4 + 3 = 7. Look at why that's multiplied, not added.

 

Secondly, if corrected for the above, your method gives a number that's way too high. The reason is that your method repeats permutations.

Example:

Say you first choose "1" and put it the top left square, and then choose "2" and put it in the top right square.

That's going to be repeated when you first choose "2" and put it in the top right square, then choose "1" and put it in the top left square.

Your system, as described, allows this repetition, by allowing choice of number and choice of square at each step.

 

At the dinner table, if you sit first and face North, then Carol sits second facing South, you get the same permutation as if Carol sat first facing South, then you sat second facing North.

(To get the correct number of permutations, you should specify an order (any order) in which the chairs must be sat in, e.g. North first, then East, ... this will prevent repetition.)

 

 

I have no idea why you want to try to make these horrendously complicated methods, when the one described in my first post is so simple and gets the correct result.

 

With 2 by 2 grid of four numbers ...

 

Place one of the four numbers in the top left square.

Four permutations so far.

 

Place one of the three remaining numbers in the top right square.

Each of the previous four was followed by three possible second choices, so twelve (4 x 3) permutations so far.

 

Place one of the two remaining numbers in the bottom right square.

Each of the previous twelve was followed by two possible third choices, so twenty four (4 x 3 x 2) permutations so far.

 

Place the last remaining number in the bottom left square.

Each of the previous twenty four is followed by one possible fourth choice, so twenty four (4 x 3 x 2 x 1) permutations total.

 

 

(Note the use of "Each", that's a clue as to why we multiply.)

Edited by pzkpfw
Link to comment
Share on other sites

(

It occurs that since different orders is what causes your system to allow repetition and get too-high a number, we need to divide by the number of orders to fix your calculation.

It may seem slightly circular, but the possible orders in which the 4 numbers can be chosen is 24.

 

So your corrected formula is: ((4 x 4) x (3 x 3) x (2 x 2) x (1 x 1)) / 24

 

... which is now 24, just like the better method.

)

Link to comment
Share on other sites

I understand my system I included seems like a needless complication, but like I mentioned, I wanted to explore something I haven't really explored before and that was adding up the number of options that are available for each choice involved at each step of the particular system and process of performing that counting.

Because all of this relates to account and password security factors, I am interested in exploring not only the number of permutations, but also the techniques and systems hackers use to try and crack passwords, which is one of the motivators for the type of "total options counting process" that I shared.

I thank you for your explanation on the points of when to multiply and when to add in relation to these permutation problems we have been discussing. I did in fact multiply the numbers the first time, which I believe resulted in a calculation total of 30. However, I wasn't trying to find the number of permutations for the given system, I was exploring the number of options involved with each step of the counting system process, hence the addition. You see, if a hacker was trying to guess the password they might use a system similar to the one I shared that involved the (4+4)+(3+3)...etc. A hacking system might have to deal with options as opposed to permutations when trying to achieve a guessing a specific permutation pattern within the grid. I can't explain much more because I don't want to give away the overall idea for the security system I am developing. There are factors within this security system that I think will end the ability for hackers to break into secured systems and databases. That is, as long as people don't lose their "storage matrix account cards" or "matrix key cards", allowing a hacker to get one step closer to accessing protected digital systems and information.

I appreciate your help.

This is where I am at now. I've calculated there are approximately 20 trillion permutations for my 16 character system and there are another 20 trillion possibilities of trying to guess the password stored in what I call a "password storage matrix". Whats more, this 20 trillion number is referring to 1 dimensional numbers such as 1 to 16 and hasn't yet included the added security of using the 26 letters of the alphabet, the added complexity of the inclusion of CAPS and lower case alternations, the number digits of 0 to 9 and combinations there of, and lastly the inclusion of symbols. With all of this, a person can create a very strong 16 character password that some calculators suggest would take 38 billion years for an average performance computer to crack the password. And because the types of passwords I'm referring to are concluded to be so secure and difficult to crack, the hackers bypass that particular challenge and take another route of hacking a server database to get account information because websites have a wide variety of security systems and measures to protect what the site contains. So, with this security system I am developing, I believe I have a new type of dimension to add to the systems that are designed to prevent hackers from breaking into servers, networks, systems, websites, encryption databases, and accounts. So it is important for me to explore the mathematics involved with this kind of system being discussed in this topic.

I am learning important things that are helping me develop the system so I thank you.

Lastly, I think I resolved the problem of how to "weed out" the "too obvious" types of permutation patterns created within the 4 by 4 grid. I don't know how to do it mathematically but I figured a set of standards could be developed and when a "matrix key" is created by a software program designed to create a random permutation pattern, the standards can be used by trained personnel to quickly analyze the matrix key and determine if it qualifies as a top level secure key.

Link to comment
Share on other sites

.. I was exploring the number of options involved with each step of the counting system process, hence the addition. You see, if a hacker was trying to guess the password they might use a system similar to the one I shared that involved the (4+4)+(3+3)...etc. A hacking system might have to deal with options as opposed to permutations when trying to achieve a guessing a specific permutation pattern within the grid. ...

 

It doesn't matter that you call them options instead of permutations, or that a hypothetical hacker is doing the choosing. This is wrong.

 

A choice of four things, to place in a choice of four positions makes 4 x 4 = 16 permutations, or options, or possibilities, or whatever you call them.

 

"(4 + 4)" for this, makes no sense.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...