Counting on a Rectangular Array

In summary, the author attempted to solve the homework equation by counting the number of permutations and then using an algorithm that does not require the first vertical shuffle. However, they ran into difficulty with the final step of the algorithm.
  • #1
snipez90
1,101
5

Homework Statement


Suppose you have an a x b rectangular array of distinct integers (think of it as a matrix if you would like). Now suppose we first move across the columns and take a permutation of the entries in each column. Informally, we can imagine the integers in the array as cards, and our first step is to perform a "vertical shuffle" by "shuffling" the cards in each vertical column.

Next, we perform a "horizontal shuffle" by moving down the rows and taking a permutation of the entries in each row. Finally, we perform another "vertical shuffle", described above. Show that this procedure gives us all possible permutations of the entries in the original rectangular array.

Homework Equations


The Attempt at a Solution


I'll be happy to clarify the problem statement if needed. Anyways, I am fairly bad at counting , so I'm not sure how to approach this. The only approach I pursued for awhile was through direct counting. The number of permutations we get from permuting the entries in the entire array is (a*b)!. The first vertical shuffle gives us [(a!)]^b possible permutations of the array, while the subsequent horizontal shuffle gives [(b!)]^a possible permutations. I think these two steps do not result in any overcounting, and I think the calculations are correct. Unfortunately, the final step, which is to perform another vertical shuffle, is complicated, and I'm having trouble with even the small cases.

I'm interested in how one might approach this problem. I would be happy if the problem could be done using my approach, but I very much doubt it. Thanks in advance.
 
Last edited:
Physics news on Phys.org
  • #2
My instincts say rather than count, try to write an algorithm that takes any permutation and finds a way to build it in this manner.
 
  • #3
Right. Counting is hard, since you have two vertical shuffles. One could undo part of what the other does, so it's going to be hard to make sure the final permutations are all distinct. Here's a hint. Suppose someone tells you, "Hey, that problem is SOOO EASY. I don't even need the first vertical shuffle! Just use the horizontal shuffle to put every number into the correct (i.e. where it is supposed to wind up) column and then use the vertical shuffle to make sure every number is in the correct row." Can you explain to them why that won't work??
 

FAQ: Counting on a Rectangular Array

1. What is a rectangular array?

A rectangular array is a grid made up of rows and columns, where each cell represents a specific value or object.

2. How do you count on a rectangular array?

To count on a rectangular array, you can start at any cell and move in a specific direction (up, down, left, or right) to reach the next cell. Each cell will have a specific value or object, so you can keep track of your count as you move through the array.

3. What is the purpose of counting on a rectangular array?

Counting on a rectangular array can help with organizing and visualizing data. It can also be used to solve mathematical problems, such as finding the total number of objects in the array or calculating the sum of values in a specific row or column.

4. How is counting on a rectangular array different from counting on a number line?

Counting on a rectangular array involves moving through a grid of cells, while counting on a number line involves moving along a continuous line. Additionally, a rectangular array can represent a larger set of values or objects compared to a number line.

5. Can a rectangular array have different sized rows and columns?

Yes, a rectangular array can have different sized rows and columns. This allows for more flexibility in representing data and solving problems, as different sizes can represent different quantities or values.

Similar threads

Replies
5
Views
6K
Replies
5
Views
1K
Replies
4
Views
2K
Replies
2
Views
4K
Replies
1
Views
2K
Replies
2
Views
2K
Replies
1
Views
2K
Back
Top