# Tutor profile: Sanjay S.

## Questions

### Subject: Machine Learning

What are one advantage and one disadvantage of the K-nearest neighbors approach to classification?

Advantage: There is no need to train any parameters. (K-nearest neighbors is a nonparametric approach) Note that this also means that when you have new data points, you do not need to adapt or re-train a model. Disadvantage: All data points must be stored at test time so that the K-nearest neighbors to the given example can be computed. This process of finding the nearest neighbors can also be time consuming compared to the test-time running time of other classification methods.

### Subject: Discrete Math

Consider a graph in which each vertex has a degree of at least 2. Prove that every connected component of this graph contains a cycle.

Consider an arbitrary connected component of the graph. Consider a maximal path $$ u_1, u_2, ..., u_n $$ in this connected component. A maximal path is one that cannot be extended at either end without repeating a vertex that already occurs in the path. Since $$u_1$$ has a degree of at least 2, $$u_1$$ must have a neighbor $$v$$ that is not $$u_2$$. Moreover, since this path is maximal, $$v$$ must be the same as $$u_j$$ for some integer $$j$$ such that $$ 2 < j \leq n $$. Therefore, $$ u_j, u_1, u_2, ..., u_j $$ is a cycle in the connected component.

### Subject: Calculus

What is the integral of ln x ?

We will use integration by parts! The formula for integration by parts is $( \int u\hspace{5pt}dv = uv - \int v\hspace{5pt}du $) We will set $$ u = \ln x $$ and $$dv = dx $$. Then $$ du = \frac{1}{x} dx $$ and $$ v = x $$. (Notice we differentiate $$u$$ with respect to $$x$$ and integrate $$dv$$ with respect to $$x$$. $( \int \ln x \hspace{5pt}dx = x \ln x - \int \frac{1}{x}x \hspace{5pt} dx $) $( = x \ln x - \int dx $) $( = x \ln x - x + C $)

## Contact tutor

needs and Sanjay will reply soon.