No. Two linear equations in three unknowns will always yield many solutions (or zero solutions). These are essentially plane equations. Two planes intersect in a line (unless they are parallel). You might get a de facto unique solution for some values of Vu, Vd, Vu, T1, T2 from the constraints x,y,z >= 0. It would have to lie on an axis.
For example, you can aways pick z and find x and y. Using your notation, x/Vd + y/Vp + z/Vu = T1 x/Vu + y/Vp + z/Vd = T2 Subtract to get: x(1/Vd - 1/Vu) + z(1/Vu - 1/Vd) = T1 - T2 then x = [ (T1 - T2) - z(1/Vu - 1/Vd) ] / (1/Vd - 1/Vu) So now you can pick any z and get x. Once you have both of these, plug them in here: y = Vp (T1 - x/Vd - z/Vu) As long as x,y,z >= 0, you are in business. On Sep 14, 10:51 pm, Terence <technic....@gmail.com> wrote: > You could also get a unique solution if the car has speed of 72 63 56 > in downhill, plain and uphill respectively. > > I think the speed Vd, Vp, Vu was chosen so that 2Vp = Vd + Vu. > But for unique solution, it ought to be 2/Vp = 1/Vd + 1/Vu. > > Under this condition, we can get the unique S=x+y+z: > From > x/Vd + y/Vp + z/Vu = T1 > x/Vu + y/Vp + z/Vd = T2 > We get (1/Vu+1/Vd)(x+z)+2/Vp*y = T1+T2 > Apply 2/Vp = 1/Vd + 1/Vu, then 2/Vp(x+y+z)=T1+T2 > S=x+y+z = Vp(T1+T2)/2 > > On 2010-9-15 9:31, Gene wrote: > > > > > This isn't right. Dropping both y terms is the same as setting y to > > zero. The answer you get is correct, but there are many others as has > > been said. > > > You could get a unique solution if the route were constrained to be > > monotonic (level and up or else level and down). > > > On Sep 14, 4:28 pm, Minotauraus<anike...@gmail.com> wrote: > >> Actually the solution is unique. The middle part with the Ys is the > >> same and therefore can be omitted out. Now you are left with > >> 2 equations and 2 unknowns. > > >> I used time in minutes and I have x = 1.28, z = 0.30476 units (y can > >> be found out). > > >> I guess the trick was 1. to write the equations that Yan did > >> and 2. to recognize that the plain part is the same and hence can be > >> cancelled. > > >> On Sep 14, 3:31 am, Yan Wang<wangyanadam1...@gmail.com> wrote: > > >>> actually, there are many solutions, just pick up one from them... > >>> On Tue, Sep 14, 2010 at 3:23 AM, Abhilasha jain > >>> <mail2abhila...@gmail.com> wrote: > >>>> how can u solve 3 variables using 2 equations? > >>>> On Tue, Sep 14, 2010 at 3:44 PM, Yan Wang<wangyanadam1...@gmail.com> > >>>> wrote: > >>>>> x/72 + y/64 + z/56 = 4 > >>>>> & > >>>>> x/56 + y/64 + z/72 = 4+2/3 > >>>>> find a solution to this ... > >>>>> On Tue, Sep 14, 2010 at 2:31 AM, bittu<shashank7andr...@gmail.com> > >>>>> wrote: > >>>>>> Amazon Interview Question for Software Engineer / Developers > >>>>>> A car has speed of 72 64 56 in downhill, plain and uphill > >>>>>> respectively . A guy travels in the car from Pt. A to pt. B in 4 Hrs > >>>>>> and pt. B to pt. A in 4 Hrs and 40 min. what is the distance between A > >>>>>> and B? > >>>>>> Regards > >>>>>> Shashank > >>>>>> -- > >>>>>> You received this message because you are subscribed to the Google > >>>>>> Groups "Algorithm Geeks" group. > >>>>>> To post to this group, send email to algoge...@googlegroups.com. > >>>>>> To unsubscribe from this group, send email to > >>>>>> algogeeks+unsubscr...@googlegroups.com. > >>>>>> For more options, visit this group at > >>>>>>http://groups.google.com/group/algogeeks?hl=en. > >>>>> -- > >>>>> You received this message because you are subscribed to the Google > >>>>> Groups > >>>>> "Algorithm Geeks" group. > >>>>> To post to this group, send email to algoge...@googlegroups.com. > >>>>> To unsubscribe from this group, send email to > >>>>> algogeeks+unsubscr...@googlegroups.com. > >>>>> For more options, visit this group at > >>>>>http://groups.google.com/group/algogeeks?hl=en. > >>>> -- > >>>> You received this message because you are subscribed to the Google Groups > >>>> "Algorithm Geeks" group. > >>>> To post to this group, send email to algoge...@googlegroups.com. > >>>> To unsubscribe from this group, send email to > >>>> algogeeks+unsubscr...@googlegroups.com. > >>>> For more options, visit this group at > >>>>http://groups.google.com/group/algogeeks?hl=en.-Hide quoted text - > >> - Show quoted text -- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.