Maths and Combinatronics

Last Updated :
Discuss
Comments

Question 1

Which of the following statements is always true for an even number n?

  • n % 2 == 1

  • Last bit of n in binary is 1

  • n & 1 == 0

  • n / 2 is odd

Question 2

What is the purpose of modulo in modular exponentiation?


  • To speed up multiplication

  • To limit numbers to avoid overflow

  • To convert binary to decimal

  • To find the maximum value

Question 3

If n is divisible by m, then which of the following is true?


  • n % m == 1

  • n // m will always be 0

  • n % m == 0

  • m % n == 0

Question 4

What is the most efficient method to check if a single number (≤ 106) is prime?

  • Trial division up to n

  • Trial division up to √n

  • Using the Sieve of Eratosthenes

  • Check divisibility by 2 and 3

Question 5

Why do we use GCD in problems involving LCM?


  • To reduce a number

  • Because LCM(a, b) = (a * b) / GCD(a, b)

  • It helps check divisibility

  • To compute square root

Question 6

Why is it incorrect to directly divide in modular arithmetic like (a / b) % m?

  • It’s computationally slow

  • Division is not allowed in math

  • Modular division needs multiplicative inverse

  • All modulo operations must be done after division

Question 7

Which statement about the Euler Totient Function φ(n) is correct?

  • φ(n) is always even

  • φ(n) is the number of integers from 1 to n divisible by n

  • φ(n) = n - 1 if n is prime

  • φ(n) is same as number of digits in n

Question 8

When would ceil(n/m) != floor(n/m) be true for positive integers?


  • Always

  • When n is divisible by m

  • When n is not divisible by m

  • Never

Question 9

You are to find the closest number ≤ n that is divisible by m. Which formula works?

  • n // m

  • (n - 1) % m

  • (n // m) * m

  • n % m

Question 10

In the Sieve of Eratosthenes, why do we start striking off from i*i?

  • To skip checking small primes

  • Because smaller multiples already struck by smaller primes

  • To reduce space

  • Because i*i is always prime

There are 10 questions to complete.

Take a part in the ongoing discussion