Program to find GCD of two polynomials

The objective is to write a program that finds greatest common divisor of two polynomials g(x) and h(x). The task does not define what form we get those two polynomials, so let's say we will get them in a form of a String, something like that: $latex ``2x^3+5x^2+8x+3``$ Let's start splitting our problem into chunks and gather some information about the steps we would need to implement. First, what is the greatest common divisor? In math, GCD of two or more integers, which are not all zero, is the largest positive integer that divides each of the integers (1). How do we find it? One way is to use the Euclidean algorithm. The intuition behind this algorithm is such: we have A and B numbers. We divide A by B and get C. If C is 0 - then B is our GCD. If it is not 0, then we set A to B and B to the reminder and continue operation until we get 0. $latex gcd(a,0)=a$ $latex gcd(a,b)=gcd( b,a\,mod\,b )$ Let's say we have 12 and 9. 12 mod 9 is 3. 9 mod 3 is 0. So our GCD is 3. Ok, now we know about GCD…


Removing supervisor password (SVP) on ThinkPad T42

Recently received two ThinkPad T42 laptops ( some company decided to upgrade its IT and were giving away them almost for free ). After turning them on got an 271 error and later was prompted to enter password. It seems battery was dead on both of those laptops and when its dead, real time clock goes bananas and you are asked for supervisor password to set the clock again ( if supervisor password was set ). Offcourse nobody knew anything about what password it was. So had to figure it out myself how to solve this situation. On ThinkPad T42 SVP password is stored on EEPROM chip 24RF08. One thing that sometimes work and was reported by many T42 users is to short pins 3 and 4 of 24RF08, procedure: Short pins 3 and 4 of 24RF08, keep them short Tun on ThinkPad Press F1 to go to BIOS If asked for password press enter Go to Security - Passwords - Supervisor password Release shorted pins Enter new password, save and reboot. Then go to BIOS again and disable SVP password by entering the password you just saved. Like they say - "it worked on my two t42 machines" ;)


End of content

No more pages to load