• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

[Easy]Inside a rectangle

 
Ranch Hand
Posts: 1907
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Recently appeared in one regional newspaper.
Draw a rectangle ABCD with length 'x' and width 'y'.From point A ,draw an angle bisector line AE(bisecting angle BAD) ,intersecting BC at E.From point E,draw a line perpendicular to AE,intersecting CD/AD at F.Continue this procedure until you meet in one of the corners of the rectangle.Question is:
1)Is this procedure infinite(i.e.unable to meet at one of the corners) or finite? For what ratios of x/y this procedure is finite?
2)How many of such lines AE,EF.. can be drawn before meeting one of the corners?Answer in terms of x and y.
[ October 27, 2003: Message edited by: Capablanca Kepler ]
 
Arjun Shastry
Ranch Hand
Posts: 1907
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, Here is what I did:
Total horizontal distance traversed = Total vertical distance traversed = L.C.M. of(x,y).
If x=y,there will be only one line.If x and y are natural numbers(and y is not a multiple of x) ,then total number of lines before meeting one of the corners is x+y-1.If y = Nx,then total number of lines will be N.
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If x and y are natural numbers(and y is not a multiple of x) ,then total number of lines before meeting one of the corners is x+y-1.
If x = y = 1, then shouldn't the number of walls before hitting a corner be 0? And if x = 30, y = 40, shouldn't the number of walls be 5?
 
Arjun Shastry
Ranch Hand
Posts: 1907
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for corrcetion,I think then we have to make 30/40 -->3/4 so that number of lines(of type AE,EF etc) for the rectagles of sizes 3/4 or 15/20 or 30/40 etc is 3+4-1 = 6.So 6 lines can be drawn before reaching the corner of the rectagle.If rectangle is 30/41 then I think number of lines will be 30+41-1 = 70.
[ October 29, 2003: Message edited by: Capablanca Kepler ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic