Raw

6. Control questions and tasks / Контрольні запитання і завдання

Divisibility, primes, GCD/LCM

  1. Define bab \mid a (“bb divides aa”). When is an integer even? How does the parity follow from nmod2n \bmod 2?
  2. Define a prime number. Why is it enough to test divisors only up to n\sqrt{n} when checking primality?
  3. State the identity the Euclidean algorithm is based on. Use it to compute gcd(48,18)\gcd(48, 18), showing each step.
  4. State the relation between gcd(a,b)\gcd(a,b) and lcm(a,b)\operatorname{lcm}(a,b). Use it to find lcm(15,20)\operatorname{lcm}(15, 20).

Factorization and totient

  1. State the Fundamental Theorem of Arithmetic. Give the prime factorization of 5656.
  2. Define Euler’s totient φ(n)\varphi(n). Write the product formula in terms of the distinct prime factors of nn, and use it to compute φ(12)\varphi(12).
  3. Which integers in {1,,12}\{1, \dots, 12\} are counted by φ(12)\varphi(12)? List them.

Methods of proof

  1. Describe the structure of a direct proof of a statement “if PP then QQ”. Give a direct proof that if nn is even then 2n2 \mid n.
  2. State the principle of mathematical induction (base case and inductive step). What is the induction hypothesis?
  3. Prove by induction that the sum of the first nn odd numbers equals n2n^2.
  4. Why does verifying a statement for many specific inputs not constitute a proof, whereas an induction argument does?

Functions and complexity

  1. What are the domain and range of a function? Give the domain and range of f(x)=x2+2x+1f(x) = x^2 + 2x + 1, and evaluate f(3)f(3).
  2. State the time complexity of isPrime, gcd, and totient, and justify each in one sentence.

Tasks by hand

  1. Compute gcd(84,30)\gcd(84, 30) and then lcm(84,30)\operatorname{lcm}(84, 30).
  2. Give the prime factorization of 360360 and use it to compute φ(360)\varphi(360).

Laboratory/Laboratory5/6questions.md · 1.9 KB · updated 2026-07-31 21:14