Is there a simpler way where i could find all the valid values of y if i'm given y intercept as a whole number and a slope of line as a whole number in a line equation?
So for example, my line equation y = mx+c, i would be given c and m, how could i find a valid whole number for y which would satisfy my line equation?
So if c = 1, m = 10, my equation would be (y-1)/10 = x. Now valid values of y would be 11, 21, 31 etc. Is there a simpler way or any formula for the same?
To make it simpler, if am given m, c for multiple lines on a 2d plane, and now if i give you a whole number indicating value of y, can i find out which all line would this y value intersect with from all the above lines? Is there any formula which i could apply to get to know all the lines that it intersect with?
EDIT
I know (y-c) mod m would let me know if y is the possible solution or not. If let's say i give you multiple lines (let's call it as a given lines) with c and m (both whole number) for those different lines (let's say you plotted them on graph by calculating x intercept).
Now if i give you say another line equation of the form y=(a times x), With this information, is it possible to know, how many of the given lines would this line y=(a times x) intersect with?
So let's take an example. Consider we are given two lines (a.k.a. given lines) as below:
c m
line 1 => 1 0
line 2 => 2 0
Now i have two equations:
y=x, ----- let's call this as Equation 1
y=2x, ----- let's call this as Equation 2
I know for the fact as below:
- Equation 1 intersect at (1,1) with given line 1
- Equation 2 intersect at (0.5, 1) with given line 1. We don't need this as it intersect at real number.
- Equation 1 intersect at (2,2) with given line 2
- Equation 2 intersect at (1, 2) with given line 2.
Is there a simpler way rather than going through each line to find number of lines that this equation of line would intersect with at x and y co-ordinate represented as a whole number?
So as can be seen above, equation 1, intersect with just one of the given lines, while equation 2 intersects with both the given lines.
Note:
It is not necessary that given equation needs to intersect with all the given lines. Also it may be possible that line may not intersect with any of the given lines which is fine.
Note that if we have given $$m,c$$ then we get Points of the form $$(x;mx+c)$$ for example $$x=2$$ then we have $$(2,m2+c)$$ The same for your second question, Points are $(x;10x+1)$ for example: $$x=10$$ so $$10\cdot 10+1=101$$ and so on.