mersenneforum.org  

Go Back   mersenneforum.org > Fun Stuff > Puzzles

Reply
 
Thread Tools
Old 2003-08-17, 17:26   #1
Fusion_power
 
Fusion_power's Avatar
 
Aug 2003
Snicker, AL

7·137 Posts
Default Buildings and ladders, how far apart?

There are two buildings along the side of a street. These buildings are separated by an unknown distance. Each building has a ladder that goes from the base of one building to the wall of the other. One ladder is 60 feet long and the other ladder is 45 feet long. Where the two ladders cross there is a third ladder that drops straight to the ground. It is 15 feet long.

How far apart are the buildings?

Fusion
Fusion_power is offline   Reply With Quote
Old 2003-08-17, 17:58   #2
Wacky
 
Wacky's Avatar
 
Jun 2003
The Texas Hill Country

44116 Posts
Default

Are the ladders straight? Do the buildings have straight vertical walls?
Without such restrictions, there is no unique solution.
Wacky is offline   Reply With Quote
Old 2003-08-17, 20:15   #3
Fusion_power
 
Fusion_power's Avatar
 
Aug 2003
Snicker, AL

7·137 Posts
Default

The ladders are presumed to be straight, the walls are presumed to be vertical, the buildings are presumed to meet the ground at true 90 degree angles.

the unknowns are the distance separating the two buildings and the height each ladder reaches on the wall.
Fusion_power is offline   Reply With Quote
Old 2003-08-18, 19:08   #4
c00ler
 
Jul 2003

52 Posts
Default

The distance is approximately 39.0493163163478 feet.
It's non-analytical brute-force answer.

Later I'll calculate the real value of the distance, and I'll post "programmer's" and "mathematician's" solutions.
c00ler is offline   Reply With Quote
Old 2003-08-18, 20:27   #5
Jwb52z
 
Jwb52z's Avatar
 
Sep 2002

2·3·7·19 Posts
Default

Am I wrong in thinking that you could do this problem with geometry?
Jwb52z is offline   Reply With Quote
Old 2003-08-19, 01:26   #6
Fusion_power
 
Fusion_power's Avatar
 
Aug 2003
Snicker, AL

11101111112 Posts
Default

Cooler is correct, it is a bit over 39 feet. I would be interested in seeing his math.

A working knowledge of both trigonometry and geometry helps to solve it.
Fusion_power is offline   Reply With Quote
Old 2003-08-19, 20:44   #7
c00ler
 
Jul 2003

110012 Posts
Default

I'm posting solutions

!WARNING! if you are far from math skip mathemetician's solution

L-distance between buildings
a-length of the ladder #1 (45 ft)
b-length of the ladder #2 (60 ft)
h-length of the ladder #3 (15 ft)
if a=b then L=sqrt(a^2-4*h^2) else a<>b

L is divided into 2 parts by the ladder #3
Parts are L*(h/sqrt(a^2-L^2)) and L*(h/sqrt(b^2-L^2)) ft long.(It's simple geometry)
So L=L*h/sqrt(a^2-L^2)+L*h/(b^2-L^2)
or 1/h=1/sqrt(a^2-L^2)+1/(b^2-L^2)=ff(L)

Programmer writes a short program solving ff(L)=1/h and gets L~=39.0493163163478 ft

Mathematicial solves it like that:
Substitute y=1/h, A=a^2, B=b^2, x=L^2
y=1/sqrt(A-x)+1/sqrt(B-x)
Square both parts
y^2=1/(A-x)+2/(sqrt(A-x)*sqrt(B-x))+1/(B-x)
Substitute Y=y^2
Y-1/(A-x)-1/(B-x)=2/(sqrt(A-x)*sqrt(B-x))
Square and substitute m=1/(A-x), n=1/(B-x)
Y^2+m^2+n^2-2yn-2ym+2mn=4mn
Y^2+(m-n)^2=2y(m+n)
Square
Y^4+2*Y^2*(m-n)^2+(m-n)^4=4*Y^2*(m+n)^2
Y^4+2*Y^2*(m-n)^2+(m-n)^4=4*Y^2*((m-n)^2+4mn)

Let's look at m-n
m-n=1/(A-x)-1/(B-x)=(B-A)/((A-x)*(B-x))=(B-A)*mn
Substitute k=4/(B-A)
4mn=k*(m-n)

Y^4+2*Y^2*(m-n)^2+(m-n)^4=4*Y^2*(m-n)^2+4*Y^2*k*(m-n)
Substitute t=m-n (t>0)
Y^4-2*Y^2*t^2+t^4=4*Y^2*k*t
(Y^2-t^2)^2=4*Y^2*k*t
Square root
abs(Y^2-t^2)=2*Y*sqrt(kt)

Let's prove Y>t
Y=m+n+2/sqrt(mn)
t=m-n
n>0 so Y>t

Y^2-t^2=2*Y*sqrt(kt)
Substitute z=sqrt(t)
Y^2-z^4=2*Y*sqrt(k)*z
z^4+2*Y*sqrt(k)*z-Y^2=0
Substitute w=2*Y*sqrt(k) (g>0)
z^4+w*z-Y^2=0
F(z)=0
There are only 2 real solutions and only one of them is positive (not very hard to prove)
So F(z)=(z^2+pz+q)*(z^2+rz+n)
but F(z) doesn't contain z^3 so r=-p
F(z)=(z^2+pz+q)*(z^2-pz+n)=z^4+(q+n-p^2)*z^2+p*(n-q)*z+qn
So
q+n=p^2 (1)
p*(n-q)=w (2)
qn=-Y^2 (3)

square (2)
p^2*(n-q)^2=w^2
P^2*((n+q)^2+4*nq)=w^2
With the help of (1),(3)
w^2=p^2*(p^4+4*Y^2)
p^6+4*Y^2*p^2-w^2=0
The lasy substitute p^2=g
g^3+4*Y^2*g-w^2=0
Unsubstitute w^2=4*(Y^2)*k
g^3+4*Y^2*g-4*(Y^2)*k
It has only one real solution(easy to prove)
It is equal to cube_root(u)+cube_root(v) where u,v are the solutions of
u+v=4*(Y^2)*k
uv=-(4*Y^2*(1/3))^3
(easy to check and to prove)

u=2*Y^2*(k+sqrt(k^2+16*(Y^2)/27))
v=2*Y^2*(k-sqrt(k^2+16*(Y^2)/27))
So we know u,v => we know g => we know p
Now we'll find n,q
n=(p^2+w/p)/2
q=(p^2-w/p)/2

(z^2+pz+q)*(z^2-pz+n)=0 has only 2 real solutions (because F(z)=0 has 2 real solutions)
and n<q
So z^2+pz+q=0 has 2 real solutions and z^2-pz+n=0 has no real solutions
now we solve z^2+pz+q=0
and take the greatest solution (one is positive, the other is negative)
z=(-p+sqrt(p*p-4*q))/2;
So we've found z
t=z^2
And t is found
To find x solve 1/(A-x)-1/(B-x)=t
x=A-2/(sqrt(t^2+kt)+t)
And L=sqrt(x)~=39.0493163163478 ft
That's the end of mathematician's solution.

That's mathematician's pseudo programmed solution:
a0:=45; or input(a0)
b0:=60; or input(b0)
if b0<a0 then change b0,a0
y0:=1/15; or input(y0)
a:=a0*a0;
b:=b0*b0;
y:=y0*y0;
k:=4/(b-a);
w:=2*y*sqrt(k);
u:=2*y*y*(k+sqrt(k*k+16*y*y/27));
v:=2*y*y*(k-sqrt(k*k+16*y*y/27));
p:=sqrt(exp(ln(u)*(1/3))-exp(ln(-v)*(1/3)));
q:=(p*p-w/p)/2;
z:=(-p+sqrt(p*p-4*q))/2;
t:=z*z;
x:=a-2/(sqrt(t*t+k*t)+t);
l:=sqrt(x); and output(l)

P.S. I'm not sure if programmer's program is slower than mathematician's one. Can someone calculate about 1000 digit's of answer using both programs and compare speeds of programs?
c00ler is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Snakes and alligators and maybe ladders only_human Soap Box 5 2016-08-26 07:44
If you aren't obsessed with buildings, what are the 9 wonders of the world? jasong jasong 0 2016-06-17 21:55

All times are UTC. The time now is 03:04.


Sat Jul 17 03:04:32 UTC 2021 up 50 days, 51 mins, 1 user, load averages: 1.43, 1.30, 1.31

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.