Computer Problem-Solving in EGR 141

Engineering and Computer Science Fall 2006

Problem-Solving Exercise #2

Divide and Conquer Techniques

Part A

Find the difference between the sum of the first 400 multiples of 3 and the sum of the first 400 odd numbers. Do not use brute force and show how you simplified the problem.

Here is one solution:

Σ 3n : where n goes from 1 to 400, for the sum of the first 400 multiples of 3

Σ 2n – 1 : where n goes from 1 to 400, for the sum of the first 400 odd numbers

Σ 3n– (Σ 2n – 1) = Σ n + 1 where n goes from 1 to 400, for the difference

To sum the difference (Σ n + 1) :

2 + 401 = 403So: (200)(403) = 80,600

3 + 400 = 403

4 + 399 = 403

.

.

.

201 + 202 = 403

Part B

Use the technique of simplifying this circuit using equivalent resistances into smaller, simpler circuits.

Given the following circuit:

If R1 = 36 Ω, R2 = 20 Ω, R3 = 30 Ω, and Vs = 6 Volts, determine the circuit equivalent resistance (REQ) and the circuit current (I). Also calculate the branch currents through R2 and R3, and the voltage drops across R1, R2, and R3.

R2,3 = 12 ΩV1 = I1(R1) = 4.5 V

REQ = 48 ΩV2 = I2(R2) = 1.5 V

V3 = I3(R3) = 1.5 V

I = I1 =V / REQ = 12 / 30 = 0.125 A

I2 = I ( R3 / ( R2 + R3 ) ) = 0.075 A

I3 = I ( R2 / ( R2 + R3 ) ) = 0.05 A

Part C

Use the technique of simplifying this circuit using equivalent resistances into smaller, simpler circuits.

Given the following circuit:

If R1 = 24 Ω, R2 = 24 Ω, R3 = 12 Ω, R4 = 36 Ω, R5 = 10 Ω and Vs = 9 Volts, determine the circuit equivalent resistance (REQ) and the circuit current (I). Also calculate the branch currents through R2, R3, R4, and R5, and the voltage drops across R1, R2, R3, R4 and R5.

R23 = 8ΩI = I1 = Vs/ REQ = 9 / 36 = 0.25 A

R235 = 18Ω

R2345 = 12Ω

REQ = 36Ω

I4 = I ( R235 / (R235 + R4) ) = 0.083 AV1 = I (R1) = 6 V

I5 = I – I4 = 0.167 AV2 = I2(R2) = 1.33 V

I2 = I5 ( R3 / (R2 + R3) ) = 0.056 AV3 = I3(R3) = 1.33 V

I3 = I5 – I2 = 0.111 AV4 = I4(R4) = 3 V

V5 = I5(R5) = 1.67 V

Part D

Use the technique of separating the problem into X- and Y- components to solve this problem:

A soccer ball is kicked off the ground, with a velocity of 22 meters / second, at an upward angle of 30 degrees. Using a gravitational constant, g, of 9.8 meters / second2calculate the following:

1) The time it takes for the soccer ball to hit the ground. (seconds)

2) The maximum height the soccer ball achieves. (meters)

3) The distance the soccer ball travels before it hits the ground. (meters)

First, find tmax (when Vy = 0 ), using Vy equation:

Vy(t) = V sin(θ) – g(tmax)

0 = 22(sin(30)) – (9.8)(tmax)

tmax = 11.0/9.8 = 1.12 sec

Now find Py(tmax) using Py equation:

Py(tmax) = 0 + 22(sin(30))(1.12) – (0.5)(9.8)(1.12)2

Py(tmax) = 12.32 – 6.15

Py(tmax) = 6.17 m

Use tmax to find total t

t = 2tmax

t = (2)(1.12)

t = 2.24 sec

Find Px using Px equation

Px(t) = Vx(t) +Po

Px(t) = 22(cos(30))(2.24) + 0

Px(t) = 42.68 m

Final answers:

1) t = 2.24 sec

2) Py(tmax) = 6.17 m

3) Px(t) = 42.68 m

Part E

Use the technique of separating the problem into X- and Y- components to solve this problem:

A Halloween prankster throws an egg out the window of an office building down onto the parking lot below. The egg is thrown with a velocity of 15 meters / second, at an upward angle of 45 degrees, and is release exactly 65 meters above the surface of the parking lot. The egg lands on the roof of a parked SUV, 2 meters above the surface of the parking lot.

Using a gravitational constant, g, of 9.8 meters / second2calculate the following:

1)The time it takes for the egg to hit the parked SUV. ( seconds)

2)The total distance away from the building that the egg lands. ( meters)

First, find t using Py equation:

Py = Py0 + V sin(θ)t –0.5gt2

2 = 65 + 15(sin(45))t – (4.9)t2

Using the Quadratic Equation to solve for t

t = 4.83 sec

Now find Px(t) using Px equation

Px(t) = Px0 + Vcos(θ)t

Px(t) = 0 + 15(cos(45))(4.83)

Px(t) = 51.22 m

Final answers:

1) t = 4.83 sec

2) Px(t) = 51.22 m