All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
A clock area (Posted on 2023-08-23) Difficulty: 3 of 5
A clock has an hour, minute, and second hand, all of length 1. Let T be the triangle formed by the ends of these hands. A time of day is chosen uniformly at random. What is the expected value of the area of T?

No Solution Yet Submitted by Danish Ahmed Khan    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Computer method | Comment 1 of 6
The problem is equivalent to placing 3 random  points on a unit circle and calculating the area of the resulting triangle.  wlog, one point can be considered fixed.

Dividing the circle into 1000 segments yields an answer of:
0.4774632584782688
----------
import math
def area(s1,t1):
    """ Assume a and b are degrees between 0 and 360, and
    the 3 vertices of a triangle are at (0,1),
    (cos s, sin s) and (cos t, sin t)  
    return the area   """
    pi = math.pi
    s = s1 * pi / 180
    t = t1 * pi / 180
    
    x = [0, math.cos(s), math.cos(t), 0]
    y = [1, math.sin(s), math.sin(t), 1]
    d = []
    for i in range(3):
        d.append( ( (x[i+1]-x[i])**2 + (y[i+1]-y[i])**2 )**.5  )
    semip = sum(d)/2
    terms = [ max(semip-d[i],0) for i in range(3)]
    ans = ( (semip-d[0])*(semip-d[1])*(semip-d[2])*semip )**.5
    ans = ( terms[0] * terms[1] * terms[2]  * semip )**.5

    return  ans

count = 0
total = 0
mesh = 1000
for i in range(mesh):
    a = i * 360 / mesh
    for j in range(mesh):
        b = j * 360 / mesh
        count += 1
        total += area(a,b)
       
print(total/count)

  Posted by Larry on 2023-08-23 11:33:58
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (1)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information