The equation i) (a+b)*x + b equates to c means its possible to find an integer pair of (a,b) such that a solution exists. Now consider the second equation [(a+1)*x]+[(b-1)*(x+1)] which equates to (a+b)*x + b - 1, from the equation 1, (a+b)*x + b = c so this equation becomes c - 1 which indeed can be considered as another freq k (k = c - 1) so a pair (a+1,b-1) is valid for this equation. From the equations [0+x] + [(b+a)*(x+1)] and other one (just below this) we are trying to find the range of freq such that an integer pair(a,b) exists. Here we are not concerned about the values of a and b but is it possible to find one so we found the extremes for a given x means the range from which a freq should belong inorder to get an integer pair of solution(a,b). Now the range comes out to be 0 to max value a can take. Now the question is how to find the max value a can take. It's really easy consider all the freq coming out from x means (c/x) so the upper limit becomes c/x. Now we can see any freq with a possible solution is just multiple of (a+b) with x and a reminder which lies btw our 2 extremes 0 and c/x, so if 0
Thanks for explaining. Just to clarify it further - you can think of it as the difference between when we take x and “x+1” is that the later is just 1 number up. Hence whenever you get some number and you are trying to divide into some x (a times) and some x+1 (b times), you can think of it as all of them are x (a+b times) and the extra ones (b times) are because of x+1. And number of 1s can be anywhere between 0 and c/x (maximum integer value of a that is possible).
Presentation is awesome. Keep up
me tried to apply the unbounded knapsack , but still getting error
Didn't understand 4 equations where remainders are involved part
Great Solution👍
Bro can you share your CF handle. Just to take a look into it.😅
pk842. But I don't participate now, so bit stale :)
Can you explain the intuition behind 0
Yes Please explain it , cannot understand it
The equation i) (a+b)*x + b equates to c means its possible to find an integer pair of (a,b) such that a solution exists. Now consider the second equation [(a+1)*x]+[(b-1)*(x+1)] which equates to (a+b)*x + b - 1, from the equation 1, (a+b)*x + b = c so this equation becomes c - 1 which indeed can be considered as another freq k (k = c - 1) so a pair (a+1,b-1) is valid for this equation. From the equations [0+x] + [(b+a)*(x+1)] and other one (just below this) we are trying to find the range of freq such that an integer pair(a,b) exists. Here we are not concerned about the values of a and b but is it possible to find one so we found the extremes for a given x means the range from which a freq should belong inorder to get an integer pair of solution(a,b). Now the range comes out to be 0 to max value a can take. Now the question is how to find the max value a can take. It's really easy consider all the freq coming out from x means (c/x) so the upper limit becomes c/x. Now we can see any freq with a possible solution is just multiple of (a+b) with x and a reminder which lies btw our 2 extremes 0 and c/x, so if 0
Thanks for explaining.
Just to clarify it further - you can think of it as the difference between when we take x and “x+1” is that the later is just 1 number up.
Hence whenever you get some number and you are trying to divide into some x (a times) and some x+1 (b times), you can think of it as all of them are x (a+b times) and the extra ones (b times) are because of x+1. And number of 1s can be anywhere between 0 and c/x (maximum integer value of a that is possible).
@@codingmohan i understand it very very clearly.
thank you !
CAN YOU PROVIDE THE NEXT QUETION
Sorry for the late upload - World cup :)
Here you go - th-cam.com/video/1KPNq_7umpo/w-d-xo.html