Bolzano-Weierstrass Property

Theorem 4.21 (Bolzano-Weierstrass Property) A set of real numbers \mathrm{E} is closed and bounded if and only if every sequence of points chosen from the set has a subsequence that converges to a point that belongs to \mathrm{E}.

Proof Suppose that \mathrm{E} is both closed and bounded and let \mathrm{\{x_n\}} be a sequence of points chosen from \mathrm{E}. Since \mathrm{E} is bounded this sequence \mathrm{\{x_n\}} must be bounded too. We apply the Bolzano-Weierstrass theorem for sequences (Theorem 2.40) to obtain a subsequence \mathrm{\{x_{n_k}\}} that converges. If \mathrm{x_{n_k}\rightarrow z} then since all the points of the subsequence \mathrm{\{x_{n_k}\}} belong to \mathrm{E} either the sequence is constant after some term or else \mathrm{z} is a point of accumulation of \mathrm{E}. In either case we see that \mathrm{z \in E}. This proves the theorem in one direction.

Advertisements

Hello world!

/* Welcome to WordPress.com.
This is your first post.
Edit or delete it and start blogging! */

include <iostream>
main()
{
cout << “hello world!” << endl;
return 0;
}

Riemann or Lebesgue integration

Excerpt from Martin Davis and Matt Insall, “Mathematics and Design: Yes, But Will it Fly?”, Nexus Network Journal, vol. 4, no. 4 (Autumn 2002).

At 06:39 AM 8/26/2002, Matt Insall wrote:

Personally, I think it is likely to make a difference whether Riemann or Lebesgue integration is used, but that the difference will only be noticeable provided that the designers rigorously adhere to the requirements that that particular integration theory be used for all the integrals. As soon as they revert to numerical approximations, instead of using calculus or analysis, they have muddied the waters so that no direct comparison between one integration theory and another can be made.

This is with reference to Hamming’s quip about this difference not being significant for engineering design.

Functions that are Riemann integrable are automatically Lebesgue integrable and the values of the integrals will be the same. There are two ways in which a function can be Lebesgue integrable but not Riemann integrable. Any bounded measurable function is L-integrable, but not all of them are R-integrable. Some unbounded measurable functions are also L-integrable, but not Riemann integrable, since all R-integrable functions are bounded. An example: the function 1/sqrt(x) has the L-integral 2/3 on the interval [0,1]. Being unbounded in that interval, it has no R-integral there.

Of course, this function does have an “improper integral” (sometimes called a Riemann-Cauchy integral) in that interval with the very same value. Only functions having absolutely convergent improper integrals have Lebesgue integrals. The classical example is sinx/x on the interval [0,\infnty] which has the value \pi/2 but no Lebesgue integral. This fact is sometimes confusingly stated as a case where something is R-integrable but not L-integrable. But one can perfectly well define “improper”
L-integrals, so that this comparison is inappropriate. It’s just that the definition of L-integration automatically includes cases that in the Riemann case require this extra limiting step for which the inappropriate term “improper” is used.

Hamming of course hadn’t meant to be taken so literally. His aphorism was intended to say that the fine points of mathematical analysis are not relevant to engineering considerations. And, he was perfectly right.

In the long-ago days when I had occasion to be on committees administering an oral qualifying exam for the doctorate, I would often ask the hapless student why analysts prefer the L-integral. This was a trap question: students who fell for the trap would tell me that the function on [0,1] that is 1 on the irrationals and 0 on the rationals is L-integrable, but not R-integrable. The right answer is that the L-integral has useful convergence properties not enjoyed by the R-integral.

Now whatever did Mat Insall have in mind? sin x/x on [0,infty]? Surely not in any engineering analysis.

Terminal, Console, and Shell

After searching the internet for quite some time I finally had some sense of the relationship among terminal, console and shell.

1. Terminal

Real text terminal: Includes only a screen (NOT TO BE CALLED “MONITOR” AS FOR TODAY’S COMPUTER), keyboard, and a small memory to store a screenfull text (ONLY A FEW KILOBYTES). Keyboard is plugged to screen, which is further wired to the serial port of computer with a long cable.

Terminal emulation: An emulated real text terminal created by computer software and classfied as virtual terminal and pseudo terminal.

Virtual terminal or console: The command line interface seen after the boot of Linux system. By default, seven virtual terminals are available and can be switched using [CTRL]+[Fn] (n: 1-7). The 7th virtual terminal is reserved for X-windows system and the rest are for textual Shells.

Pseudo terminal: A pseudo-device pair that provides a text terminal interface without associated virtual console, computer terminal or serial port hardware. Its applications include terminal emulator and remote login handler.

Terminal emulator: Xterm, Konsole and alike on X windows systems, which serve as master device (/dev/ptmx) while Shell serves as slave device(/dev/pts/N)

Remote login handler: SSH and Telnet, which serve as master device (/dev/ptmx) while Shell serves as slave device(/dev/pts/N).

2. Console: The monitor and keyboard on today’s computers or the real text terminal on old time computers.

3. Shell: A utility program resides on hard disk, by default the first program to start after a user log onto the system, and classfied as login shell, interactive shell and conventional shell.

Interactive, login shell: The shell reads these files in sequence: (system wide) /etc/profile; (per user) ~/.bash_profile; ~/.bash_login; ~/.profile; (when logout) ~/.bash_logout.

Interactive, non-login shell: The shell reads these files in sequence: (per user) ~/.bashrc; (when exit) ~/.bash_logout.

Non-interactive, login shell: The shell reads these files in sequence: (system wide) /etc/profile; (per user) ~/.profile; (when logout) ~/.bash_logout.

Non-interactive, non-login shell: The shell starts by executing $BASH_ENV and exits with reading ~/.bash_logout.

4. Login Process: For wired connection, init-> getty -> login-> first program to run, usually Shell; for network connections, init -> sshd, telnetd, or rlogind -> login -> first program to run, usually Shell.

References:

1. Text Terminal HOW-TO
2. Pseudo Terminal Master/Slave
3. What is Unix Shell?
4. How Environment Variables Really Work?

MiKTeX’s Secret: Local Package Repository

The error in the installation of LaTeX packages from a local package repository on MiKTeX might be:

“…. does not seem to be a local package repository”.

The problem can be solved by downloading “readme.txt”, “miktex-zzdb1.cab”, and “miktex-zzdb2.cab” into the folder that contains the LaTeX packages you wish to install.

When you install printer drivers

When you install printer drivers please don’t forget to log on as administrator. Otherwise, you probably would see warning messages such as “Error Tag = AddPrinterDriver(0)”, “The Specified Module Can’t Be Found”, “Operation Not Allowed” and so on and most likely can’t find a solution through Google and Yahoo.

向爱情敬礼

这一天,
放下所有的挂念,
开始新的旅程!
再见了,
曾经的爱情,
我将不再回来!

Linux Commands (Day 1)

(1) Change file permissions

chmod 644 filename ## assign the file read/write by the owner and only read by everyone else (-rw-r–r–).

chmod -R 644 foldername ## assign all the files in the folder read/write by the owner and only read by everyone else (-rw-r–r–).

r:
400 read by owner
040 read by group
004 read by anybody (other)

w:
200 write by owner
020 write by group
002 write by anybody

x:
100 execute by owner
010 execute by group
001 execute by anybody

(2) Secure copy files between Linux hosts

scp user@remote-computer:/remote-path/remote-file /local-path/local-file ## copy a file from a remote computer to the computer you are working at.

scp -r user@remote-computer:/remote-path/remote-directory /local-path/local-directory ## copy a folder from a remote computer to the computer you are working at.

scp /local-path/local-file user@remote-computer:/remote-path/remote-file ## copy a file from the computer you are working at to a remote computer.

scp -r /local-path/local-directory user@remote-computer:/remote-path/remote-directory ## copy a file from the computer you are working at to a remote computer.

(3) Control jobs

jobs ## list jobs.
%1 ## resume the first stopped job.
fg %1 ## resume the first stopped job.
%1 & ## put the first stopped job into background.
bg %1 ## put the first stopped job into background.
kill %1 ## terminate the first stopped job.
nohup myjob.sh & ## run myjob.sh in the background as a process detached from the console and send output to nohup.out by default.
script…exit ## start a new shell and log all the output into the file called typescript.

(4) Capture outputs

(((./cmd | tee stdout.txt) 3>&1 1>&2 2>&3 | tee stderr.txt) 3>&1 1>&2 2>&3) 1>out.txt 2>err.txt ## see explanation at http://www.cpqlinux.com/redirect.html.

(5) Emacs tutorial

移动硬盘的科普

如果在选购移动硬盘时被店员问及需要的是串口还是并口?请跟他好好说,谢谢,我只是看看,然后掉头就走,不要浪费时间!以下是为什么:

移动硬盘就是外置硬盘,不是接在电脑机箱内部的那种。请记住:移动硬盘 = 硬盘 + 硬盘盒,硬盘通过电源线和数据线连接在硬盘盒内,装有硬盘的硬盘盒再通过电源线和数据线连接在电脑上。所以,选购移动硬盘要考虑硬盘盒内有是否有对应硬盘接口的数据线,以及硬盘盒外和电脑上是否是否有相对应的接口。

(0)数据线及其接口的不同反映了数据传输速度的不同。

(1)硬盘盒内的数据线对应于硬盘的数据接口,硬盘的数据接口有分IDE,SCSI,和SATA,相应的硬盘也叫做IDE,SCSI,和SATA硬盘。

IDE又叫做Parallel ATA,SATA则是Serial ATA的简写,中文翻译过来前者叫并行ATA,后者叫串行ATA,这和什么“串口”和“并口”完全是两码事!“串口”和“并口”英文翻译过来叫Serial PortParallel Port,他们的数据传输速度非常的低,是绝对不会用在硬盘上的!

如果选购Serial ATA硬盘,请注意它的价格要贵一点!如果选购IDE硬盘,记得区分下面几种规格。由上而下,它们代表了传输速率的增加!
ATA-1
ATA-2
ATA-3
ATA-4
Ultra ATA/33
Ultra ATA/66
Ultra ATA/100
Ultra ATA/133

此外还得区分硬盘转速的不同,转速高当然就好些:
5400rpm
7200rpm

以及硬盘的尺寸,3.5“是台式机使用的那种硬盘,2.5″是笔记本电脑使用的那种硬盘:
5.25 inches
3.5 inches
2.5 inches

(2) 硬盘盒外的数据接口可以是USB、IEEE1394、eSATA,最常用的是USB 2.0,其他的应用都比较受限制。

(3)硬盘盒的尺寸是根据所装东西的大小来定义的,5.25”是用来装光驱的,2.5“是用来装笔记本那种硬盘的,3.5“是用来装台式机的那种硬盘。硬盘盒有分铝或者金属外壳和塑料外壳,前者散热比较好,如果还有个小风扇就更好了。当然,要试试看外置盒运转起来是否噪音比较小!

现在应该明白为什么那个店员值得鄙视了吧,别总以为老百姓可以糊弄,考古挖坑是个人都会!这次你可找到他直接明白的说:

我想买一个移动硬盘,要7200转的IDE Ultra ATA/133或者Serial ATA硬盘,外置盒是USB 2.0接口,3.5 inches大,散热好,噪音小,请问有什么选择没有?

他要是听不明白,请跟他说,你去旁边帮我问问,别串口并口的,呵呵!

下面是考古的帖子:

硬盘传输接口

硬盘盒

The official external ENCLOSURE thread

The Break Up Song

Here you can see the wonderful Ukulele!

Lyrics

dont think about the times we have to try to make things last,
dont think about the times when we first kissed you say we wouldnt race to fast,
dont think about the times we have to try to make things right,
cause you and i both know we always get into little fights,
cause love is not the best thing for us now,
its not the best thing for us now,
so im a break it off with you somehow,

the stars would shine for you another day, another day,
so im a try nd love you some other day,
im know im not in need for love,
for love, for love, for love,
my heartache should have been enough for you,
just get on with your life, your life, she say,
wanna be my wife, i say,
gotta make you right before
i get back on my feet, my feet,
get back on my feet,

cause love is not the best thing for us now,
its not the best thing for us now,
so im a break it off with you some how,
the stars would shine for you another day, another day,
so im a try and love you some other way,

dont think about us breakin up
think about you and me makin love
n’ think about the lord above
n’ thank him for the gift of love
you and i we gotta split apart
n’ take a wrong journey through the dark
n’ nows the time you got to be strong
just make sure your love carries on