text:
## Question Authors' Forum

### Hiding green/red notification of correctness

by Carroll Morgan -
Number of replies: 6

I'm intending to run custom quizzes where collaboration is a risk, and so I will be controlling how much information is returned to students by pre-check, by check and by submit. (See "Passing information over a CHECK" below.)

In particular, an "all green" result would so-to-speak give the game away, because that student could pass guaranteed-correct answers to others who are still at work..

Can I prevent the green indication (caused I think by fraction=1.0)? A hack would be to cap fraction at say .99, and adjust externally the mark. But I would rather a cleaner way.

### Re: Hiding green/red notification of correctness

by Carroll Morgan -
Answer: Set "showresultsonly" to true. Then the background is grey, but the prologue and epilogue still appear (which is what I need). So consider this "answered" please, unless I am mistaken above.

BTW I had a test run just now with our local (UNSW) people of Richard's error-reporting patch that fixes the exception-reporting problem I was having earlier (where every error in the grading process simply said effectively "error"). It's now (in the UNSW testbed) giving more detailed error reports. Thanks for that! It will go live here next time they update Moodle.

### Re: Hiding green/red notification of correctness

by Richard Lobb -
Ah, good. I was going to suggest "showresultsonly" - you saved me some typing and discussion. And good to know that the fix to the combinator-grader error worked, too. FYI: the latest version of CodeRunner now includes your suggested "graderstate" functionality.

### Re: Hiding green/red notification of correctness

by Carroll Morgan -
Hi Richard, returning to this question... I have only just now noticed that pressing CHECK returns not only "correct" or "partially correct" but also the current marks. Ideally (as we discussed earlier) I would try to prevent any information about marks being returned --- and I proposed a work-around of multiplying by .99.

My questions comprise many individual items, each marked separately. Those separate marks are summed to give the total mark for the question. And --I now realise-- the "total marks as you go" can allow the students to try the items one at a time, moving on to the next only when the "current mark" increases.

Is there something I can do to prevent that?

### Re: Hiding green/red notification of correctness

by Tim Hunt -

The quiz has options for all the different aspects of the question which you might, or might not, want displayed.

$options->marks is for whether to display any sort of numerical mark information.$options->correctnes is for whether to display anything red/green tick/cross like.

So, first make sure you ahve set up your quiz with options that correspond to the behaviour you want to see.

Then, if CodeRunner does not respect that, it is a bug in the CodeRunner renderer which would need ot be fixed. (Which might be easy in some cases, but tricky with complex template graders.)

### Re: Hiding green/red notification of correctness

by Richard Lobb -
Interesting point, Tim. I don't check the $options->correctness setting. But the question is: what to do with the result table if correctness is not being shown? Simply hiding the ticks and crosses isn't very meaningful as the expected and got columns tell the same story, only more tediously. I don't see a lot of point in displaying just the test and the expected columns. The only thing that would seem to make sense is to hide the result table altogether. Which for most coderunner questions is more or less equivalent to not showing the specific feedback. So I'm not sure I see how to make the distinction? I don't think I do anything with$options->mark because as I recall mark display is all handled by the behaviour, isn't it? In which case it should work as usual. I do adjust the mark according to the penalty regime, but I don't think I've changed the display of marks from whatever is in the default adaptive behaviour.

Carroll: does setting the review option to not show marks solve your problem?


text:
You are currently browsing the category archive for the ‘math’ category.

This year is the centennial of Paul Erdős’s birth. Erdős lived most of his adult life as a traveling mathematician, “couchsurfing,” as we would say now, from place to place and from mathematical conference to mathematical conference. He wrote more than 1,500 papers with more than 500 different coauthors, introduced the probabilistic method and was the defining figure of the “Hungarian approach” to combinatorics. He died at age 83 while attending a mathematical conference.

Last year, we celebrated the centennial of Alan Turing’s birth. Turing and Erdős have become such iconic figures both for the impact of their work and for the fascinating facts of their lives. I would like to argue that the cultural archetype through which we interpret their lives is that of the saint. It is clearly that of the martyr saint in the case of Turing, while Erdős gave up material possessions and devoted his life to others, traveling everywhere and “preaching” to everybody, much in the mold of Saint Francis.

(A comparison of the Turing centennial celebration and Erdős’s, and a look at the frescoes of Medieval Catholic churches will show which kind of saint people are more interested in.)

The first step to become a saint of the Catholic church is to establish that the person exhibited “heroic virtues,” which is a great expression. This is an archetype that is not restricted to religion: you see it occurring in communist propaganda (Stakhanov, Lei Feng) and in every civil rights movement.

Saints were the “celebrities” of the Middle Ages, those whose life people liked to talk about. But contemporary celebrities come from a totally different archetype, that of the Greek God. Greek (and Roman) gods were petty and jealous, they cheated on their spouses, they were terrible parents, but there were good stories to be told about them. We don’t want (at least, I don’t) to live the life of a saint, but thinking about them is certainly inspirational and it makes us think that if someone can be so much better than us, maybe we can be a little better ourself in the practice of “virtues”, whatever this may mean to us. And we don’t admire gods, but, well, it’s probably fun to be one.

As usual, I have lost track of what I was trying to say, but I think that it speaks well of the academic community that we are more interested in saints than in gods, I will close by saying that my favorite saint of complexity theory is Avi Wigderson, I will keep to myself who my favorite god of complexity theory is, and I will leave it to the readers to contribute their picks.

This week, the topic of my online course on graph partitioning and expanders is the computation of approximate eigenvalues and eigenvectors with the power method.

If $M$ is a positive semidefinite matrix (a symmetric matrix all whose eigenvalues are nonnegative), then the power method is simply to pick a random vector $x\in \{ -1,+1 \}^n$, and compute $y:= M^k x$. If $k$ is of the order of $\frac 1 \epsilon \log \frac n \epsilon$, then one has a constant probability that

$\frac {y^T M y}{y^T y} \geq (1-\epsilon) \max_{x} \frac {x^T M x}{x^T x} = (1-\epsilon) \lambda_1$

where $\lambda_1$ is the largest eigenvalue of $M$. If we are interested in the Laplacian matrix $L = I - \frac 1d A$ of a $d$-regular graph, where $A$ is the adjacency matrix of the graph, this gives a way to compute an approximation of the largest eigenvalue, and a vector of approximately maximum Rayleigh quotient, which is useful to approximate Max Cut, but not to apply spectral partitioning algorithms. For those, we need a vector that approximates the eigenvector of the second smallest eigenvalue.

Equivalently, we want to approximate the second largest eigenvalue of the adjacency matrix $A$. The power method is easy to adjust to compute the second largest eigenvalue instead of the largest (if we know an eigenvector of the largest eigenvalue): after you pick the random vector, subtract the component of the vector that is parallel to the eigenvector of the largest eigenvalue. In the case of the adjacency matrix of a regular graph, subtract from every coordinate of the random vector the average of the coordinates.

The adjacency matrix is not positive semidefinite, but we can adjust it to be by adding a multiple of the identity matrix. For example we can work with $\frac 12 I + \frac 1{2d} A$. Then the power method reduces to the following procedure: pick randomly $x \sim \{ -1,1\}$, then subtract $\sum_i x_i/n$ from every entry of $x$, then repeat the following process $k = O\left( \frac 1 \epsilon \log \frac n \epsilon \right)$ times: for every entry $i$, assign $x_i := \frac 12 x_i + \frac 1 {2d} \sum_{j: (i,j) \in E} x_j$, that is, replace the value that the vector assigns to vertex $i$ with a convex combination of the current value and the current value of the neighbors. (Note that one iteration can be executed in time $O(|V|+|E|)$.

The problem is that if we started from a graph whose Laplacian matrix has a second smallest eigenvalue $\lambda_2$, the matrix $\frac 12 I + \frac 1{2d} A$ has second largest eigenvalue $1- \frac {\lambda_2}2$, and if the power method finds a vector of Rayleigh quotient at least $(1-\epsilon) \cdot \left( 1- \frac {\lambda_2}2 \right)$ for $\frac 12 I + \frac 1{2d} A$, then that vector has Rayleigh quotient about $\lambda_2 - 2\epsilon$ for $L$, and unless we choose $\epsilon$ of the same order as $\lambda_2$ we get nothing. This means that the number of iterations has to be about $1/\lambda_2$, which can be quite large.

The video below (taken from this week’s lecture) shows how slowly the power method progresses on a small cycle with 31 vertices. It goes faster on the hypercube, which has a much larger $\lambda_2$.

A better way to apply the power method to find small eigenvalues of the Laplacian is to apply the power method to the pseudoinverse $L^+$ of the Laplacian. If the Laplacian of a connected graph has eigenvalues $0 = \lambda_1 < \lambda_2 \leq \cdots \leq \lambda_n$, then the pseudoinverse $L^+$ has eigenvalues $0, \frac 1 {\lambda_2}, \cdots, \frac 1 {\lambda_n}$ with the same eigenvectors, so approximately finding the largest eigenvalue of $L^+$ is the same problem as approximately finding the second smallest eigenvalue of $L$.

Although we do not have fast algorithms to compute $L^+$, what we need to run the power method is, for a given $x$, to find the $y$ such that $L y = x$, that is, to solve the linear system $Ly = x$ in $y$ given $L$ and $x$.

For this problem, Spielman and Teng gave an algorithm nearly linear in the number of nonzero of $L$, and new algorithms have been developed more recently (and with some promise of being practical) by Koutis, Miller and Peng and by Kelner, Orecchia, Sidford and Zhu.

Coincidentally, just this week, Nisheeth Vishnoi has completed his monograph Lx=b on algorithms to solve such linear systems and their applications. It’s going to be great summer reading for those long days at the beach.

Long in the making, the online course on expanders starts today.

In the first week of class: what are the topics of the course, and how to prove that the eigenvalues of the adjacency matrix of a regular graph tell you how many connected components there are in the graph.

[I have been asked by the office of public affairs of the Institute for Advanced Study to publicize the following press release. L.T.]

April 1, 2013. For immediate release.

Cofounders Jean Bourgain and Peter Sarnak announce today the launch of eXpandr, a new venture that aims to become the world’s leading provider of expander graphs.

“We are excited about our mission to change the way the world uses expanders.” said CEO Guli Mars, who joined eXpandr after a distinguished career in several leading technology companies. “Expanders are vital to revenue-generating logarithms, and our technology will revolutionize a multi-billion dollar market.”

“Big data, disruption”, said Juan Raman, senior vice president for marketing. “Innovation, cloud computing”, Mr. Raman continued.

“Let p be a prime congruent to 1 modulo 4″ said Jean Bourgain, cofounder and senior vice-president for analytic number theory, “and consider the irreducible representations of PSL(2,p).”

About the Institute for Advanced Study. The Institute for Advanced Study is one of the world’s leading centers for theoretical research and intellectual inquiry. The Institute exists to encourage and support fundamental research in the sciences and humanities—the original, often speculative thinking that produces advances in knowledge that change the way we understand the world. Work at the Institute takes place in four Schools: Historical Studies, Mathematics, Natural Sciences and Social Science. It provides for the mentoring of scholars by a permanent Faculty of no more than 28, and it offers all who work there the freedom to undertake research that will make significant contributions in any of the broad range of fields in the sciences and humanities studied at the Institute.

The Institute, founded in 1930, is a private, independent academic institution located in Princeton, New Jersey. Its more than 6,000 former Members hold positions of intellectual and scientific leadership throughout the academic world. Some 33 Nobel Laureates and 38 out of 52 Fields Medalists, as well as many winners of the Wolf or MacArthur prizes, have been affiliated with the Institute.

About eXpandr. eXpandr aims to disrupt the way the world uses expander graphs, and to become the leading commercial provider of expanders. eXpandr received \$2 million in angel investing and will launch its first product by Summer 2013.

Having (non-rigorously) defined the Laplacian operator in manifolds in the previous post, we turn to the proof of the Cheeger inequality in manifolds, which we restate below.

Theorem 1 (Cheeger’s inequality) Let ${M}$ be an ${n}$-dimensional smooth, compact, Riemann manifold without boundary with metric ${g}$, let ${L:= - {\rm div} \nabla}$ be the Laplace-Beltrami operator on ${M}$, let ${0=\lambda_1 \leq \lambda_2 \leq \cdots }$ be the eigenvalues of ${L}$, and define the Cheeger constant of ${M}$ to be

$\displaystyle h(M):= \inf_{S\subseteq M : \ 0 < \mu(S) \leq \frac 12 \mu(M)} \ \frac{\mu_{n-1}(\partial(S))}{\mu(S)}$

where the ${\partial (S)}$ is the boundary of ${S}$, ${\mu}$ is the ${n}$-dimensional measure, and ${\mu_{n-1}}$ is ${(n-1)}$-th dimensional measure defined using ${g}$. Then

$\displaystyle h(M) \leq 2 \sqrt{\lambda_2} \ \ \ \ \ (1)$

We begin by recalling the proof of the analogous result in graphs, and then we will repeat the same steps in the context of manifolds.

Theorem 2 (Cheeger’s inequality in graphs) Let ${G=(V,E)}$ be a ${d}$-regular graph, ${A}$ be its adjacency matrix, ${L:= I - \frac 1d A}$ be its normalized Laplacian matrix, ${0 = \lambda_1 \leq \lambda_2 \leq \cdots \leq \lambda_{|V|}}$ be the eigenvalues of ${L}$, and define ${\mu(S):= d \cdot |S|}$ for every subset of vertices ${S\subseteq V}$. Define the conductance of ${G}$ as

$\displaystyle \phi(G) := \min_{S\subseteq V: \ 0 < \mu(S) \leq \frac 12 \mu(V) } \frac{| \partial S|}{\mu(S)}$

where ${\partial S}$ is the number of edges with one endpoint in ${S}$ and one endpoint in ${\bar S}$. Then

$\displaystyle \phi(G) \leq \sqrt{2 \lambda_2} \ \ \ \ \ (2)$

1. Proof the Cheeger inequality in graphs

We will use the variational characterization of the eigenvalues of the Laplacian ${L}$ of a graph ${G}$.

$\displaystyle \lambda_1 = \min_{f \in {\mathbb R}^v} \frac {f^T Lf}{f^T f} \ \ \ \ \ (3)$

and if ${f_1}$ is a minimizer in the above expression then

$\displaystyle \lambda_2 = \min_{f \in {\mathbb R}^V: \ f \perp f_1} \frac {f^T Lf}{f^T f}$

Following the definition of ${L}$ we see that

$\displaystyle f^T L f = \frac 1d \sum_{(u,v)\in E} |f_u - f_v |^2$

and so the minimum in (3) is 0, and it is achieved for ${f = (1,\cdots,1)}$. This means that

$\displaystyle \lambda_2 = \min_{f \in {\mathbb R}^V: \ \sum_v f_v = 0} \frac {\sum_{(u,v) \in E} |f_u-f_v|^2}{d \sum_v f_v^2} \ \ \ \ \ (4)$

The expression in the right-hand-side of (4) is an important one, and it is called the Rayleigh quotient of ${f}$, which we will denote by ${R(f)}$:

$\displaystyle R(f):= \frac {\sum_{(u,v) \in E} |f_u-f_v|^2}{d \sum_v f_v^2}$

It is also useful to consider the variant of the Rayleigh quotient where there are no squares; this does not have a standard name, so let us call it the ${\ell_1}$ Rayleigh quotient and denote it by ${R_1}$:

$\displaystyle R_1(g):= \frac {\sum_{(u,v) \in E} |g_u-g_v|}{d \sum_v |g_v|}$

The proof of the graph Cheeger inequality now continues with the proof of the following three facts.

Lemma 3 (Rounding of ${\ell_1}$ embeddings) For every non-negative vector ${g\in {\mathbb R}^V_{\geq 0}}$ there is a value ${t\geq 0}$ such that

$\displaystyle \phi(\{ v: g(v) > t \}) \leq R_1(g)$

Lemma 4 (Embedding of ${\ell_2^2}$ into ${\ell_1}$) For every non-negative vector ${f\in {\mathbb R}^V_{\geq 0}}$, we have

$\displaystyle R_1(f^2) \leq \sqrt{2 R(f)}$

Lemma 5 (From an eigenvector to a non-negative vector) For every ${f\in {\mathbb R}^V}$ such that ${\sum_v f_v =0}$ there is a non-negative ${f'\in {\mathbb R}^V_{\geq 0}}$ such that ${\mu(\{ v: f'(v) >0 \}) \leq \frac 12 \mu(V)}$ and such that

$\displaystyle R(f') \leq R(f)$

Now let us start from a function ${f}$ that optimizes (4), so that ${\sum_v f_v = 0}$ and ${R(f) = \lambda_2}$, then apply Lemma 5 to find a function ${f'}$ such that the volume of the vertices having positive coordinates in ${f'}$ is at most ${\frac 12 \mu(V)}$ and such that ${R(f') \leq R(f) = \lambda_2}$. Then consider the vector ${g\in {\mathbb R}^V}$ such that ${g_v := f'^2_v}$; by Lemma 4, we have ${R_1(g) \leq \sqrt{2 R(f')} \leq \sqrt{2\lambda_2}}$, and by Lemma 3 there is a threshold ${t}$ such that the set ${S:= \{ v: g(v) > t \}}$ has conductance ${h(S) \leq \sqrt {2\lambda_2}}$. Since ${S}$ is a subset of the vertices having positive coordinates in ${g}$, we have ${\mu(S) \leq \frac 12 \mu(V)}$, and so

$\displaystyle \phi(G) \leq \sqrt{2 \lambda_2 }$

which is the Cheeger inequality for graphs. It remains to prove the three lemmas.

Proof: of Lemma 3. For each threshold ${t}$, define the set

$\displaystyle S_t := \{ v: g_v > t \}$

The idea of the proof is that if we pick ${t}$ at random then the probability that an edge belongs to ${\partial S_t}$ is proportional to ${|g_u - g_v|}$ and the probability that ${v\in S_t}$ is proportional to ${|g_v|}$, so that the expected number of edges in ${\partial S_t}$ is proportional to the numerator of ${R_1(g)}$ and the expected number of vertices in ${S_t}$ is proportional to the denominator of ${R_1(g)}$; if ${R_1(g)}$ is small, it is not possible for ${\partial S_t/\mu(S_t)}$ to always be large for every ${t}$.

To avoid having to normalize the range of ${t}$ to be between ${0}$ and ${1}$, instead of taking averages over a random choice of ${t}$, we will consider the integral over all values of ${t}$. We have

$\displaystyle \int_0^\infty |\partial (S_t) | {\rm d} t = \sum_{u,v} |g_u - g_v |$

because we can write ${|\partial (S_t)| = \sum_{(u,v) \in E} I_{u,v} (t)}$, where ${I_{u,v} (t) = 1}$ if ${(u,v) \in \partial S_t}$ and ${I_{u,v}(t) = 0}$ otherwise, and we see that only the values of ${t}$ between ${g_u}$ and ${g_v}$ make ${I_{u,v}(t) =1}$, so ${\int_{0}^\infty I_{u,v} (t) {\rm d} t = |g_u - g_v|}$.

We also have

$\displaystyle \int_0^\infty d |S_t| {\rm d} t = d \sum_v |g_v|$

and if we denote by ${t^*}$ the threshold such that ${\phi(S_{t^*})}$ is smallest among all the ${\phi(S)}$, then

$\displaystyle \sum_{u,v} |g_u - g_v | = \int_0^\infty |\partial (S_t) | {\rm d} t$

$\displaystyle \geq \int_0^\infty h(S_{t^*}) d|S_t| {\rm d} t$

$\displaystyle = h(S_{t^*}) d \sum_v |g_v|$

so that

$\displaystyle h(S_{t^*}) \leq \frac { \sum_{u,v} |g_u - g_v | }{d \sum_v |g_v| } = R_1(g)$

$\Box$

Proof: of Lemma 3. Let us consider the numerator of ${R_1(f^2)}$; it is:

$\displaystyle \sum_{(u,v)\in E} |f^2_u - f^2_v|$

$\displaystyle = \sum_{(u,v)\in E} |f_u - f_v| \cdot (f_u + f_v)$

$\displaystyle \leq \sqrt{\sum_{(u,v)\in E} |f_u - f_v|^2} \sqrt{ \sum_{(u,v)\in E}(f_u + f_v)^2 }$

(we used Cauchy-Swarz)

$\displaystyle \leq \sqrt{R(f) \cdot d\sum_v f_v^2} \sqrt{ \sum_{(u,v)\in E} 2f_u^2 + 2f_v^2 }$

(we used the definition of ${R_2}$ and Cauchy-Swarz again)

$\displaystyle = \sqrt{R(f) \cdot d\sum_v |f_v|^2} \sqrt{ 2 d\sum_{v} f_v^2 }$

$\displaystyle = \sqrt{2 R(f) } \cdot d \sum_v f_v^2$

And so

$\displaystyle R_1(f^2) = \frac {\sum_{(u,v)\in E} |f^2_u - f^2_v|}{d \sum_v f_v^2} \leq \sqrt{2 R_2(f) }$

$\Box$

Proof: of Lemma 5. Let ${m}$ be the median of ${f}$, and consider ${\bar f}$ defined as ${\bar f_v := f_v - m}$. We have

$\displaystyle R(\bar f) \leq R(f)$

because the numerators of ${R(\bar f)}$ and ${R(f)}$ are the same (the additive term ${-m}$ cancels). The denominators are such that

$\displaystyle \sum_v \bar f_v^2 = || \bar f||^2 = || f||^2 + || - m \cdot {\bf 1} ||^2 \geq || f||^2 = \sum_v f_v^2$

because ${f}$ and the vector ${{\bf 1} = (1,\ldots,1)}$ are orthogonal, and so by Pythagoras’s theorem the length-squared of ${\bar f = f - m {\bf 1}}$ equals the length-squared of ${f}$ plus the length-squared of ${-m {\bf 1}}$.

Let us define ${f^+_v := \min\{ 0, \bar f_v\}}$ and ${f^-_v := \min \{ 0, -\bar f_v\}}$ so that ${\bar f = f^+ - f^-}$. We use the following fact:

Fact 6 Let ${a,b \in {\mathbb R}^V_{\geq 0}}$ be disjointly supported non-negative vectors (“disjointly supported” means that they are non-zero on disjoint subsets of coordinates), then

$\displaystyle \min\{ R(a) , R(b) \} \leq R(a-b)$

Proof: The numerator of ${R(a-b)}$ is

$\displaystyle \sum_{(u,v)\in E} |a_v - b_v + b_u - a_v|^2 \geq \sum_{(u,v)\in E} |a_v - a_u|^2 + |b_v - b_u|^2$

and, using orthogonality and Pythagoras’s theorem, the denominator of ${R(a-b)}$ is

$\displaystyle d || a- b||^2 = d||a ||^2 + d|| b||^2$

The fact now follows from the inequality

$\displaystyle \min \left \{ \frac {n_1}{d_1} , \frac{n_2}{d_2} \right \} \leq \frac{n_1+n_2}{d_1+d_2}$

$\Box$

The lemma now follows by observing that ${f^+}$ and ${f^-}$ are non-negative and disjointly supported, so

$\displaystyle \min\{ R(f^+) , R(f^-) \} \leq R(\bar f) \leq R(f)$

and that both ${f^+}$ and ${f^-}$ have at most ${n/2}$ non-zero coordinate. $\Box$

2. Proof of the Cheeger inequality in manifolds

We will now translate the proof of the graph Cheeger inequality to the setting of manifolds.

As you may remember, we started off by saying that ${L}$ is symmetric and so all its eigenvalues are real and they are given by the variational characterization. Now we are already in trouble because the operator ${L}$ on manifolds cannot be thought of as a matrix, so what does it mean for it to be symmetric? The consequence of symmetry that is exploited in the analysis of the spectrum of symmetric matrices is the fact that if ${A}$ is symmetric, then for every ${x,y}$ we have

$\displaystyle \langle x,Ay \rangle = x^T Ay = (A^Tx)^Ty = (Ax)^Ty = \langle Ax,y \rangle$

and the property ${\langle x, Ay \rangle = \langle Ax , y \rangle}$ makes no references to coordinates, and it is well defined even for linear operators over infinite-dimensional spaces, provided that there is a notion of inner product. If we the define the inner product

$\displaystyle \langle f,g \rangle := \int_M f(x)\cdot g(x) \ {\rm d} \mu(x)$

on functions ${f: M \rightarrow {\mathbb R}}$, and more generally

$\displaystyle \langle f,g \rangle := \int_M \langle f(x), g(x)\rangle_X \ {\rm d} \mu(x)$

for functions ${f: M \rightarrow X}$, where ${X}$ is a vector space with inner product ${\langle \cdot,\cdot,\rangle_X}$, then we can say that an operator ${A}$ is self-adjoint if

$\displaystyle \langle f, Ag \rangle = \langle Af ,g \rangle$

for all (appropriately restricted) functions ${f,g}$. If ${M}$ is compact, this property is true for the Laplacian, and, in particular, ${-{\rm div}}$ and ${\nabla}$ are adjoints of each others, that is,

$\displaystyle \langle \nabla f, g \rangle = \langle f, - {\rm div} g \rangle$

(The discrete analog would be that ${C^T}$ is the transpose of ${C}$.)

Self-adjointness (and appropriate conditions on ${M}$) imply a version of the spectral theorem and of the variational characterization. In particular, all eigenvalues of ${L}$ are real, and if there is a minimum one then it is

$\displaystyle \lambda_1 = \min_{f: M \rightarrow {\mathbb R}} \frac {\langle f, Lf \rangle}{\langle f,f\rangle}$

and if ${f_1}$ is a minimizer of the above, then

$\displaystyle \lambda_2 = \min_{f: M \rightarrow {\mathbb R},\ \langle f, f_1 \rangle = 0} \frac {\langle f, Lf \rangle}{\langle f,f\rangle}$

(The minimization is quantified over all functions that are square-integrable, and the minimum is achieved because if ${M}$ is compact then the space of such functions is also compact and the cost function that we are minimizing is continuous. In this post, whenever we talk about “all functions,” it should be understood that we are restricting to whatever space of functions makes sense in the context.)

From the property that ${-{\rm div}}$ and ${\nabla}$ are adjoint, we have

$\displaystyle \langle f, Lf \rangle = \langle f, -{\rm div} \nabla f \rangle = \langle \nabla f,\nabla f \rangle$

so

$\displaystyle \lambda_1 = \min_{f:M \rightarrow {\mathbb R}} \frac{ \int_M \langle \nabla f(x),\nabla f(x) \rangle \ {\rm d} \mu(x) } {\int M f^2(x) \ {\rm d} \mu (x)}$

where the Rayleigh quotient

$\displaystyle R(f):= \frac{ \int_M \langle \nabla f(x),\nabla f(x) \rangle \ {\rm d} \mu(x) } {\int M f^2(x) \ {\rm d} \mu (x)} = \frac {\int_M ||\nabla f(x)||^2 \ {\rm d} \mu (x)}{\int_M f^2(x) \ {\rm d} \mu (x)}$

is always non-negative, and it is zero for constant ${f\equiv 1}$, so we see that ${\lambda_1=0}$ and

$\displaystyle \lambda_2 = \min_{f:M \rightarrow {\mathbb R} : \int_M f=0 \ {\rm d} \mu} R(f)$

By analogy with the graph case, we define the “${\ell_1}$ Rayleigh quotient”

$\displaystyle R_1(g) := \frac {\int_M ||\nabla g(x)|| \ {\rm d} \mu (x)}{\int_M |g(x)| \ {\rm d} \mu (x)}$

And we can prove the analogs of the lemmas that we proved for graphs.

Lemma 7 (Rounding of ${\ell_1}$ embeddings) For every non-negative function ${g: V \rightarrow {\mathbb R}_{\geq 0}}$ there is a value ${t\geq 0}$ such that

$\displaystyle h(\{ x: g(x) > t \}) \leq R_1(g)$

where the Cheeger constant ${h(S)}$ of a subset ${S\subseteq M}$ of the manifold is

$\displaystyle h(S) := \frac{\mu_{n-1} (\partial S)}{\mu(S)}$

Lemma 8 (Embedding of ${\ell_2^2}$ into ${\ell_1}$) For every non-negative function ${f; m \rightarrow {\mathbb R}_{\geq 0}}$, we have

$\displaystyle R_1(f^2) \leq \sqrt{2 R(f)}$

Lemma 9 (From an eigenfunction to a non-negative function) For every function ${f: M \rightarrow R}$ such that ${\int_M f \ {\rm d} \mu =0}$ there is a non-negative ${f': M \rightarrow {\mathbb R}_{\geq 0}}$ such that ${\mu(\{ x: f'(x) >0 \}) \leq \frac 12 \mu(V)}$ and such that

$\displaystyle R(f') \leq R_2(f)$

Let us see the proof of these lemmas.

Proof: of Lemma 7. For each threshold ${t}$, define the set

$\displaystyle S_t := \{ x: g(x) > t \}$

Let ${t*}$ be a threshold for which ${h(S_{t*})}$ is minimized

We will integrate the numerator and denominator of ${h(S_t)}$ over all ${t}$. The coarea formula for nonnegative functions is

$\displaystyle \int_M || \nabla g || {\rm d} \mu = \int_{0}^\infty \mu_{n-1} ( \partial \{ x: g(x) > t \}) {\rm d} t$

and we also have

$\displaystyle \int_M |g| {\rm d} \mu = \int_{0}^\infty \mu ( \{ x: g(x) > t \}) {\rm d} t$

which combine to

$\displaystyle \int_M || \nabla g || {\rm d} t = \int_0^\infty \mu_{n-1} ( \partial S_t) {\rm d} t$

$\displaystyle = \int_0^\infty h(S_t) \mu(S_t) {\rm d} t$

$\displaystyle \geq h(S_{t^*}) \int_0^\infty \mu(S_t) {\rm d} t$

$\displaystyle = h(S_{t^*}) \int_M g {\rm d} t$

so that

$\displaystyle h(S_{t^*}) \leq \frac{\int_M || \nabla g || {\rm d} t }{ \int_M g {\rm d} t} = R_1(g)$

$\Box$

Proof: of Lemma 8. Let us consider the numerator of ${R_1(f^2)}$; it is:

$\displaystyle \int_M || \nabla f^2|| {\rm d} \mu$

We can apply the chain rule, and see that

$\displaystyle \nabla f^2(x) = 2f(x) \cdot \nabla f(x)$

which implies

$\displaystyle \int_M || \nabla f^2 || {\rm d} \mu$

$\displaystyle = \int_M || 2f(x) \nabla f(x)|| {\rm d} \mu(x)$

$\displaystyle = \int_M 2|f(x)| \cdot ||\nabla f(x)|| {\rm d} \mu (x)$

and, after applying Caucy-Swarz,

$\displaystyle \leq \sqrt{\int_M 4 f^2(x) {\rm d} \mu(x)} \cdot \sqrt{\int_M ||\nabla f(x)||^2 {\rm d} \mu(x)}$

$\displaystyle = 2 \cdot \left( \int_M f^2 {\rm d} \mu \right) \cdot \sqrt{ R(f)}$

And so

$\displaystyle R_1(f^2) \leq 2 \sqrt{R_2(f) }$

$\Box$

Proof: of Lemma 9. Let ${m}$ be a median of ${f}$, and consider ${\bar f}$ defined as ${\bar f(x) := f(x) - m}$. We have

$\displaystyle R(\bar f) \leq R(f)$

because the numerators of ${R(\bar f)}$ and ${R(f)}$ are the same (the derivatives of functions that differ by a constant are identical) and the denominators are such that

$\displaystyle \int_M \bar f^2{\rm d} \mu$

$\displaystyle = \int_M f^2 - 2mf + m^2 {\rm d} \mu$

$\displaystyle = \int_M f^2 + m^2 {\rm d} \mu$

$\displaystyle \geq \int_M f^2 {\rm d} \mu$

where we used the fact the integral of ${f}$ is zero.

Let us define ${f^+(x) := \min\{ 0, \bar f(x)\}}$ and ${f^-_v := \min \{ 0, -\bar f(x)\}}$ so that ${\bar f(x) = f^+(x) - f^-(x)}$. We use the following fact:

Fact 10 Let ${a,b : M \rightarrow {\mathbb R}_{\geq 0}}$ be disjointly supported non-negative functions (“disjointly supported” means that they are non-zero on disjoint subsets of inputs), then

$\displaystyle \min\{ R(a) , R(b) \} \leq R(a-b)$

Proof: We begin with the following observation: if ${a}$ is a non-negative function, and ${a(x)=0}$, then ${\nabla a(x) = \{ \bf 0 \}}$, because ${x}$ has to be a local minimum.

Consider the expression ${||\nabla (a-b)||^2}$ occurring in the numerator of ${R(a-b)}$. We have

$\displaystyle ||\nabla (a-b)||^2$

$\displaystyle = || \nabla a - \nabla b ||^2$

$\displaystyle = || \nabla a||^2 + || \nabla b||^2 - 2 \langle \nabla a,\nabla b \rangle$

But

$\displaystyle \langle \nabla a,\nabla b \rangle = 0$

because for every ${x}$ at least one of ${a(x)}$ or ${b(x)}$ is zero, and so at least one of ${\nabla a(x)}$ or ${\nabla b(x)}$ is zero.

Using this fact, we have that the numerator of ${R(a-b)}$ is equal to the sum of the numerators of ${R(a)}$ and ${R(b)}$:

$\displaystyle \int_M ||\nabla a-b||^2 {\rm d} \mu = \int_M ||\nabla a-b||^2 {\rm d} \mu + \int_M ||\nabla a-b||^2 {\rm d}$

and the denominator of ${R(a-b)}$ is also the sum of the denominators of ${R(a)}$ and ${R(b)}$:

$\displaystyle =\int_M (a-b)^2 {\rm d} \mu$

$\displaystyle =\int_M a^2 {\rm d} \mu + \int_M b^2 {\rm d} \mu - 2 \int_M ab {\rm d} \mu$

$\displaystyle =\int_M a^2 {\rm d} \mu + \int_M b^2 {\rm d} \mu$

because ${a(x)b(x)=0}$ for every ${x}$. The fact now follows from the inequality

$\displaystyle \min \left \{ \frac {n_1}{d_1} , \frac{n_2}{d_2} \right \} \leq \frac{n_1+n_2}{d_1+d_2}$

$\Box$

The lemma now follows by observing that ${f^+}$ and ${f^-}$ are non-negative and disjointly supported, so

$\displaystyle \min\{ R(f^+) , R(f^-) \} \leq R(\bar f) \leq R(f)$

and that both ${f^+}$ and ${f^-}$ have a support of volume at most ${\frac 12 \mu(M)}$. $\Box$

If anybody is still reading, it is worth observing a couple of differences between the discrete proof and the continuous proof.

The ${\ell_1}$ Rayleigh quotient is defined slightly differently in the continuous case. It would correspond to defining it as

$\displaystyle \frac {\sum_{u\in V} \sqrt{\sum_{v: (u,v)\in E} (f_u-f_v)^2 } }{d \sum_v |f_v|}$

in the discrete case.

If ${a,b \in {\mathbb R}^V}$ are disjointly supported and nonnegative, the sum of the numerators of the Rayleigh quotients ${R(a)}$ and ${R(-b)}$ can be strictly smaller than the numerator of ${R(a-b)}$, while we always have equality in the continuous case. In the discrete case, the sum of the numerators of ${R(a)}$ and ${R(b)}$ can be up to twice the numerator of ${R(a+b)}$ (this fact is useful, but it did not come up in this proof), while again we have exact equality in the continuous case.

The chain rule calculation

$\displaystyle \nabla f^2 = 2f \nabla f$

corresponds to the step

$\displaystyle f_v^2 - f_u^2 = (f_v + f_u) \cdot (f_v - f_u)$

In the continuous case, ${f_v}$ and ${f_u}$ are “infinitesimally close”, so we can approximate ${f_v + f_u}$ by ${2f_v}$.

Readers of in theory have heard about Cheeger’s inequality a lot. It is a relation between the edge expansion (or, in graphs that are not regular, the conductance) of a graph and the second smallest eigenvalue of its Laplacian (a normalized version of the adjacency matrix). The inequality gives a worst-case analysis of the “sweep” algorithm for finding sparse cuts, it shows a necessary and sufficient for a graph to be an expander, and it relates the mixing time of a graph to its conductance.

Readers who have heard this story before will recall that a version of this result for vertex expansion was first proved by Alon and Milman, and the result for edge expansion appeared in a paper of Dodzuik, all from the mid-1980s. The result, however, is not called Cheeger’s inequality just because of Stigler’s rule: Cheeger proved in the 1970s a very related result on manifolds, of which the result on graphs is the discrete analog.

So, what is the actual Cheeger’s inequality?

Theorem 1 (Cheeger’s inequality) Let ${M}$ be an ${n}$-dimensional smooth, compact, Riemann manifold without boundary with metric ${g}$, let ${L:= - {\rm div} \nabla}$ be the Laplace-Beltrami operator on ${M}$, let ${0=\lambda_1 \leq \lambda_2 \leq \cdots }$ be the eigenvalues of ${L}$, and define the Cheeger constant of ${M}$ to be

$\displaystyle h(M):= \inf_{S\subseteq M : \ 0 < \mu(S) \leq \frac 12 \mu(M)} \ \frac{\mu_{n-1}(\partial(S))}{\mu(S)}$

where the ${\partial (S)}$ is the boundary of ${S}$, ${\mu}$ is the ${n}$-dimensional measure, and ${\mu_{n-1}}$ is ${(n-1)}$-th dimensional measure defined using ${g}$. Then

$\displaystyle h(M) \leq 2 \sqrt{\lambda_2} \ \ \ \ \ (1)$

The purpose of this post is to describe to the reader who knows nothing about differential geometry and who does not remember much multivariate calculus (that is, the reader who is in the position I was in a few weeks ago) what the above statement means, to describe the proof, and to see that it is in fact the same proof as the proof of the statement about graphs.

In this post we will define the terms appearing in the above theorem, and see their relation with analogous notions in graphs. In the next post we will see the proof.

Long in the planning, my online course on graph partitioning algorithms, expanders, and random walks, will start next month.

The course page is up for people to sign up. A friend of mine has compared my camera presence to Sheldon Cooper’s in “Fun with Flags,” which is sadly apt, but hopefully the material will speak for itself.

Meanwhile, I will be posting about some material that I have finally understood for the first time: the analysis of the Arora-Rao-Vazirani approximation algorithm, the Cheeger inequality in manifolds, and the use of the Selberg “3/16 theorem” to analyze expander constructions.

If you are not a fan of recorded performances, there will be a live show in Princeton at the end of June.

I would like to thank all those that contributed to the Turing Centennial series: all those who wrote posts, for sure; but also all those who spread the word about this, on blogs, twitter, facebook, and in real life; those who came to read them; and those who wrote lots of thoughtful comments. In a community where discussions over conference organizational issues or over the importance of matrix multiplication algorithms can become very acrimonious, I am impressed that we could have such a pleasant and troll-free conversation. This goes to show that in theory has not only the smartest and most handsome readers of the whole internet, as was well known, but also the nicest ones!

We will definitely do this again in 2054, to mark the centennial of Turing’s death.

A few days ago, I was very saddened to hear of the death of Sally Ride. A Stanford Alumna, Sally Ride became to first American woman to travel in space, she served on both the investigative committees after the two Shuttle disasters, and dedicated the past decade to the goal of getting young kids, and girls in particular, interested in science and technology. She cofounded, and directed, a non-profit foundation to further these goals, and wrote several books. After her death, it was revealed that she had been in a 25-year relationship with another woman, who was also the coauthor of her books and a partner in her foundation.

I think it is significant that a person that certainly had a lot of courage, determination, willingness to defy stereotypes, and to be an inspiration for people like her, felt that she could not be publicly out during her life. (In interviews about their books, Ride and her partner Tam O’Shaughnessy referred to each other as “friends”.)

Let’s hope that in 2054 it’s not just computer science professors in the West that are confortable being out, but also astronauts, movie stars, professional athletes, and so on.

Two more posts are coming soon. Meanwhile, here is a wonderful interview with Robert MacPherson, which is part of an interview series by the Simons Foundation. Although the interview does not mention Turing, it does mention Kolmogorov.

(via Not Even Wrong)

From this New York Times article:

Researchers found the home test accurate 99.98 percent of the time for people who do not have the virus. By comparison, they found it to be accurate 92 percent of the time in detecting people who do. [...]

So, while only about one person in 5,000 would get a false negative test, about one person in 12 could get a false positive.

format: plain


text:
# Electronics and Communication Engg - GATE 2017 Paper Solution

Question No. 1

Consider the 5 x 5 matrix

$A=\left[\begin{array}{ccccc}1& 2& 3& 4& 5\\ 5& 1& 2& 3& 4\\ 4& 5& 1& 2& 3\\ 3& 4& 5& 1& 2\\ 2& 3& 4& 5& 1\end{array}\right]$

It is given that A has only one real eigenvalue. Then the real eigenvalue of A is

Question No. 2

The rank of the matrix $M=\left[\begin{array}{ccc}5& 10& 10\\ 1& 0& 2\\ 3& 6& 6\end{array}\right]$ is

Question No. 3

Consider the following statement about the linear dependence of the real valued function y1=1, y2=x and y3=x2, over the field of real of real numbers.

I.                    y1,y2 and y3 are linearly independent on $-1\le x\le 0$

II.                  y1,y2 and y3 are linearly dependent on $0

III.                y1,y2 and y3 are linearly independent on $0\le x\le 1$

IV.                y1,y2 and y3 are linearly dependent on $-1\le x\le 0$

Which one among the following is correct?

Question No. 4

Three fair cubical dice are thrown simultaneously. The probably that all three dice have the same number of dots on the faces showing us is (up to third decimal place) ____________.

Question No. 5

Consider the following statements for continuous-time linear time invariant (LTI) system.

I.                    There is no bounded input bounded output (BIBO) stable system with a pole in the right half of the complex plane.

II.                  There is no casual and BIBO stable system with a pole in the right half of the complex plane.

Which one among the following is correct?

Question No. 6

Consider a single input single output discrete-time system with x[n] as input and y[n] as output, where the two are related as

Which one of the following statement is true about the system?

Question No. 7

In the circuit shown, the positive angular frequency ω (in radians per second) at which the magnitude of the phase difference between the voltages V1 and V2 equals $\frac{\mathrm{\pi }}{4}$ radians, is_________.

Question No. 8

A periodic signal x(t) has a trigonometric Fourier aeries expansion

If $x\left(t\right)=-x\left(-t\right)=-x\left(t-\pi /{\omega }_{0}\right)$, we can conclude that

Question No. 9

A bar of Gallium Arsenide (GaAs) is doped with Silicon such that the Silicon atoms occupy Gallium and Arsenic sites in the GaAs crystal. Which one of the following statements is true?

Question No. 10

An n+ -n Silicon device is fabricated with uniform and nono-degenerate donor doping concentration of ND1 =1 × 1018 cm-3 and ND2 =1 × 1015 cm-3 corresponding to the n+ and n regions respectively. At the operational temperature T, assume complete impurity ionization, kT/q=25mV, and intrinsic carrier concentration to be ni = 1 × 1010 cm-3. What is the magnitude of the built-in potential of this device?

Question No. 11

For a narrow base PNP BJT, the excess minority carrier concentration ($\triangle n_E$ for emitter,$\triangle p_B$ for base,$\triangle n_C$ for collector) normalized to equilibrium minority carrier concentration ($n_{E0}$ for emitter,$n_{B0}$ for base,$n_{C0}$ for collector) in the quasi-neutral emitter, base and collector regions are shown below. Which one of the following biasing modes is the transistor operating in?

Question No. 12

For the operational amplifier circuit shown, the output saturation voltages are ±15V. The upper and lower threshold voltages for the circuit are, respectively,

Question No. 13

A good transconductance amplifier ahould have

Question No. 14

A Miller effect in the context of a Common Emitter amplifier explains

Question No. 15

In the latch circuit shown, the NAND gates have non-zero, but unequal proportion delays. The present input condition is: P=Q=’0’. If the input condition is changed simultaneously to P=Q=’1’, the outputs X and Y are

Question No. 16

The clock frequency of an 8085 microprocessor is 5 MHz. If the time required to execute an instruction is 1.4 µs, then the number of T-states needed for executing the instruction is

Question No. 17

Consider the D-Latch shows in the figure, which is transparent when its clock input CK is high and has zero propagation delay. In the figure, the clock signal CLK1 has a 50% duty cycle and CLK2 is a one-fifth period delayed version of CLK1. The duty at the output at the latch in percentage is__________

Question No. 18

The open loop transfer function $G\left(s\right)=\frac{\left(s+1\right)}{{s}^{p}\left(s+2\right)\left(s+3\right)}$ where p is an integer, is connected in unity feedback configuration as shown in the figure.

Given that the steady state error is zero for unit and 6 for unit ramp input, the value of the parameter p is_________

Consider a stable system with transfer function $G\left(s\right)=\frac{{s}^{p}+{b}_{1}{s}^{p-1}+···+{b}_{p}}{{s}^{q}+{a}_{1}{s}^{q-1}+···+{a}_{q}}$ where b1, …, bp and a1, … , aq are real valued constant. The slop of the Bode log magnitude curve of G(s) converges to -60 dB /decade as ω→∞. A possible pair of values for p and q is