Recent questions tagged cmi2015

1 1 vote
1 1 answer
806
806 views
Let $\Sigma=\{a,b\}.$ Given a language $L\underline\subset \Sigma^{\ast}$ and a word $w\in\Sigma^{\ast}$, define the languages:$$Extend(L,w) :=\{xw\:|\:x\in L\}$$ $$Shrin...
8 8 votes
2 answers 2 answers
2.1k
2.1k views
A binary relation $R ⊆ (S ×S)$ is said to be Euclidean if for every $a, b, c ∈ S, (a, b) ∈ R$ and $(a, c) ∈ R$ implies $(b, c) ∈ R$. Which of the following statements is ...
3 3 votes
1 1 answer
902
902 views
There is a thin, long and hollow fibre with a virus in the centre. The virus occasionally becomes active and secretes some side products. The fibre is so thin that new si...
4 4 votes
2 2 answers
1.3k
1.3k views
Consider the code below, defining the functions $f$ and $g$:f(m, n) { if (m == 0) return n; else { q = m div 10; r = m mod 10; return f(q, 10*n + r); } } g(m, n) { if (n ...
5 5 votes
2 2 answers
993
993 views
Consider the code below, defining the functions $f$ and $g$:f(m, n) { if (m == 0) return n; else { q = m div 10; r = m mod 10; return f(q, 10*n + r); } } g(m, n) { if (n ...
2 2 votes
2 2 answers
1.0k
1.0k views
Consider the code below, defining the functions $f$ and $g$:f(m, n) { if (m == 0) return n; else { q = m div 10; r = m mod 10; return f(q, 10*n + r); } } g(m, n) { if (n ...
2 2 votes
1 1 answer
801
801 views
An airline runs flights between several cities of the world. Every flight connects two cities. A millionaire wants to travel from Chennai to Timbuktu by changing at most ...
16 16 votes
2 answers 2 answers
3.0k
3.0k views
You are given $n$ positive integers, $d_1, d_2 \dots d_n$, each greater than $0$. Design a greedy algorithm to test whether these integers correspond to the degrees of so...
2 2 votes
2 2 answers
1.0k
1.0k views
A cook has a kitchen at the top of a hill, where she can prepare rotis. Each roti costs one rupee to prepare. She can sell rotis for two rupees a piece at a stall down th...
3 3 votes
2 2 answers
723
723 views
A cook has a kitchen at the top of a hill, where she can prepare rotis. Each roti costs one rupee to prepare. She can sell rotis for two rupees a piece at a stall down th...
2 2 votes
2 2 answers
995
995 views
Consider a social network with $n$ persons. Two persons $A$ and $B$ are said to be connected if either they are friends or they are related through a sequence of friends:...
6 6 votes
4 4 answers
1.3k
1.3k views
The school athletics coach has to choose $4$ students for the relay team. He calculates that there are $3876$ ways of choosing the team if the order in which the runners ...
13 13 votes
3 answers 3 answers
1.9k
1.9k views
Let $L_1$ and $L_2$ be languages over an alphabet $\Sigma$ such that $L_1 \subseteq L_2$. Which of the following is true:If $L_2$ is regular, then $L_1$ must also be regu...
13 13 votes
5 answers 5 answers
7.2k
7.2k views
How many times is the comparison $i \geq n$ performed in the following program?int i=85, n=5; main() { while (i >= n) { i=i-1; n=n+1; } }$40$$41$$42$$43$
11 11 votes
3 answers 3 answers
2.2k
2.2k views
You arrive at a snack bar and you can’t decide whether to order a lime juice or a lassi. You decide to throw a fair $6$-sided die to make the choice, as follows.If you th...
7 7 votes
3 answers 3 answers
3.4k
3.4k views
Suppose we have constructed a polynomial time reduction from problem $A$ to problem $B$. Which of the following can we infer from this fact?If the best algorithm for $B$ ...
17 17 votes
2 answers 2 answers
3.1k
3.1k views
An undirected graph has $10$ vertices labelled $1, 2,\dots , 10$ and $37$ edges. Vertices $1, 3, 5, 7, 9$ have degree $8$ and vertices $2, 4, 6, 8$ have degree $7.$ What ...
3 3 votes
1 1 answer
1.2k
1.2k views
A college prepares its timetable by grouping courses in slots A, B, C, . . . All courses in a slot meet at the same time, and courses in different slots have disjoint tim...
4 4 votes
2 answers 2 answers
990
990 views
Suppose each edge of an undirected graph is coloured using one of three colours — red, blue or green. Consider the following property of such graphs: if any vertex is the...
8 8 votes
2 2 answers
3.3k
3.3k views
Twin primes are pairs of numbers $p$ and $p+2$ such that both are primes—for instance, $5$ and $7$, $11$ and $13$, $41$ and $43$. The Twin Prime Conjecture says that ther...
To see more, click for the full list of questions or popular tags.