MHB Calculating the Number of Squares Inside a Circle in the 1st Quadrant

  • Thread starter Thread starter Wilmer
  • Start date Start date
  • Tags Tags
    Square
AI Thread Summary
A 10 by 10 square contains 100 1 by 1 squares, and a circle drawn inside is tangent to all sides. The discussion focuses on calculating how many of these squares are fully inside the circle, with an initial estimate of 60 squares. A proposed method involves programming a loop to count the squares in the first quadrant based on the circle's radius. The formula iterates through x values, calculates corresponding y values, and multiplies the count by four to account for all quadrants. The accuracy of this method and the need for a general case formula are key points of consideration.
Wilmer
Messages
303
Reaction score
0
A 10by10 square contains 100 1by1 squares (of course!).
A circle is drawn inside above square, tangent to all 4 sides.
How many of the 1by1 squares are fully inside the circle?

I get 60...which I think is correct.
Trying to devise a general case formula...
 
Mathematics news on Phys.org
Couldn't come up with general case formula.

However, this simple program seems to work:

-center of circle at origin
-examine the 1/4 circle in 1st quadrant

r = radius
x,y = points on circumference

INPUT r
LOOP x FROM 1 TO r
y = FLOOR[SQRT(r^2 - x^2)]
count = count + y
ENDLOOP
PRINT count*4

See anything wrong?
 
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...
Is it possible to arrange six pencils such that each one touches the other five? If so, how? This is an adaption of a Martin Gardner puzzle only I changed it from cigarettes to pencils and left out the clues because PF folks don’t need clues. From the book “My Best Mathematical and Logic Puzzles”. Dover, 1994.
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...

Similar threads

Replies
3
Views
2K
Replies
45
Views
4K
Replies
11
Views
3K
Replies
6
Views
1K
Replies
7
Views
3K
Replies
3
Views
3K
Replies
1
Views
2K
Back
Top