Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Algorithm help

  1. Sep 23, 2010 #1
    You are designing a highway bridge. In particular you are trying to determine how to put the road surface on the bridge. You live in an area where the maximum summertime temperature is 40 degrees centigrade and the minimum winter temperature is -30 degrees centigrade. The coefficient of linear expansion, α, measures the fractional change in length per unit change in temperature (fractional change = change in length per unit length). A coefficient of linear expansion will be no larger than 0.0001. Consider a section of road surface with length L1 (or L2) at temperature T. If the temperature T increases by ∆T the length of the section of road surface with L1=3 will increase by 3∆L to L1+ 3∆L. If the temperature decreases by ∆T a section of road surface with length L2=5 will decrease in length by 5∆L to L2-5∆L. The amount the length changes (per unit length of road surface L=1) by is ∆L = ∆Tα . You are to write a program to determine two things, the maximum size of the space between road sections and the amount of space to leave between the sections of road surface on the day they are installed. At the maximum temperature there should be no space between the sections of road surface. You must leave enough room between sections of road surface for the road surface to expand to the length it would have at the maximum temperature of 40 degrees. The user will provide the temperature on the day the installation takes place, the length of each section of road surface to be installed (at the temperature when the installation occurs) and the coefficient of linear expansion of the material being used in the road surface.

    i can't do physics =(

    i tried to come out with the equations but they went horribly wrong. I wrote the rest of the program just fine, but I can't figure out the equation. We shouldn't have to do physics in a computer programming course anyway
  2. jcsd
  3. Sep 23, 2010 #2


    User Avatar

    Staff: Mentor

    Welcome to the PF.

    Per the PF rules (see the link at the top of the page), we can't do your work for you. But if you show us the equations you were working on, we should be able to help you figure out what you are doing wrong.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook