Maths and Combinatronics

Last Updated :
Discuss
Comments

Question 1

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

  • A

    n % 2 == 1

  • B

    Last bit of n in binary is 1

  • C

    n & 1 == 0

  • D

    n / 2 is odd

Question 2

What is the purpose of modulo in modular exponentiation?


  • A

    To speed up multiplication

  • B

    To limit numbers to avoid overflow

  • C

    To convert binary to decimal

  • D

    To find the maximum value

Question 3

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


  • A

    n % m == 1

  • B

    n // m will always be 0

  • C

    n % m == 0

  • D

    m % n == 0

Question 4

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

  • A

    Trial division up to n

  • B

    Trial division up to √n

  • C

    Using the Sieve of Eratosthenes

  • D

    Check divisibility by 2 and 3

Question 5

Why do we use GCD in problems involving LCM?


  • A

    To reduce a number

  • B

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

  • C

    It helps check divisibility

  • D

    To compute square root

Question 6

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

  • A

    It’s computationally slow

  • B

    Division is not allowed in math

  • C

    Modular division needs multiplicative inverse

  • D

    All modulo operations must be done after division

Question 7

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

  • A

    φ(n) is always even

  • B

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

  • C

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

  • D

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

Question 8

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


  • A

    Always

  • B

    When n is divisible by m

  • C

    When n is not divisible by m

  • D

    Never

Question 9

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

  • A

    n // m

  • B

    (n - 1) % m

  • C

    (n // m) * m

  • D

    n % m

Question 10

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

  • A

    To skip checking small primes

  • B

    Because smaller multiples already struck by smaller primes

  • C

    To reduce space

  • D

    Because i*i is always prime

There are 10 questions to complete.

Take a part in the ongoing discussion