MHB How can I get equal columns and rows from a total?

  • Thread starter Thread starter SLSCoder
  • Start date Start date
  • Tags Tags
    Columns
AI Thread Summary
To determine the number of equal columns and rows from a variable total of cells, the calculation involves using the floor function on the square root of the variable x. For example, if x equals 10, the result is 3 columns and 4 rows, with the last row containing only one value. The formula effectively helps in organizing the cells into a grid format. This method ensures that the layout remains balanced while accommodating the total number of cells. Understanding this calculation is essential for efficient data presentation.
SLSCoder
Messages
4
Reaction score
0
I have a number of cells (say 10 cells) but that number is a variable.
I have the value of the variable but it's not a 'hard' number. We'll call the variable x.

I need to calculate how many columns I'll have if the columns and rows will be the same, or the columns will be 1 minus (floor) the number of rows.
If the variable x = 10 then the columns would be 3 and there would be 4 rows, the last row would only have a value in the first column.

How can I calculate for the number of columns I need given the variable x?
 
Mathematics news on Phys.org
Duh - floor(square root of x)
 
Seemingly by some mathematical coincidence, a hexagon of sides 2,2,7,7, 11, and 11 can be inscribed in a circle of radius 7. The other day I saw a math problem on line, which they said came from a Polish Olympiad, where you compute the length x of the 3rd side which is the same as the radius, so that the sides of length 2,x, and 11 are inscribed on the arc of a semi-circle. The law of cosines applied twice gives the answer for x of exactly 7, but the arithmetic is so complex that the...
Thread 'Imaginary Pythagoras'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
Back
Top