What is the proof, that $d(x,y) = \sum_{n=0}^{\infty} \frac{1}{2^n}\frac{d_n(x_n,y_n)}{1+d_n(x_n,y_n)}$ is a metric? Where $x=(x_1,x_2,\cdots)$ , $y=(y_1,y_2,\cdots)$ and $d_n$ is a metric for $X_n$. How does one prove the triangle inequality?
I have to prove that this is a metric: $$d(x,y):=\sum_{i=0}^\infty \frac{|x_i -y_i|}{2^i (1+|x_i-y_i|)}$$  The only thing that I can't prove is the triangle inequality, it's really hard. I know that $|x_i -y_i|\le |x_i -z_i|+|z_i -y_i|$, and I want to get: $$\frac{1}{2^i (1+|x_i-y_i|)} \le \frac{1}{2^i (1+|x_i-z_i|)}+\frac{1}{2^i (1+|z_i-y_i|)}$$ (I think...) The closest thing I've got is: $2^i (1+|x_i-y_i|)\le 2^i (1+|x_i-z_i|)+2^i (1+|z_i-y_i|)$ but... that's not quite what i want. I don't know how to get this...
Proving $(P(AB))^2+(P(AB^c))^2+(P(A^cB))^2+(P(A^cB^c))^2\ge\frac{1}{4}$ for any events $A$ and $B$ Show that for any two events $A$ and $B$, $$(P(AB))^2+(P(AB^c))^2+(P(A^cB))^2+(P(A^cB^c))^2\ge\frac{1}{4}$$   Using the Inclusion-Exclusion formula, De Morgan's law and $P(AB^c)=P(A)-P(AB)$, I was able to expand the $\rm{l.h.s.}$ as $$(x+y)(x+y-4z)+2z(2z+1)+x(x-2)+y(y-2)+1\quad...\quad(*),$$ where $x=P(A),y=P(B)$ and $z=P(AB)$.  However I'm not being able to group the terms involved in the $\rm{l.h.s.}$ to form a 'suitable' expression and probably the way I have grouped them is not correct.  The expression $(*)$ is subject to the condition   $\max\{0,x+y-1\}\le z\le \min\{x,y\}$ and obviously $0\le x,y,z\le 1$, but I am unable to use this.      Is there an elegant/slick way to show the inequality? It probably can be shown without a lot of work and it's possible I'm missing something trivial here. What do the .eh_frame and .eh_frame_hdr sections store, exactly? Objects not rotating with each other (Rubik's cube) $\bigodot=?$ for $(\sqrt 2) ^ \sqrt 3 \bigodot (\sqrt 3) ^ \sqrt 2$ where $\bigodot is \lt or \gt$ $\bigodot=?$ $(\sqrt 2) ^ \sqrt 3 \bigodot  (\sqrt 3) ^ \sqrt 2$  where $\bigodot is either \lt or \gt$   In other words, which one is larger $(\sqrt 2) ^ \sqrt 3$ or $(\sqrt 3) ^ \sqrt 2$? The best I could do was ending up with $\sqrt \frac {3}{ 2} = \frac {\ln 3}{\ln 2}$  side question : is there a symbol like encircled $?$ for when what we are trying to find is the correct order symbol like one of $\lt,\leq,=,\geq , \gt $ ?  Hopefully using just juxtopisition of symbols without resorting to real analysis. is it possible to do with precalculs algebra? I haven't used regular expressions at all, so I'm having difficulty troubleshooting. I want the regex to match only when the contained string is all numbers; but with the two examples below it is matching a string that contains all numbers plus an equals sign like "1234=4321". I'm sure there's a way to change this behavior, but as I said, I've never really done much with regular expressions.  string compare = "1234=4321"; Regex regex = new Regex(@"[\d]");  if (regex.IsMatch(compare)) {      //true }  regex = new Regex("[0-9]");  if (regex.IsMatch(compare)) {      //true }   In case it matters, I'm using C# and .NET2.0. How Conditional Random Fields and Logistic Regression could be the same? If you have read  tutorial about CRF, on page 4 under the section Classification, it wants to relate CRF to Logistic Regression (or Maximum Entropy, as it is known by this name in NLP community).   The formulation of Logistic Regression is said to be  $ p(y|x) = \frac{1}{Z(X)}exp \{ \lambda_y + \sum_{j=1}^{K}\lambda_{y,j}x_{j}\} $.  On the other hand, on the Wikipedia  for logistic regression, the formulation is  $ f(t) = \frac{1}{1+e^{-t}} $  and the classifier's formulation is the explanation of this formulation which is derived from Logistic Function.  My question is, first, how Logistic Regression and Maximum Entropy Classifier are related to each other and are identical?   Second, the CRF tutorial says Logistic Regression (or Maximum Entropy Classifier) is simple CRF model, how? Give a combinatorial proof to show the following for all integers $n \geq 2$. $$2^{n-2} n (n -1) = \sum\limits_{k=2}^n k (k - 1) \binom{n}{k}.$$  I'm completely stumped. I just have no idea how to do this. What I've tried so far has been simplifying the right hand side slightly to $\sum\limits_{k=2}^n \binom{n}{k - 2}$, and then proving that this somehow is equal to some manipulation of the left hand side. I can't seem to find any breakthroughs that way though.  If anyone could help out or point me in the right direction that would be great.  EDIT: I've actually just realized my simplification of the right hand side is wrong. Now I'm even more stuck. Accessing bash command line args $@ vs $* LaTeX/BibTex not arranging citations by order of appearance I am having an issue with LaTex/Bibtex presenting my citations in order of appearance. I know there a plenty of questions on this and I have read some of them, but the solutions posted don't seem to do me any good. I am using MacTeX and TeXmaker.  I am writing a large document, like a Thesis. Chapters are split between individual Tex files and included using the \include command.  I have a large .bib file that is maintained by Mendeley (program I use for storing my references and producing a BibTex file).  I am using the package, cite (mainly for doing references like [1-3,6,9])  I have a pretty standard looking document.  \documentclass[11pt,a4paper]{report} \setcounter{secnumdepth}{3} \setcounter{tocdepth}{3} \newcommand{\doubleSignature}[3][Alex Mason]{% \parbox{\textwidth}{ \centering #3 \today\\ \vspace{2cm}  \parbox{7cm}{   \centering   \rule{6cm}{1pt}\\    #1  } \hfill \parbox{7cm}{   \centering   \rule{6cm}{1pt}\\   #2 } } } \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} %\usepackage[sorting=none]{biblatex} %\bibliography{Alex} % Where journals.bib and phd-references.bi \usepackage[pdftex]{graphicx} \usepackage{enumerate} \usepackage{nomencl} \usepackage{wasysym} \usepackage{booktabs} \usepackage{cite} \usepackage[left=1in,right=1in,top=1in,bottom=1in]{geometry} \graphicspath{{./Diagrams/}} \usepackage[labelfont={sf,bf}, margin=1cm]{caption} \usepackage{subcaption} \renewcommand{\figurename}{Fig.} \renewcommand{\tablename}{Tab.} \renewcommand{\bibname}{References} \author{NAME (MEng)} \title{TITLE} \date{\today} \makenomenclature %------------------------------------------------ \begin{document} \maketitle \pagenumbering{roman} %-----------------------------------------------certificate of originality----------------      -------------------------------------------- \input{CertofOrigin} \begin{abstract} ABSTRACT \end{abstract} %-----------------------------------------------contents------------------------------------------------------------ \tableofcontents \listoffigures \addcontentsline{toc}{chapter}{List of Figures} \listoftables \addcontentsline{toc}{chapter}{List of Tables} \chapter*{Acknowledgements} \addcontentsline{toc}{chapter}{Acknowledgements} ACKNOWLEDGEMENTS \printnomenclature[1.5in] \addcontentsline{toc}{chapter}{Nomenclature} \pagebreak \pagenumbering{arabic} \include{2ndYearReport_CHAP1} \include{2ndYearReport_CHAP2} \include{2ndYearReport_CHAP3} \bibliographystyle{unsrt} \bibliography{Alex} %\printbibliography \end{document}   The goofy looking part at the top (\newcommand{doubleSig.....) is just for when i input a special page I made containing a certificate of originality spiel with two boxes for signatures and my university logo.  As you can see I am using the standard bibtex way of doing bibliographies by stating the style then the stating the bib file to use right at the end of the document. I have tried biblatex but can't get it to work. It says it hasn't produced the bib file but doesn't really state why.  As far as I am aware everything was working A-OK until I started on the second chapter and began adding citations in there. Now my citations are all messed up and won't correct. My first citation starts with [9]!!!  [1] appears in a figure caption later down the page, after 10, 11 and 12 have been called!  I have tried deleting all the working files (bbl, aux, log etc) but nothing happens. I get the same result. IIRC I used to have this problem with MS Word and is part of the reason why I switched to LaTex...yet it seems to have followed me!   bibtex does through a few warnings when it runs stating that some references are missing journal names or volume numbers. Would that be a reason?  What have I done wrong with my code? Let $(x_n)$ be a sequence of real numbers.  Prove that if there exists $x$ such that every subsequence $(x_{n_k})$ of $(x_n)$ has a convergent (sub-)subsequence $(x_{n_{k_l}})$ to $x$, then the original sequence $(x_n)$ itself converges to $x$ .              Thanks for any help. Two seasonal periods in ARIMA using R I'm currently using R to predict a time series with these instructions:  X &lt;- ts(datas, frequency=24) X.arima &lt;- Arima(X, order=c(2,1,0), seasonal=c(1,1,1)) pred &lt;- predict(X.arima, n.ahead=24) plot.ts(pred$pred)   As you can see I've data each hour, and I chose the seasonal period of 24 (one day).  I would like to improve my forecasting using an additional seasonal period in order to include the seasonal component of the week (seasonal length of 7*24=168 data)  Is there any method for this? How do you do it?  UPDATE: I've read  (your) blog page, maybe can I use the external regressors to simulate a second seasonal period? sql server linked server to oracle returns no data found when data exists Lets say I have a function defined as $f(x) = \sqrt {x^2}$. Common knowledge of square roots tells you to simplify to $f(x) = x$ (we'll call that $g(x)$) which may be the same problem, but it isn't the same equation. For example, say I put $-1$ into them:  $\begin{align} f(x) &amp;= \sqrt {x^2} \\ f(-1) &amp;= \sqrt {(-1)^2} \\ f(-1) &amp;= \sqrt {1} \\ f(-1) &amp;= 1 \end{align}$  $\begin{align} g(x) &amp;= x \\ g(-1) &amp;= -1 \end{align}$  thereby, we conclude that $f(x)$ and $g(x)$ do not produce the same results even though they are mathematically the same. This is also shown when we try to graph the functions:  :    :    :    From this, we can see that given $f(x) = \sqrt {x^2}$, when simplified is not the same as $f(x) = x$. So, is there any way to prove that $y = \sqrt {x^2}$ is not the same as $y = x$ for negative values, but is infact the same as $y = \mid x \mid$? siunitx tabular numbers with separated uncertainty I would like to format the space reserved for a number shown in a table with separated uncertainty. It seems that when I use the table-format option the brackets around the mantissa disappear. This is illustrated in the example below:  \documentclass{article}     \usepackage{siunitx}  \begin{document}     \begin{table}   \begin{tabular}{                   S[separate-uncertainty = true]                   S[table-format=1.1(1)e1,                   separate-uncertainty = true]                   }     {Header} &amp; {Header}\\     1.0(2)e2 &amp; 1.0(2)e2\\   \end{tabular} \end{table}     \end{document}     I have also tried to use the bracket-numbers and multi-part-units = brackets without solving this issue. Is there any workaround to center the number and keep the brackets like in the first column of the example? How to know what program is listening on a given port? I suspect a program is listening on port 8000 on my machine.  When I run the following command, I get this error:  &gt; python -m SimpleHTTPServer # Lots of python error socket.error: [Errno 98] Address already in use   If I use another port (8000 is the default), the web server runs fine.  If I run wget localhost:8000 from the command line, it returns 404 Not Found.  What can I do (or what tools are available) to find what program is listening on port 8000, and from there where that program is configured? I am interested in theoretical and practical considerations. We use unit length Quaternion to represent rotations. Following is a general rotation matrix obtained ${\begin{bmatrix}m_{00} &amp; m_{01}&amp;m_{02} \\ m_{10} &amp; m_{11}&amp;m_{12}\\  m_{20} &amp; m_{21}&amp;m_{22}\end{bmatrix}}_{3\times 3}\tag 1 $.   How do I accurately calculate quaternion $q = q_1i+q_2j+q_3k+q_4$for this matrix?Means   how can we write $q_i$s interms of given $m_{ij}$  accurately? Possible Duplicate:          This is a line spoken by the . I always wondered if this is grammatically correct.  Luke says something like "You are mistaken ..." which the Emperor answers with     No, it is you who are mistaken!   Why wouldn't he say     No, it is you who is mistaken!   instead?  I don't know what rules apply here but my stomach tells me the latter is (at least also) correct, although you would say "you are mistaken". It feels as if he should be referring to "you" in the third person.  Could you please shed some light? Are both correct or – if not – which one is correct? And why? Basic Electronics Book I need basic electronics books  (diodes,transistors,current.. etc) as I am just starting out with electronics and want to have something to read over the holiday.  Any suggestions of good beginners' books? List of Stored Procedure from Table I have a huge database with 100's of tables and stored procedures. Using SQL Server 2005, how can I get a list of stored procedures that are doing an insert or update operation on a given table.