Skip to main content

TCS Sample Problems On Odd & Even Integers

Below are three questions on numbers on concepts dealing with odd and even and a new class called "even-odd" numbers.
Question 1
If n is an even-odd number then which of the following must be false?
(A number is called "even-odd" if it is halfway between an even integer and an odd integer.)
a) n/2 is not an integer
b)(2n)2 is an integer
c)4n is an odd integer
d)none of these
Answer : c)4n is an odd integer
Solution:
A number is called "even-odd" if it is halfway between an even integer and an odd integer. For example, consider an even integer 10 and an odd integer -5. Number halfway between them will be (10 - (-5)) / 2 = 7.5. Here 7.5 is an "even-odd" number.
i.e., an even-odd number will be in the form x + 1/2 = x.5 where x is any integer.
Let us see with each option:
Consider option a :
Since n is a fraction number then n/2 is also a fraction.
i.e., n/2 is not an integer.
Hence option a is true.
Consider option b :
(2n)2 = 4n2
since n is an even-odd number then n^2 is not an integer.
Also n2 will have 1/4 = .25 in its decimal place. (For example, consider n = 7/2. Then n2 will be 7/2 x 7/2 = 49/4. 49/4 can be written as 49 + 1/4. Here 1/4 will contribute to the decimal part.)
When we multiply n2 by 4 we have an integer, since .25 x 4 = 1.
Hence option b is true
Consider option c:
We can express 4n as 2 x 2n.
Since n is X.5 then 2n must be an integer and any multiple of 2 gives an even integer.
But the statement says that 4n is an odd integer.
Hence option c is false.
Question 2
If p is an odd number and q is an even number, which of the following must be an even?
I. 2p+3q
II. p2 - q2
III.(pq)2
IV. (1+pq)2
Options:
a) I only b)II&IV only c)I&III only d)I,II&III only
Answer : c)I&III only
Solution:
We know that any multiple of 2 is even and 3 times of an even number is also even.
Then 2p and 3q both are even.
Since the addition of two even numbers is again an even, then 2p+3q is even.
i.e., I is even.
Now, the square of any even number is even and the square of an odd is odd. Then p2 is odd and q2 is even
And difference between even number and odd number is an odd number.
Then p2 - q2 is an odd.
Hence II is odd.
The multiplication of an odd and even number will be an even number, then pq is even,
And the square of an even is even, so (pq)2 is also even.
Hence III is even.
since pq is even, then 1 + pq will be odd.
And the square of odd is odd. Therefore (1 + pq)2 is odd.
Hence IV is odd.
Therefore only I and III are even. Thus the answer is I & III only.
Question 3
If n is an odd integer, then which of the options will be even.
a)(n2)/2 + n b)nn + n + 1 c)(n2 + 3)2 d)none of these
Answer : c)(n2 + 3)2
Solution :
Consider option a,
since n is an odd number then n2 is also an odd
We can express (n2)/2 + n as ( n2 + 2n)/ 2.
And n2 is odd and 2n is even, then n2 + 2n will be odd
Then ( n2 + 2n)/ 2 is not an even integer.
Consider option b,
since n is odd, then n power anything is odd and nn is odd.
The addition of 3 odd numbers is odd, then nn + n + 1 is an odd integer.
Consider option c,
Here n2 is odd and then n2 + 3 is also odd.
Now, the square of an odd integer is odd, then (n2 + 3)2 is an even integer.
Hence the option c)(n2 + 3)2 is the answer.

Comments

Popular posts from this blog

Introduction to JavaScript- Basics

JavaScript is the most popular scripting language on the internet, and works in all major browsers, such as Internet Explorer, Firefox, Chrome, Opera, and Safari. What You Should Already Know Before you continue you should have a basic understanding of the following: HTML and CSS If you want to study these subjects first, find the tutorials on our Languages page . What is JavaScript? JavaScript was designed to add interactivity to HTML pages JavaScript is a scripting language A scripting language is a lightweight programming language JavaScript is usually embedded directly into HTML pages JavaScript is an interpreted language (means that scripts execute without preliminary compilation) Everyone can use JavaScript without purchasing a license Are Java and JavaScript the same? NO! Java and JavaScript are two completely different languages in both concept and design! Java (developed by Sun Microsystems) is a powerful and much more complex programming language ...

How to prepare for interview? follow the steps.

Interview Preparation  Research is a critical part of preparing for an interview. If you haven't done your homework, it is going to be obvious. Spend time researching and thinking about yourself, the occupation, the organization, and questions you might ask at the end of the interview. Step 1: Know Yourself The first step in preparing for an interview is to do a thorough self-assessment so that you will know what you have to offer an employer. It is very important to develop a complete inventory of skills, experience, and personal attributes that you can use to market yourself to employers at any time during the interview process. In developing this inventory, it is easiest to start with experience. Once you have a detailed list of activities that you have done (past jobs, extra-curricular involvements, volunteer work, school projects, etc.), it is fairly easy to identify your skills. Simply g...

Cognizant Company Profile and it's information for Interview

Website: www.cognizant.com HQ Teaneck, NJ Industry Information Technology Services Size 130K+ Employees, $6B+ Revenue NASDAQ CTSH Competitors Infosys, Wipro, Tata Consultancy Services   About cognizant Cognizant Corporate view: Cognizant is an American multinational IT services and consulting corporation headquartered in Teaneck, New Jersey, United States. Cognizant has been named to the 2010 Fortune 100 Fastest-Growing Companies List for the eighth consecutive year. Cognizant has also been named to the Fortune 1000 and Forbes Global 2000 lists. It has consistently ranked among the fastest growing companies including the 2010 Business Week 50 list of the top-performing U.S. companies, the Business Week Hottest Tech Companies 2010, and the Forbes Fast Tech 2010 list of 25 Fastest Growing Technology Companies In America. Founded: 1994 Headquarters: Teaneck, New Jersey, U.S. Key people:  Francisco D'Souza (President & CEO) Lakshmi Naray...