Wikipedia:Reference desk/Archives/Mathematics/2006 July 13

Data Migration: Windows 3.1(!) to Windows XP
(Windows 98, indeed. My old machine is perfectly safe from viruses  virus virii.  But I'd like to bring some data (Netscape mail files, a few old C programs, a lot of random text files, VPN passwords, etc.) from the old machine to the new one.  Unfortunately, I haven't found software/hardware that will do it.

Configuration:
 * Old machine: 486DX2/66, Windows 3.1, 24MB memory (motherboard will hold a maximum of 48MB), a total of about 6GB of EIDE disks, 2 serial ports, 1 parallel port, CD reader, (broken) tape backup unit, 2 floppy drives.
 * New machine: HP, Windows XP (home), 1GB memory, 80GB (or so) disk space, two CD/DVD drives (one writable), one serial port, one parallel port, one USB port, possibly a FireWire port, and ports for a number of memory sticks.

Things I've tried:
 * Laplink serial connection (blocked by the XP operating system; I think it might work from the old machine to a Windows 95 or 98 machine, and use the CD-writer on that one)
 * SparQ parallel port (pseudo-SCSI) external drive. It might work, but the first one I bought on eBay broke while I was trying to download the driver into the old machine.  I don't want to try again without some indication it would work.
 * A Geek Squad Agent was going to download a Linux system into the old machine which would make it a virtual external disk drive for the other machine, but it requires a minimum of 64MB memory.

I'd prefer not to try things that involve taking off the back of the machine (such as loading the two internal disks of the old machine as secondary drives on the new machine), as the frame (of the old machine) is bent, and I might not be able to put them back. It's been suggested that the old machine, once scrubbed of personal data, could be donated to charity. It does have legal copies of IE 3, Netscape 4.72, WordPerfect Office 6 (with WP Office 7 CDs available), and some other software which might be useful to someone. But it may be too old for anyone to want.

Any ideas? &mdash; Arthur Rubin | (talk) 01:25, 13 July 2006 (UTC)


 * Hmm, perhaps you can hook a CD or DVD writer up to the old machine ? That comp does sound pretty old, but perhaps a kindergarten class somewhere could use it (they wouldn't want a valuable comp in there, as it would be ruined the first time a kid spills a juice box into the vents). StuRat 01:55, 13 July 2006 (UTC)


 * Personally, I would just attach the old drives to the new machine&mdash;even including time to disassemble and reassemble the machines it will be faster. Otherwise, if I were trying to be fancy about it, I would fall back to the least common denominator, which is the serial port.  Go download Tera Term (there is a version for Win 3.1, too).  Transfer the files using ZMODEM or Kermit one at a time or zip them into single archive and transfer that (if you have sufficient disk space).  You will need a null modem cable to connect the computers, of course.  It should be a fun time.  I do wonder how you have 6GB of data on a 486/66 Win 3.1 machine, though. &mdash;Bradley 18:12, 13 July 2006 (UTC)


 * Have you considered using the tape backup to tranfer the files? I'm assuming it is external. 48v 19:54, 13 July 2006 (UTC)


 * I agree with Bradley. If you don't want to disassemble your new machine for warranty reasons, you can try putting the hard disk to a third machine, possibly one that already has an IDE mobile rack.
 * Attaching an external disk drive like to the paralel or serial port does sound nice, so you may want to try it again. Try borrowing such a zip drive from someone.
 * Failing that, you can try copying the data to a third machine with multiple floppy disks and then copy the data from that machine to yours in whatever way you find easy. (Do compress the data then.)  That of course will be tiring if the data is more then, say, 10 floppy disk's size.
 * Finally, you could try booting Linux on both computers and use the PLIP interface that creates a network connection on paralel port, then you can just use any of the usual programs like scp, rsync, ftp to copy the files. For this, you need two Linux live CDs if you don't want to install a permanent copy of linux.  Knoppix or any live CD is ok for the new machine, but you proably need a special one like Damn Small Linux for the old machine if it has only 24MB memory (Knoppix might still run in textmode with only 24M of memory, I have read both 16M and 32M as minimum memory requirement on their webpage; it would probably also run if you could create a swap partition but I'm not sure how you'd create that with windows).  You also need a paralel cable of course.
 * You can also try to get a serial modem for the old machine and connect it to a modem in another machine, but note that without further software, Win3.1 cannot connect to an IP network as it knows only the NetBEUI and/or IPX network protocols, and even those only the Workgroup version, so you'll probably have to install special software on at least one of the machines.
 * Anyway, good luck. &#x2013; b_jonas 20:43, 13 July 2006 (UTC)

Alternative solution of i^243
I tried to help the site http://www.exampleproblems.com/wiki/index.php/CV15 with the following solution

$i^243=(i^4)^60*i^3=1^60*(-i)=-i$

but I was not allowed to edit it on the ground that I was not confirmed with email address.

My question: do you want to help by editing it in your own name?Twma 03:16, 13 July 2006 (UTC)

If you looked at the page, you would find that is the answer already there. They merely used a different facroti(z|s)ation of 243. -- He Who Is[ Talk ] 15:30, 13 July 2006 (UTC)


 * The different factorization misses the point: Powers of i are periodic with period four. One consequence is the famous equation
 * $$ e^{i\vartheta} = \cos \vartheta + i \sin \vartheta . \,\! $$
 * This is often presented in terms of power series.


 * ez || = || 1 || + || z || + || z2/2 || + || z3/3! || + || z4/4! || + || z5/5! || + || …
 * cos z || = || 1 ||  ||   || − || z2/2 ||   ||   || + || z4/4! ||   ||   || + || …
 * sin z || = ||  ||   || z ||   ||   || − || z3/3! ||   ||   || + || z5/5! || − || …
 * }
 * Letting z = i&thetasym;, it is the periodicity of powers of i that makes this work. --KSmrqT 22:50, 13 July 2006 (UTC)
 * sin z || = ||  ||   || z ||   ||   || − || z3/3! ||   ||   || + || z5/5! || − || …
 * }
 * Letting z = i&thetasym;, it is the periodicity of powers of i that makes this work. --KSmrqT 22:50, 13 July 2006 (UTC)

My alternative solution appears to be shorter.Twma 01:43, 14 July 2006 (UTC)


 * Yes, that too. But even if it were not, it would still be a much better answer, especially given the context in which the question appears. --KSmrqT 09:09, 14 July 2006 (UTC)

I wish someone would help my site by doing this problem- I still can't figure it out!

http://www.exampleproblems.com/wiki/index.php/CVRC8

--Tbsmith

Present Value
A trust fund pays $2000/year for 5 years, starting immediately. The interest rate is 12%/year compounded continuously. Find the present value of the trust fund.--Patchouli 16:06, 13 July 2006 (UTC)
 * When is your homework due? Notinasnaid 16:08, 13 July 2006 (UTC)


 * Now.--Patchouli 16:21, 13 July 2006 (UTC)
 * The present value is $2000 (assuming starting immediately means you just started the trust fund). That was easy! :) Digfarenough 18:06, 13 July 2006 (UTC)


 * Here the present value means today's value of the money that you obtain at the end of 5 years.

At the end of 5 years you obtain 2000e0.12*5=$3,644.24. Now it would be worth $7,519.81 if someone handed you that $3,644.24, but I only have the right answer and can't derive the solution.

The continuous compounding has confused me.--Patchouli 18:25, 13 July 2006 (UTC)


 * It confuses me, too. I just compound once a second and figure that's close enough.  I get (365.25*24*60*60) seconds in a year, or  31,557,600 seconds.  This gives me a rate of [1 + (0.12/31557600)]^31557600 or about 12.75%. StuRat 18:52, 13 July 2006 (UTC)


 * So, if we got one dollar at the start of each year, the total amount would be:

1.1275^1 = 1.1275  1.1275^2 = 1.2713   1.1275^3 = 1.4333   1.1275^4 = 1.6161 + 1.1275^5 = 1.8221 -- -              7.2703


 * But, since we get $2000 at the start of each year, that's worth 2000 times as much, or $14,540.67. Now, that's the total value after 5 years.  To calculate the present value you would need to use some assumption about inflation.  For example, if we assume 5% inflation, then redo the calcs using 12.75-5.00 as the percent interest rate each year. StuRat 19:13, 13 July 2006 (UTC)


 * I doubt the question is on inflation adjusted value. Whatever the answer is, it should be less than $10,000 because that's how much the trust fund (annuity) is paying out.  It will be less than that because whatever is sitting in the account is earning interest.  There may be a formula in your book that's easier, but you should be able to work it out with this thinking:
 * The trust fund will be zero after the fifth payment. So, one year before it must be $2000/e0.12= $1517.16 $1773.84.  That means that immediately after the second-to-last payment the account would have to have $1517.16 $1773.84, which compounded continusouly for a year would be $2000 using the Final = Initial&times;erate&times;t formula for continous compounding.
 * To step back in time from right after the second-to-last payment to right before the second-to-last payment you need to have $2000 more in the account or $3517.16 $3773.84. This value was built up from a year of compounding, so you need to divide it by e0.12 to get back a year.
 * Write all this down, with a timeline if you need to and you'll get back to the present value of the annuity.
 * Excel has spreadsheet functions to do this for you, although it might not actually do continuous compounding.
 * You'll find answers will vary slightly due to rounding error along the way. Post your answer and I'll tell you if mine agrees.
 * &mdash;Bradley 20:09, 13 July 2006 (UTC)


 * I read it to mean the trust fund would pay out exactly $2000 per year, at the start of each year, for 5 years, and then, as it was received, the money would be placed in an account that earned 12% compounded continuously. Under this understanding, you would determine the present value of the future money by accounting for inflation over the intervening period. StuRat 22:26, 13 July 2006 (UTC)


 * If it means what you guys think, it should be written this way:

"How much money must be put into  an account earning 12% annually,   compounded continuously, if the   account is to pay out $2000, at   the start of each year, for 5   years, and then be exhausted."


 * I hate it when they can't manage to clearly state a problem. StuRat 22:37, 13 July 2006 (UTC)


 * It's not an entirely messed up question. A trust fund is an annuity.  They ask for the present value of the annuity.  I think the term you're thinking of is net present value, which would be the value, in today's dollars, of receiving regular payments for five years, but that requires more than just an interest rate.  It requires your net investment return rate per year, which should include how much you think you can make off the money in the mean time minus inflation.  Net present value is often used in determining if the future payoff of an investment (like a company developing a new product) plus its cost now is better than just leaving that money in the bank or whatever else you do with your cash. &mdash;Bradley 23:14, 13 July 2006 (UTC)

Year 	 Given out 	 Left in Account 	 Total in Account 1st 	 $2,000.00 	 $5,980.02 	 $7,980.02 2nd 	 $2,000.00 	 $4,742.45 	 $6,742.45 3rd 	 $2,000.00 	 $3,347.10 	 $5,347.10 4rd 	 $2,000.00 	 $1,773.84 	 $3,773.84 5th 	 $2,000.00 	 $-  	 $-

--Patchouli 22:30, 13 July 2006 (UTC)


 * Yes, this looks accurate. I made a mistake in my numbers because I was using the Windows Calculator, which doesn't have an 'e' function, so I was using the inverse of the natural log, but hit the wrong key. &mdash;Bradley 23:14, 13 July 2006 (UTC)

This is from a first-year calculus book and there shouldn't be any regard for inflation — it isn't a complicated corporate finance problem. I know that inflation is like a negative interest, but I we wanted to take inflation into account in this problem, we would really get bogged down. The author has no similar problems and I presume that he is trying to throw a monkey wrench into the works.--Patchouli 22:35, 13 July 2006 (UTC)


 * Ah, a calculus book would be just the place to find continuous compounding. An interest rate of 12% per year means that if the initial amount is A, then compounding once per year would increase it to A(1+R), where R = 0.12. Compounding twice a year means instead A(1+$R⁄2$)(1+$R⁄2$); compounding quarterly means A(1+$R⁄4$)4; and compounding monthly means A(1+$R⁄12$)12. So compounding continously means taking the limit as n goes to infinity of A(1+$R⁄n$)n. This should look familiar. --KSmrqT 23:12, 13 July 2006 (UTC)


 * I used it in 2000e0.12*5=$3,644.24, which was of no help.--Patchouli 23:20, 13 July 2006 (UTC)
 * Ksmrq, you mean $$\lim_{n\rightarrow\infty} A(1+\frac Rn)^n=Ae^R$$, right? And Patchouli, what you've calculated in this last line is just the value of $2000 invested for 5 years.  It's not what your problem was, although I believe you can arrive at the correct answer by thinking about constructing the trust fund instead of depleting it: you get $2000 invested (backwards, so negative interest) for 4 years, then another for 3, 2, 1, and 0.  (Yet another way of saying this is to consider the present value of each payment separately, depreciated by the time from now until you get it.)  I get $7077.64; after one year's interest that will rise to your $7980.02 number.  You'll have to decide whether there are 5 payments, with the first one made immediately (thus spanning but four years), or whether there's five years, with a payment made at the end of each one.  (Of course, there could also be a payment made at the beginning of the first year, but I think it's obvious that 5 payments are meant.)  There's also the possibility that the $2000/yr was supposed to be a continuous payment; then I get $7519.81 as the initial value required (integration required here).  --Tardis 15:30, 14 July 2006 (UTC)
 * Actually, Patchouli edited what I said and screwed it up! I have changed it back. It's bad enough that I sometimes make mistakes of my own; I don't need other people making them for me. I deliberately did not suggest what the limit should be, and will neither confirm nor deny guesses. I don't post homework solutions. --KSmrqT 20:50, 14 July 2006 (UTC)

Present Value & Compound Interest
This is my last problem.

A baseball player signs a salary contract whereby he receives a sum that increases continuously and linearly from a starting salary of $1,000,000 a year and reaches $3,000,000 a year after 4 years. Thus his salary after t years (in millions of dollars) is f(t) = 1 + t/2. Find the present value of the contract assuming an interest rate of 8% per year compounded continously.

I am sure that there is no inflation involved. The answer is $4.72 million.--Patchouli 22:45, 13 July 2006 (UTC)


 * My book has no formula, is there one?--Patchouli 22:49, 13 July 2006 (UTC)


 * That doesn't seem right. Ignoring interest, 1m + 1.5m + 2m + 2.5m = 7m. 4.72m + 8% over 4 years is only 6.5m. Otherwise, I would say to just write out the numbers at the beginning of each year like the previous problem. &mdash;Bradley 23:24, 13 July 2006 (UTC)


 * And you never reached 3m. I think the author wasn't sober while creating these two problems.--Patchouli 23:36, 13 July 2006 (UTC)


 * If we assume the $1 million salary is considered to be the "year zero" pay, then we get:

Year | Salary -+-- 0   | $1.0 million 1  | $1.5 million 2  | $2.0 million 3  | $2.5 million 4  | $3.0 million +-      $10.0 million


 * I agree that $4.72 million isn't going to get there at 8%, however. StuRat 00:20, 14 July 2006 (UTC)


 * I don't think you're understanding the problem completely. The fact that the salary reaches $3M after 4 years doesn't imply that that's the time interval for the problem; it just sets the rate of increase.  Moreover, it says that the salary increases continuously, so it's not "one year at $1M", etc.  Note that money dm paid a time t from now has a present value (using continuously compounded interest) of $$e^{-pt}dm$$, where p is the interest rate (here, 0.08/yr).  Since at time t, our lucky baseball player is paid $$dm=f(t)dt=(\$1{\mathrm M/yr}+(\$500\mathrm{k/yr^2})t)dt$$, the present value at that time is $$(\$1{\mathrm M/yr}+(\$500\mathrm{k/yr^2})t)e^{-0.08t/\mathrm{yr}}dt$$, which you now want to integrate over all time (since the contract is of indefinite duration even if the player is not).  Unfortunately, I find that the present value reaches $4.72M after only 3.067 years.  To make the value over all time that small a multiple of the base yearly salary, you'd need a 44.8% interest rate(!), although for 4 years it'd be "just" 24.2%.  Maybe someone can correct my math or economics in some way; I feel like this is what the problem is supposed to be... --Tardis 15:06, 14 July 2006 (UTC)


 * For this continuous annuity, I have the following present value

$$PV=\int_{0}^{4}(1+t/2)\times e^{-0.08t}\, dt \approx 6.66 million.$$ I know that this isn't the book's answer.--Patchouli 16:06, 14 July 2006 (UTC)

Polynomial fields
Hi.

I hope it is the right place. I've got a little question about Polynomial fields I hope you'll help me solve.

Is it correct that F/q(x) is isomorphic to F/q1(x) * F/q2(x) assuming q=q1*q2, that all three are polynomials in F[x], and that these two  are coprime?

It sounds Correct, and I tried proving it using the first isomorphism theorem, but got into some trouble proving that the imaeg of the homomorphism I built was F/q1(x) * F/q2(x). Can you guide me there? Thanks a bunch! 80.178.190.139 20:44, 13 July 2006 (UTC)
 * Another thing I forgot to mention is that both q1 and q2 are Irreducible, so F/q1(x),F/q2(x) are both Fields. 80.178.190.139 20:47, 13 July 2006 (UTC)


 * I might be a little out of my depth here, but I'll try to help anyway. F/q(x) is not a field, because q is reducible, so are you trying to prove they're isomorphic as groups or as rings or what? —Keenan Pepper 20:59, 13 July 2006 (UTC)
 * Frankly, I didn't think of that. That has to mean that two fields multiplied are not neccesarily a field as well, I guess... (If that isomorphism is true)
 * However, I wanted to prove that they are isomorphic as rings. 80.178.190.139 21:05, 13 July 2006 (UTC)


 * Right, the direct product of two fields, considered as rings, is never itself a field. I think the tensor product of fields is the most general product that is guaranteed to produce a field. —Keenan Pepper 21:10, 13 July 2006 (UTC)


 * Okay, so you have a homomorphism F/q(x) &rarr; F/q1(x) &times; F/q2(x). You have to show that the kernel of the homomorphism contains only the zero element of F/q(x), and that proves they're isomorphic by the first isomorphism theorem. Right? —Keenan Pepper 21:21, 13 July 2006 (UTC)
 * And that its image is F/q1(x) &times; F/q2(x). That's the part I didn't do yet. (My homomorphism is the one which gives for every poly' in F/q(x) its remainder when divised by q1, and the one when divised by q2. (I did find the kernel of the homo' and proved that that function is a homo', though) 80.178.190.139 21:25, 13 July 2006 (UTC)
 * Oh right. That the kernel is only the zero element proves that it's injective, but you also have to show that it's surjective. I think this is the part where q1 and q2 being coprime comes in. Is that enough of a hint? —Keenan Pepper 21:34, 13 July 2006 (UTC)
 * Bigger hint: Chinese remainder theorem. —Keenan Pepper 21:48, 13 July 2006 (UTC)
 * Thanks man. Yeah, that's it.

Can I retrieve information from a computer in another town if I am not somehow networked to it?
I work two hours away from my home. The inventory and prices are on a computer there. I need a cost on a certain house. Is it possible, if it is capable of getting on-line, for me to retrieve this information from my home? If so, how or can you point me in the right direction?---


 * If you mean in general, there are a variety of ways, like forwarding ports on your home router (assuming you're firewalled at home) and using VNC, pcAnywhere or some other remote control software. If you mean right now, without driving home to set anything up, I seriously doubt it. grendel|khan 23:51, 13 July 2006 (UTC)


 * If you're using windows I strongly encourage you to use the built in (and free) tool "Remote Desktop Connection" (available in all programs > acessories > communication) which you can turn on from the control panel. Once you've done this, make sure that port 3389 is forwarded to your computer, and you will be able to connect using your home IP adress. If you're using linux then I reccommend SSH (available in most package managers) which uses port 22. Both of these will allow you to connect remotely if you have sufficient hardware. You can access SSH from a linux machine or a windows machine using PuTTY (which is available for free online.) Good luck! 48v 06:33, 14 July 2006 (UTC)

Java question: Constructing a TreeModelEvent to be fed to TreeModelListener.treeNodesInserted.
I'm working with a small Swing application involving a JTree backed by a custom TreeModel. The TreeModel will only add nodes during its lifetime. I want to trigger the treeNodesInserted signal; it takes a TreeModelEvent as an argument.

The TreeModelEvent class has four constructors; as I'm doing more than just specifying that a subtree has changed, I'm going to use one of the four-argument constructors, which takes as its third and fourth arguments int[] childIndices, and Object[] children.

Here's where I'm stumped: the constructor documentation tells me that childIndices is filled with the indices of the newly inserted nodes. However, when I do this, I get a NullPointerException. If I leave it empty, I get no such segfault. Why is this happening?

(Calling treeStructureChanged on an event created without the childIndices and children arguments works as expected, but I want more fine-grained control--I'm adding nodes at a slow rate; while one level is still expanding, I want to be able to expand one of its child nodes, and if I use treeStructureChanged, the JTree won't let me expand a node until all of its siblings are present. (The nodes are present in the model; I just can't expand the graphics.)) grendel|khan 23:29, 13 July 2006 (UTC)
 * Most likely you are calling a TreeListener's treeNodesInserted method before the inserted nodes are reflected in your custom TreeModel.EricR 23:57, 13 July 2006 (UTC)


 * No, I'm not. The process I have is as follows: because of lazy loading, the whole process is started when data about a node's child is requested. This calls, which spawns a   thread, which in its   method first adds the the child node to the model, then acquires the object corresponding to the outer   and calls  , which, in turn, calls   for all registered  s; I've registered the extended   as one of them. As I said, it all works when I use the two-argument constructor for my   and call   instead. grendel|khan 00:26, 14 July 2006 (UTC)


 * Then my only other thought is that you are not building the correct TreePath, pointing to a node other that the one to which the children were added. It's hard to tell w/o seeing code and a stack trace.EricR 16:18, 14 July 2006 (UTC)


 * Okay, I uncommented out the code that I had commented to go back to using, and made what I thought were some cosmetic modifications, and now it works. Whiskey Tango Foxtrot?! I hate this sort of thing; I'll probably never figure out what I did wrong. But at least it worked. grendel|khan 00:22, 15 July 2006 (UTC)