# GATE CSE 2008 | Question: 24

2.3k views

Let $P =\sum \limits_ {i\;\text{odd}}^{1\le i \le 2k} i$ and $Q = \sum\limits_{i\;\text{even}}^{1 \le i \le 2k} i$, where $k$ is a positive integer. Then

1. $P = Q - k$
2. $P = Q + k$
3. $P = Q$
4. $P = Q + 2k$

edited

$\textbf{P}=1+3+5+7+\ldots +(2k-1)$
$\quad=(2-1)+(4-1)+(6-1)+(8-1)+\ldots+(2k-1)$
$\quad=(2+4+6+8+\ldots+2k)+(-1-1-1-1-1\ldots k \ \text{times})$
$\quad=\textbf{Q}+(-k)=\textbf{Q-k}$

Correct Answer: $A$

edited
Substitute k=3 then we get p=9 and q=12  on verifying we get option A.
11
That's true. P is adding the first k odd numbers and Q is adding the first k even numbers. Each even number is 1 greater than its corresponding odd number being added. So for k additions, Q will be P+k
0
but option c also satisfies given condition........................... checking for each k
0
@sanjay how option c will true please explain?
0
Lets Assume the value of k=5

then we take number from 1 to 10.

then P= 1+3+5+7+9 = 25

and Q= 2+4+6+8+10 = 30            So, here we conclude that P=Q+K
0
@SHIV_KANNAUJ

LoL
The odd series is 1 3 5 7 ... 2k-1

So, 1+(t1-1)2=2k-1

or t1=k;

P = (k/2) [2x1+(k-1)2]=k^2

The even series is 2 4 6 8 10  ... 2k

So, 2+(t2-1)2=2k

or t2=k;

Q = (k/2) [2x2+(k-1)2]=k^2+k

edited
0

Nice approach.Thanks :-)

Just small correction needed."The odd series is 2 4 6 8 10  ... 2k ."

Assme k=3 so 2k=6

p-sum of all odd numbers from 1 to 2k so p=1+3+5=9

q-sum of all even numbers from 1 to 2k so q=2+4+6=12

now as we can see P=Q-K
Just Write –

P = 1 + 3 + 5 + …

Q = 2 + 4 + 6 + …

and take K = 3

so P = (1+3+5) = 9

and Q = (2+4+6) = 12

and equation 1 holds-

P = Q – K

9 = 12 – 3.

it take only 30 second question to solve  :)   $\therefore$ Answer is Option $\LARGE A$

Try to use substitution method here

Let k=2

We know that 1<= i <= 2k

That is 1<=i<= 4

For P i is odd

For Q i is even

Therefore P will be 1+3 => 4

Q will be 2+4 =>6

Now check options and substitute values of P , Q ,k in options

a) P = Q-k

4 = 6-2

4=4

b) P=Q+k

4 = 6+2

4 != 8

c) P=Q

4!= 6

d) P=Q+2k

4 = 6+2(2)

4!= 10

Only option a) is satisfying

Therefore correct answer is option A

## Related questions

1
15.4k views
Which of the following is NOT true of deadlock prevention and deadlock avoidance schemes? In deadlock prevention, the request for resources is always granted if the resulting state is safe In deadlock avoidance, the request for resources is ... state is safe Deadlock avoidance is less restrictive than deadlock prevention Deadlock avoidance requires knowledge of resource requirements apriori..
If a class $B$ network on the Internet has a subnet mask of $255.255.248.0$, what is the maximum number of hosts per subnet? $1022$ $1023$ $2046$ $2047$
Consider the Quicksort algorithm. Suppose there is a procedure for finding a pivot element which splits the list into two sub-lists each of which contains at least one-fifth of the elements. Let $T(n)$ be the number of comparisons required to sort $n$ elements. Then $T(n) \leq 2T(n/5) + n$ $T(n) \leq T(n/5) + T(4n/5) + n$ $T(n) \leq 2T(4n/5) + n$ $T(n) \leq 2T(n/2) + n$