Thank you for using the timer!
We noticed you are actually not timing your practice. Click the START button first next time you use the timer.
There are many benefits to timing your practice, including:
0% (00:00) correct
0% (00:00) wrong based on 0 sessions
I have a generic question on how to do something faster.
Say we have a eqn :
Y = (-3/5) X + 30
where 0<= X <=50 and 0<= Y <=30.......Both X,Y are integers only.
Ques is to find out how many solutions are there for this eqn i.e. how many integer (X,Y) pairs are there. I know one can enumerate and then count the number of solutions. I wud be interested to know if someone knows some trick that can make this process of counting etc go quickly.
Re: PS: Generic Ques [#permalink]
09 May 2005, 17:11
since value of y can be only integer, there are 11 solutions because x can only be ultiples of 5 so the values of y are also 11 integers.
value of x: 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50.
value of y: 30, 27,........................................., 0.
i know i am going to enumerate, but it's not time consuming. but about advance mathematics, i have no idea however i love it, i love it, i love it. if i get a chance to take advance mathmatics/econometrics, i will definitely take.
Finding one solution x0, y0 to this equation gives us all solutions.
x(t) = x0 - Bt
y(t) = y0 + At
Where t is an integer variable.
If you are given constrains m <= x < = M and n <= y <= N you know that x(t) will be decreasing with t growing and y(t) will be growing.
Compare A and B to find out who will be growing/decreasing faster and pick (x0,y0) solution accordinly so that x0 is the closed integer to M from the bottom or y0 is the closed integer to n from the top.
After that find out maximum t so that x(t) or y(t) is still with the interval of the given constrain. Count values for t, check that the other part is still in the constrain.