Author |
Message |
punjabiace
|
Posted: Wed Oct 08, 2008 6:42 pm Post subject: Turing crazy hard math problem |
|
|
so basically i have to solve the problem
ax+by=c where a,b, and c are given and i have to find out x and y
any ideas or help are appreciateedd!!!!!! ![Razz Razz](http://compsci.ca/v3/images/smiles/icon_razz.gif) |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
[Gandalf]
![](http://compsci.ca/v3/uploads/user_avatars/189297994e4c716fec7f1.png)
|
Posted: Wed Oct 08, 2008 6:48 pm Post subject: RE:Turing crazy hard math problem |
|
|
ax+by=c is the equation of a line, right? So chances are, you're going to be finding multiple (x, y) pairs that satisfy the equation. Have you thought about how you would do this (without using Turing or a calculator) on paper? |
|
|
|
|
![](images/spacer.gif) |
Insectoid
![](http://compsci.ca/v3/uploads/user_avatars/13760332514cbd0ce972eaa.jpg)
|
Posted: Wed Oct 08, 2008 7:01 pm Post subject: RE:Turing crazy hard math problem |
|
|
I would go about this by writing a program to isolate X or Y, then substitute the other half of the equation into the original.
ex. X = ??????
A(????)+by=c
Then isolate the remaining unknown and solve! |
|
|
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Wed Oct 08, 2008 7:19 pm Post subject: RE:Turing crazy hard math problem |
|
|
I'm with Gandalf on this one -- it's a Math problem, not Turing.
Figure it out on paper. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
Insectoid
![](http://compsci.ca/v3/uploads/user_avatars/13760332514cbd0ce972eaa.jpg)
|
Posted: Wed Oct 08, 2008 7:20 pm Post subject: RE:Turing crazy hard math problem |
|
|
It would be fun to write a program that re-arranges equations for you. |
|
|
|
|
![](images/spacer.gif) |
SNIPERDUDE
![](http://compsci.ca/v3/uploads/user_avatars/16932914504cbd0ad6ceaf1.jpg)
|
Posted: Wed Oct 08, 2008 8:13 pm Post subject: RE:Turing crazy hard math problem |
|
|
Chances are if it is posted here and flexible enough to cover a variety of equations it would be abused. I've thought of making one of those (just for myself) to cover advanced functions and financial mathematics. Didn't end up doing it. |
|
|
|
|
![](images/spacer.gif) |
Brightguy
![](http://compsci.ca/v3/uploads/user_avatars/527435178485ad4c287538.gif)
|
Posted: Thu Oct 09, 2008 11:13 am Post subject: Re: Turing crazy hard math problem |
|
|
For real numbers it is simple to write x as a function of y. For integers, this is a classic problem which would be covered in an elementary number theory class. See "Extended Euclidean algorithm".
insectoid: Isolating and substituting into the same equation won't help. |
|
|
|
|
![](images/spacer.gif) |
Insectoid
![](http://compsci.ca/v3/uploads/user_avatars/13760332514cbd0ce972eaa.jpg)
|
Posted: Thu Oct 09, 2008 11:28 am Post subject: RE:Turing crazy hard math problem |
|
|
Well, It would mean the only remaining unknown is Y, which can be re-arranged so that y is isolated. I think...Maybe this requires 2 equations. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Brightguy
![](http://compsci.ca/v3/uploads/user_avatars/527435178485ad4c287538.gif)
|
Posted: Thu Oct 09, 2008 11:31 am Post subject: Re: RE:Turing crazy hard math problem |
|
|
insectoid @ Thu Oct 09, 2008 11:28 am wrote: Well, It would mean the only remaining unknown is Y, which can be re-arranged so that y is isolated. I think...Maybe this requires 2 equations.
Try it. ![Wink Wink](http://compsci.ca/v3/images/smiles/icon_wink.gif) |
|
|
|
|
![](images/spacer.gif) |
S_Grimm
![](http://compsci.ca/v3/uploads/user_avatars/18926424384e6d86e5cf4d6.jpg)
|
Posted: Thu Oct 09, 2008 11:36 am Post subject: RE:Turing crazy hard math problem |
|
|
there is no "right" answer for this question. x,y COULD be anything. the points are on a line, so there would be an unlimited amount of answers, one for each point on this line. (ie) say x = 1, then solve. say x = 2 then solve. say x = 3 then solve. etc....etc....) |
|
|
|
|
![](images/spacer.gif) |
Clayton
![](http://compsci.ca/v3/uploads/user_avatars/1718239683472e5c8d7e617.jpg)
|
Posted: Thu Oct 09, 2008 11:36 am Post subject: RE:Turing crazy hard math problem |
|
|
0 = 0
Seeing as there doesn't appear to be any restrictions, just isolate y, then give x any value, compute y, and output one of the possible ordered pairs that satisfies the relation. |
|
|
|
|
![](images/spacer.gif) |
S_Grimm
![](http://compsci.ca/v3/uploads/user_avatars/18926424384e6d86e5cf4d6.jpg)
|
Posted: Thu Oct 09, 2008 11:37 am Post subject: RE:Turing crazy hard math problem |
|
|
your fast. nice response |
|
|
|
|
![](images/spacer.gif) |
|